Can't set Tentacle release retention to 0? (v4.0.10)

andrew.timson's Avatar

andrew.timson

30 Nov, 2017 07:36 PM

Previously, we had a PostDeploy PowerShell script that would clean up all non-current releases/packages from the Tentacle's working directory. I'm looking at changing that to use the built-in Retention Policies instead.

In our v3.13.10 instance, I can set it to keep 0 releases besides current and it saves. I tried to do the same in our v4.0.10 instance where we're testing the upgrade; typing in 0 just clears the box, and saving resets it back to keeping all releases.

I have to admit that I found the screen to be confusing to start with - I didn't realize initially that the number of releases to be kept is exclusive of the current release, at least in v3.x. Was there a change to the behavior in v4.0, or is this a bug?

  1. Support Staff 1 Posted by Tom Peters on 01 Dec, 2017 05:39 AM

    Tom Peters's Avatar

    Hi,

    Thanks for getting in touch. The behaviour hasn't actually changed in v4. In v3, it appears as if you can change the number of releases retained to 0. But if you save this selection and then navigate back to it again, you'll see that it has automatically changed to "Keep All", just like in the new v4 UI.

    There is a reason why we don't allow 0 releases to be retained: This would mean that Octopus might delete a release that you have just created, but not yet deployed.

    I do appreciate your confusion around this screen. I have raised an issue here to force is to re-visit this screen and see if we can make it better.

    Regards,
    Tom

  2. 2 Posted by andrew.timson on 07 Dec, 2017 03:17 PM

    andrew.timson's Avatar

    You're right about the v3 behavior, I've discovered - it looks like it saves but when I reload it reverts to all. So v4 is actually an improvement in that regard!

    I agree that not allowing 0 for the retention policy on the Octopus server makes sense. But for the retention policy on a Tentacle, isn't 0 (keep the current deployment's files only, no prior deployments) reasonable? The Tentacle retention policy is scoped to the project, and it doesn't run until after all steps have successfully deployed, so the concern about something that hasn't been deployed doesn't seem applicable to me.

  3. Support Staff 3 Posted by Tom Peters on 08 Dec, 2017 12:06 AM

    Tom Peters's Avatar

    Hi,

    At the moment I believe the Tentacle retention policy works in a similar way to the release retention policy on the Octopus Server. That is, the number of configured releases retained on a Tentacle must be at least 1, and we would in fact retain at least 3 releases (we always retain 2 releases, plus we additionally keep however many releases you have specified).

    Once again this is a little confusing in the UI, and we will try to improve this as part of this issue.

    I can see how it would be desirable to have a Tentacle retention policy of 0 releases, as you have suggested. I also can't see any technical reason why we couldn't support this. I would recommend that you head over to our UserVoice forum and suggest this improvement.

    Regards,
    Tom

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac