Octopus tries to delete releases from different channels

I have several channels for on project. Lets name channels: default, A and B.

When I install release to channel A and then have several new releases to channel B, Octopus tries to delete last release on channel A (probably due to retention policy).

I consider this as a bug or undocumented feature. But if Octopus will not take into account different channels for retention policy, then channels are totally worthless for me :frowning:

How to solve problem? I wan’t that retention policy is taken independently for each channel releases.

Hi Valdis,

Thanks for getting in touch! I cannot replicate this behaviour. I have two channels, and I had my retention set to 1 and I couldn’t get it to delete one channel that was very behind the versions of the other channel. Please see my screenshots. As you can see from the retention task, it treats all channels as individual projects and has two listings for Super Awesome Project keeping 1 release in prod independent of each other.

Are you able to give me specific instructions on how to replicate this? Could the delete have happened in some other way? Can you check from either the tasks or audit log? What version are you using? (I don’t believe we changed this since the release of the feature, but I would like to test on your version).

Let me know what you find!
Vanessa

Hi!

I will try to figure out from logs what actually was done and come back.

Hi!

Seams that I was wrong. Sorry. Problem is closed everything works as expected.

Hi Valdis,

Great to hear it!

Vanessa

Hi,

I’m having the same issue. Compared to your screenshots I use a different lifecycle for each channel. Could that be a problem?

Best regards,

Maarten

Hi Maarten,

It shouldn’t. Could you send me through a retention policy log to have a look to see what might be going on?
Feel free to email it to support at octopus dot com if you prefer.

Vanessa

Hi Vanessa,

I just have send an e-mail to support. I will report the outcome here when someone else is having the same issue.

Best regards,

Maarten

Hi,

After contacting the support desk, Vanessa explained that I could create a variable Octopus.Tentacle.CurrentDeployment.RetentionPolicySubset with the value #{Octopus.Release.Channel.Id

As she explained: This will group your deployments by channel ID for where they use the same package ID

So if someone else is facing this issue, this works :slight_smile:

Hi,

Unfortunately I have the same issue on Octopus 3.3.20. Our configuration are following:
Channel: A, Lifecycle: Test
Channel: B, Lifecycle: Test
Policy retention: keep one release
When I make deploy for channel A with release A during at last step of retention policy for some reason it removes releases from B channels.