Variable set question

What happens when two variable sets have the same variable but with different values and both sets are included in the current scope? How does Octopus handle the collision of like named variables across variable sets?

Hi,

We try to resolve the variables based on scope (e.g., a variable scoped to the current environment is more applicable than one without any scope). Variables defined in the project are higher priority than those from library variable sets.

For a variable defined with the same scope and same name in two different variable sets, the result is not deterministic - i.e., it’s like running a “SELECT” query in SQL Server without an order-by clause. The values may come in a specific order but the system provides no guarantee. At a guess it will probably be based on the order that the variable sets are included, or maybe by their ID’s - I’m really not sure and even if I was you probably shouldn’t rely on it :slight_smile:

Hope that helps!

Paul