Two deploy tasks are running simultaneously in the same environment

Hello, please advise on a strange effect in Octopus.
I’ve accidentally faced with a new issue when two deploy tasks can be run simultaneously in one environment.

we have configured 2 different projects for one environment. The first one has an approval step with a manual intervention in the middle of the process. When it came to those step and stayed on a pause another task from the second project started different deploy. It’s fine, but having approved the first, I triggered it to continue and we got a mess in the environment with the partial groups of hosts being deployed by different code.
Octopus 3.8.9, a newer version can be tested the next week.

The next behaviour expected: the first process should be queued if it is continued after the manual intervention and the environment is already occupied by another process.

Hi Sergey,

Thanks for getting in touch! Octopus will only ever block a deployment if you are attempting to deploy a project to an environment that it is currently deploying to.
If you have multiple projects deploying to a single environment Octopus will not stop this from happening.

There are some fail safes that we have for concurrent deployments on Tentacles for our own processes and scripts but these can be overwritten with project variables, and custom scripts and processes will not have these locks or checks.
If you have projects that could clash on deployment to the same project, that share files, services, processes etc any scripting would have to account for potential issues.

If you are running nothing but Octopus defined features and have not set any mutex bypass variables, you can send through your deployment logs with variable evaluation turned on and we can have a look if there is something we have not taken into account.
https://octopus.com/docs/how-to/how-to-turn-on-variable-logging-and-export-the-task-log

If your projects are designed to run in a specific order, then you could set up the second project to be triggered by the first using the following community library step: https://library.octopusdeploy.com/step-templates/18392835-d50e-4ce9-9065-8e15a3c30954/actiontemplate-chain-deployment
This would not account for if a manual deployment of project 2 was started.

Sorry if this was not the news you were expecting.
Vanessa

Vanessa,
thank you for clarification, it was not obvious for me when dealing with several projects.

Apparently I will combine 2 projects into a new one with a separation by channels, though I’d vote for a feature to lock the environment at deployment.

Hi Sergey,

The same project with different channels should resolve this issue for you.

Warm Regards,
Vanessa