Issue with Retencion policy

Hi,

I have major problem with step of retention policy on Octopus 3.3.20. I already read similar topics about this issue and I have not seen clear description, bellow I added configuration how we made set up for couple channels, both are almost same except channel names.

Channel: ProjectA, Lifecycle: TestA, Environment: Dev, Machine: DevHost
Channel: ProjectB, Lifecycle: TestA, Environment: Dev, Machine: DevHost
Policy retention: keep one release

When deployment are running on environment Dev with steps of ProjectA channel, during at last step of retention policy for some reason it removes previously deployed releases from ProjectB channel and same behavior happened when we try to deploy ProjectB. One curious thing are log records, similar records appears after both deployments, look bellow screenshot.

Hi Edgars,

Thanks for getting in touch! Amazingly this is by design, as if you were using the same package and settings you would want them cleaned up as they would not be in use once a new version is released.
When you have a package reused in a channel with variable details this issue arises. But we have a fix. You need to add Octopus.Tentacle.CurrentDeployment.RetentionPolicySubset as a variable to your project and set the value to #{Octopus.Release.Channel.Id}. This will create a separate retention policy for the channels in a project on a Tentacle.

Hope that helps!
Vanessa

Hi,

Thanks for response. It works perfectly

Hi Edgars,

Great to hear it.

Vanessa