Unexpected variable scoping in 1.1.1.1394

We upgraded from v1.0.31.1366 to v1.1.1.1394 and hadn’t made any project-level config changes, and we hadn’t made any modifications to the roles that v1.1.1.1394 assigned to our machines.

After the upgrade (and no config changes), we deployed a project and noticed instances where variables with a machine-level constraint were not assigned as we would have expected, and they were not assigned as they had been in deployments prior to our upgrade.

In one instance (project variables and the deployment log attached), we’d intended our variable “EnvironmentName” to be applied specifically to a subset of machines, and not to be defined for all other machines. The deployment log indicates that the variable has been applied to a machine we had not specified.

Is it possible the machine-level constraint is being ignored?

When we added a role-level constraint, to accompany the machine-level constraint, we were pleased that in deployments of a subsequent Release, the variable was not applied to machines we had not specified.

We thought we would need to apply this change (adding a role-level constraint) to the variables that had had only machine-level constraints, in order to ensure the variables would be assigned consistent with the pre-upgrade deployments. So that’s what we did.

Does our approach sound reasonable? Are there other cases we might have overlooked?

Thanks.

variablesAtDeploymentTime.png

I can confirm that variables per machines are not applied when creating a release.

In my case, I’ve removed duplication of machines per environment, since now a machine can go in multiples environment. I’ve also changed variables to use this unique machine.

In first screenshot, you can see that that for a specific machine, we deploy on D drive.
In the second screenshot, variables are copied but machine is missing.

So the tentacle use first variable (C drive) even on machine “A”

02.png

For now, I’ve applied roles, which seems to work, for new releases.

We realized that we didn’t upgrade any tentacles to 1.1 before reporting this problem, so that may explain why machine-scoped variables stopped working as expected. However, we’ve now modified our projects to work around the issue so it will be difficult to confirm if this is the case.

Hi all,

Thanks for letting me know about this. The problem was that when a release is created, we take a “snapshot” of the variables for the release. I’d tested that machine-scoped variables worked on releases created prior to the upgrade, but hadn’t tested them when new releases are created after the upgrade. As Thomas discovered, the machine property wasn’t being included in that snapshot. I’ve added a test and fixed the bug and it will be in the next release.

Paul