I have a single variable with two different values for the same environment, one is ‘true’ and the other asks for a prompted value from the dropdown menu. The ‘true’ value is scoped to our prod environment and to all of the tenants that are officially live in prod. The other prompted value is scoped only to our prod environment.
The thought behind this design is that clients that are scoped to this value should get the ‘true’ value when deployed to prod while all other clients that aren’t scoped to ‘true’ get the prompted value. That’s the design but it hadn’t been working as expected per the guidelines listed in this article. https://octopus.com/docs/deployment-process/variables/scoping-variables#Scopingvariables-Scopespecificity
This article says that a tenant tag is more specific than an environment when used for scoping a variable. Based on that, I would expect my variable to behave differently than it is now.
We are running Octopus 2018.8.8
I have attempted to reproduce your scenario but it appears to be working as expected. To demonstrate:
I have two tenants, Bob and Steve and Steve has the RED tag
I then have a variable for Dev, where tenants with the RED tag are given True and otherwise a prompted value is used
When I go to deploy the release, I select both Bob and Steve and I provide the prompted variable value
As expected, Steve has the hard coded true
And Bob has the value I provided
If this is not the scenario you are doing, could you please provide some more details and/or screenshots. It looks like its working as expected, but I never like to rule out the chance of a bug.
Thanks in advance for the extra information,
Thanks for the quick reply! Here is what I am seeing with screenshots.
The library variable set variable in question (the Required checkbox is not checked; couldn’t fit it in the screenshot):
The Tenant’s config:
Here’s what I’m seeing when I try to deploy for Acme:
Is the same as when I try to deploy for another client:
Trying to deploy Acme without providing that variable prompt fails the deploy:
Even the variable preview shows it should be picking up the value correctly:
Strange behavior based on what we’re seeing.
It seems like the bug was related to adding a tenant tag to the variable and then it prompting for that variable whether the client was scoped to the prompt value or not. Choosing any value for the prompt resulted in the client getting whatever was scoped to it but the prompt always seems to show up.
We found a workaround to add a tag to the tenant and then scope that tag to the non-prompted value. Then we set a default value for the prompt so that whoever does a deploy won’t have to manually select a value if they don’t need to set it to true. Either way, those clients receive the true value if they have the correct tag, even with the prompt showing defaulted to false.
I’m fine with archiving this case if you guys can’t reproduce it.
Thanks for getting back to me, my apologies for not replying back sooner.
I’m glad to hear your work around is currently doing the job. I’ll add this to the backlog to see if we can’t find a better way to deal with cases where the prompt isn’t actually needed. It might be just a matter of adding some comments in the UI… Something to discuss with our UX guys and gals anyway.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.