We use the “Helm upgrade” process to deploy our application. We also use the --atomic
flag under the “additional arguments”
The problem is what when you manually cancel the deployment via UI it throws an error and doesn’t actually roll back the helm upgrade:
Requesting cancellation...
July 12th 2023 11:27:49Info
Releasing package lock for octoworker-eu-dev-0.
July 12th 2023 11:27:49Error
Failed to release package lock for octoworker-eu-dev-0 The operation was canceled.
System.OperationCanceledException: The operation was canceled.
at Octopus.Server.Orchestration.Targets.Tentacles.Observability.HalibutTentacleRpcTimerProxy.Invoke(MethodInfo targetMethod, Object[] args) in ./source/Octopus.Server/Orchestration/Targets/Tentacles/Observability/HalibutTentacleRPCTimerProxy.cs:line 59
at generatedProxy_3.CancelScript(CancelScriptCommand )
at Octopus.Server.Orchestration.Targets.Tentacles.ScriptObserver.ObserveUntilComplete(ScriptTicket ticket, Int64 next, ScriptOutputFilter output, CancellationToken cancellationToken) in ./source/Octopus.Server/Orchestration/Targets/Tentacles/ScriptObserver.cs:line 64
.... and so on.
On the next deployment I am then left with an error:
Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress
Error Helm Upgrade returned non-zero exit code: 1. Deployment terminated.
The solution is to manually rollback or uninstall the helm release.
I expected that cancelling the deployment would still perform a rollback with the --atomic parameter.