Deleting packages with variable IDs

We have bumped into the issue described here:
http://help.octopusdeploy.com/discussions/problems/40856-packages-not-being-deleted

I would just like to follow up on this with a question. If I understand correctly, the idea is that we don’t want to clean up packages which may be included in a release. But it I look at the releases in the system, they do have the exact package names (variables are resolved) in the release itself. Isn’t that enough to determine whether a package is still used by a release?

Hi Ryan,

Thanks for getting in touch! Are you referring to use in step templates or standard steps and looking at release history?
We made it so if a step template is used and the value is given at step level these are now correctly cleaned up.

If you still have variables on the process itself, it isn’t that we cant figure out what was used - it is that we don’t know what could be used.
At deployment time variables are evaluated, and while those releases might have a package listed, that could change for any new deployment. Your variables might change depending on a prod scoping for a package that has not yet been used, and we would clean that up.

If that doesn’t make sense or you have further questions let me know.
Please feel free to provide examples of your step, and the release page you are talking about, feel free to get specific :wink:
Vanessa

I understand - we currently find the package with a variable in the name. The variable is based directly on the Channel. If we changed the name of the package to directly use the channel (which doesn’t change based on environment) would this be enough to fix the issue?

Hi Ryan,

I want to run some tests on this. So I understand completely do you mean have a package ID in the step such as #{Octopus.Channel.Name}-mypackage ormychannel-mypackage`.

Vanessa

At the moment, we actually have a variable which maps to the channel 1:1 (we needed this to change the capitalization and formatting). But we could move to directly using the channel name, as you mentioned above:
#{Octopus.Channel.Name}-mypackage
if it would solve the cleanup issue for us.

Hi Ryan,

I managed to convince a dev that this should be achievable and we created an issue you can track here: https://github.com/OctopusDeploy/Issues/issues/3829

Vanessa

That’s excellent news! I thought that it might have gotten forgotten. Thank you!