Variables scoped by tenant tag showing incorrect value on machine


(Simon Lam) #1

Hello all,

I am seeing a weird issue where my variable with multiple values, each scope by a different tenant tag, have a different value than expected when I execute a script on a target.

To reproduce:

  • First create a tenant tag set - lets call this “foo” with values “fooA”, “fooB”
  • Tag some targets with “fooA” and some others with “fooB”. Ensure that no targets have both tags
  • Create a tenant call “Foo Tenant” that consists of the “foo” tag set values “fooA” and “fooB”
  • Now in the project variables or the tenant variable sets (doesn’t matter which) create a variable called “bar” with two values, “barA” scoped to tenant tag “fooA” and “barB” scoped to tenant tag “fooB”
  • Now in the deploy process print out the variable of “bar” in a script step, or just enabled OctopusPrintEvaluatedVariables
  • Create a release and deploy to the “Foo Tenant”

Now in the output I expect that the script running on the targets tagged with “fooA” will print “barA” and targets tagged with “fooB” will print “barB”. However what I have found is that they will both print out either “barA” or “barB” which is totally counterintuitive.

I’m not sure if this is a bug in the scoping rules or if this behaviour is correct but I’m not understanding how tenant tags play a role in scoping correctly.

I found this issue on a self hosted octopus install, version 2018.9.14

Thanks!

Simon


(system) closed #3

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