Rentention Confusion

Hello,
Sorry to be bothering so much. We are trying to apply some retention policies to a lifecycle test project and we are getting a little confused by the output.

As you can see from the screen shot of the task log Phase 1 has retention of 1 day and phase 2 has retention forever. This log is from this morning.

So we have the following questions:

  • 16.0.0-prerelease310 is in phase stage with policy of Last 1 day. Based on being in phase stage should this say forever?
  • This release was created yesterday and the task was run today so why do release expire after 2 days ago “Reason:… releases expire after 27/01/2015”? I have checked the rentention task logs for the last 3 days and they all have this date.
  • When is a release considered in a phase? 16.0.0-prerelease0312 has been deployed to dev in phase 1 with Any 1, but hasn’t been promoted. Is the case that a release doesn’t have to be deployed into a phase to be considered in a phase? The rentention log seems to imply this.

The last point is probably the most prudent to us. This behavior isn’t at all what we expected and could cause us a little pain. We want to be able to keep all release that go to Stage but we only want to keep a few days worth of those that go to Dev.

We have 2 environments in phase 1 for the purpose of this testing Dev, QA, UAT. The reason this is set to any 1 is for the purpose of emergency hot fixes. We don’t want to be locked in to having to deploy to every environment. However my understanding would be we could have this problem with a phase with a single environment?

2015-01-30_08_58_57-Lifecycle_Test_App_release_16.0.0-prerelease0307_-_Octopus_De.png

2015-01-30_08_59_05-Lifecycle_Test_App_release_16.0.0-prerelease0312_-_Octopus_De.png

2015-01-30_08_59_14-Lifecycle_Test_App_release_16.0.0-prerelease0311_-_Octopus_De.png

2015-01-30_08_59_24-Lifecycle_Test_App_release_16.0.0-prerelease0310_-_Octopus_De.png

Sorry hopefully this is more readable list markdown doesn’t seem to work…
So we have the following questions:

* 16.0.0-prerelease310 is in phase stage with policy of Last 1 day. 
   Based on being in phase stage should this say forever? 
* This release was created yesterday and the task was run today so why do 
   release expire after 2 days ago "Reason:... releases expire after 27/01/2015"? 
   I have checked the rentention task logs for the last 3 days and they all have this date.
* When is a release considered in a phase? 
  16.0.0-prerelease0312 has been deployed to dev in phase 1 with Any 1, but hasn't been promoted. 
  Is the case that a release doesn't have to be deployed into a phase to be considered in a phase? 
  The rentention log seems to imply this.

Hi Sean,

By default the retention policies in a Lifecycle are design to inherit from the phase above. So setting the overall policy to forever, then phase one to say keep for 3 days, then phase two will inherit from the above phase not the overall phase, but you should be able to override it. So you aren’t doing anything wrong.

So as you haven’t exactly had the days to test the policy this could be an issue in the display of the messages or it could be it’s completely broken in this scenario. The dates do look incorrect also.

As a workaround while we are playing with this, set the default policy to match phase 1, and have phase 1 use the default policy, then for phase 2 set it to forever, and see if this gives better messages about dates and which retention policy is set to where.

If you find this does not ‘resolve’ it, it would be very helpful to see the messages from the deployment from each environment, and have them named as such, as your one example does give me an idea, but it would make it a bit more obvious/clear.

Here is the issue to track: https://github.com/OctopusDeploy/Issues/issues/1456

Vanessa

Hi Vanessa,
To provide more information I have attached screen shots of the lifecycle configuration used for this test.

As you can see it makes it even more confusing because I don’t know where the 3 days has come from…

The releases seem to have been deleted over the weekend (somewhat as expected), however I don’t know when because the task logs have been deleted. Also the nupkgs haven’t been deleted from the nuget feed, however that’s another matter.

Is there a reason Octopus only keeps history for the task log for retention runs for 1 day (may even be only the last 4 runs)? It makes tracking and debugging this issue somewhat difficult.

Hi Sean,

Thanks for this, we’ll look into the issue and release a fix for it in the next week.

Paul