Self-referencing variables may be created without validation warning

It is possible to create self-referencing variables without receiving any validation warning.
For example, create a variable named “Test” and set the value to “#{Test}”.

Ideally, a validation warning should be displayed and it is should not be possible to save.

The consequence of allowing self-referencing variables is that the issue can go undetected until a deployment is attempted. In my case, this issue went undetected until a production deployment was attempted because we had a self-referencing variable which was scoped just for production deployments.

Example error message when deployment attempted:
An attempt to parse the variable symbol “Test” appears to have resulted in a self referencing loop (Test -> Test). Ensure that recursive loops do not exist in the variable values.

Hi,

Thanks for getting in touch! I’ve been able to reproduce this behavior causing a self referencing loop on deployment. We introduced a variable preview feature in 2018.3.0 where, prior to deploying, you can see how the variables will evaluate on deployment. Using this feature, you can catch the self referencing loop issue beforehand, as shown below.

I think this would also be a great enhancement request on our UserVoice site! This is the main avenue we consult when considered features/enhancements like this based on community support.

https://octopusdeploy.uservoice.com/

I hope this helps! Don’t hesitate to reach out if you have any further questions or concerns going forward. :slight_smile:

Kind regards,

Kenny

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.