Step template update clears all input data

Hi guys, running 3.4.2, but this may have been present some time ago.

I just tried to update some step template input parameters to rename the variable name but when I go on a project page and click the update button, all my input for that step is cleared.

This template is used more than 200 times and I cannot even access my previous step definitions(hidden by the update button) to copy paste the input.

Who do I solve this other than making a DB restore and live with my template as it used to be?

Hi Arnaud,

Thanks for getting back! Sorry for the late reply here, I spend some time replicating this and asking around if there are any options available for restoring this data.

Upon talking to the devs, we noticed that changing the variable in the step template then updating the step breaks the connection to the existing data in the deployment process as a new variable is created, thus a new ID is generated.
On my machine, I changed the variable name and confirmed that it cleared the data in the step after I updated. However, if I changed the variable name back to the original name before I update the step it will retain the data in the step.

This is the way that the variable system has been designed in Octopus and unfortunately there is not too much we can do to stop this happening, perhaps a text wall can be added to notify anyone who wants to change the variables that it will drop the data from all steps that use it.

The only option to recover this data is to change the step template variable back to the original variable name before you click update in the step.

Let me know how you go.

Regards,
Daniel

Hi Daniel, thanks for the feedback.

Sounds like at least there is a way to recover, but to be honest this means that the added value of step templates is much lower than I though previously since the more you use them the more you get the risk to incur a HUGE penalty if for any reason you have to update them.

Hi Arnaud,

Sorry for the late reply here. After talking to our devs, they have informed me that changing the variables to keep their data after being edited would be extremely difficult and time consuming. As an alternative, we will look at adding some text or a warning to notify users that changing the variable name will clear all stored data for that variable in your projects.

Thank you for pointing this out to us, hopefully we can avoid this happening in the future to someone else.

Regards,
Daniel