File extraction issue when 2 projects deploy at the same time to the Octopus Server and use the same Large Git Repository as a script source #9146
Labels
kind/bug
This issue represents a verified problem we are committed to solving
Severity
Blocking customers with large Git Repositories from deploying concurrently using the same script from the same Git repository to the Octopus Server (Default worker pool with no workers in).
Version
Earliest tried 2024.2.9303, can replicate it on 2024.3.12915 but not on Cloud (see below)
Latest Version
I could reproduce the problem in the latest build
What happened?
There seems to be an extraction issue when you have a large Git Repository and you are trying to source a script from that Git Repository with 2 projects that deploy at the same time to the Octopus Server (default worker pool). One project will deploy but the other wont be able to extract the Git file.
Please note this only seems to happen when deploying to the Octopus Server itself (default worker pool with no workers in it), not a deployment target or specific worker.
Both deployments will use the same Git hash (see project 2 log below):
Extracting package 'C:\Octopus\Packages\git-resources\1bf205cb404934a8a5861a4ce636336604ca1404@L2a7a26970d35049faa59ab14845883f0ca6c4385@da39a3ee5e6b4b0d3255bfef95601890afd80709.zip'
Ideally we need to zip those packages up with different Git hashes so they are not held up by other deployments using the same Git scripts from the same repos.
You will see both Git repositories are cloned, placed in the same zip folder with the same hash and then on extraction, one project will extract the zip folder and the other will error out stating that the file is in use.
I tested this with a small Git Repository and both deployed fine so this looks to only be an issue with large git repositories (the large project I tested with having the issue was 27mb).
I also tested this with a deployment target and it waits for the other project so it handles it better when using the same deployment target, just not when running on the Octopus Server (default worker pool with no workers in):
Reproduction
Run a Script
step in it and useGit Repository
as yourScript Source
.Error and Stacktrace
More Information
Zendesk Ticket (internal) - https://octopus.zendesk.com/agent/tickets/210051
R and D discussion (internal) - https://octopusdeploy.slack.com/archives/CNHBHV2BX/p1730212646751319
Workaround
Since I could not replicate this using smaller repositories you will need to either split your scripts out into smaller repositories so when Octopus zips them up its not having to copy your whole repository over. This will mean a smaller zip file size to extract and so will take less time, meaning both deployments should be free to use the same scripts from the same repository.
Either that or because Octopus handles this better with deployment targets (one waits for the other) you could setup a tentacle on the Octopus server and use that to deploy to instead as a deployment target.
The text was updated successfully, but these errors were encountered: