Retention Issue on 1st Phase in lifecycle

Good Day

I am having a problem with retention settings not being applied correctly to a specific phase.

We are on Octopus Deploy 2.6.3.886

My lifecycle setup is as follow:

Phase 1 Test
Phase 2 Production

Default retention policy = Keep 5 Releases, Keep 5 Files on Tentacles

Phase 1 policy = Keep 3 Releases, Keep 3 Files on Tentacles
Phase 2 policy = Keep 3 Releases, Keep 3 Files on Tentacles

Our tentacles are configured as Listening Tentacles & our Deploy NuGet steps as : “Octopus Server will download the package, then securely upload it to the Tentacles.” (This is due to deployment over VPN Connections)

When deploying to Phase 1 and checking the DeploymentJournal, the variables are as follow:
RetentionPolicyDaysToKeep=“0” RetentionPolicyItemsToKeep=“5”

When Deploying to Phase 2 the DeploymentJournal variables look as follow:
RetentionPolicyDaysToKeep=“0” RetentionPolicyItemsToKeep=“3”

It seems like the overriding of the Retention Policy in the 1st Phase in a lifecycle doesn’t seem to apply correctly.
I noticed this since our default retention policy was on “Keep All” but I managed to figure out the workaround by changing the default which then luckily applies to the 1st phase.

Please let me know if you require any more information.

Kind Regards

Deon Fouché

Hi Deon,

Thanks for reaching out. Between 2.6.3.886 and the latest 2.6 build (2.6.5.1010) we fixed a couple of bugs around retention policies that might be related to your situation. Would it be possible for you to upgrade to 2.6.5.1010?

Thanks,

Dalmiro

Thank you so much for your prompt response Dalmiro.

I spoke to my colleagues and we are due for a release in 2 weeks so they are a bit nervous to do an upgrade on Octodeploy at this stage but we will confirm this tomorrow.

I will return with an answer whether this has been sorted as soon as we have upgraded.

Once again thank you for your response.

Regards

Deon Fouché

Hi Deon - No problem! Let me know how it goes after the upgrade.

Good Day Dalmiro

We have now upgraded to Octopus Deploy 2.6.5.1010 and unfortunately the problem still persist.

I have deleted the DeploymentJournal & did a reset on the Retention Policy on my 1st phase and re-applied the Items to keep = 3 with override policy and created a new release of our product but once again the result in the newly created DeploymentJournal is as follow: RetentionPolicyItemsToKeep=“5”

Any Advise?

See pictures attached.

Phase1.PNG

Hi Deon,

I was able to reproduce this in 2.6. I’m gonna bring it up to the team and give you an update about this first thing on monday.

Thanks,

Dalmiro

Hi Deon,

We’ll need to investigate this!

I’ve reopened an issue in GitHub related to this issue so you can see our progress: https://github.com/OctopusDeploy/Issues/issues/1456.

Thanks,
Damo

Thank you Dalmiro

Hi Deon,

I’ve submitted a new Issue in github to have this fixed. You can follow its progress here https://github.com/OctopusDeploy/Issues/issues/1833

Please keep in mind that we will be fixing this issue for Octopus 3.0 only. We wont be making changes to 2.6, so the only way to get the fix will be to upgrade to 3.0

Regards,

Dalmiro