Removing a Role Breaks Variable Scoping

We have been cleaning up our roles as we improve our infrastructure and app deployments. We had some roles that we found we no longer needed so we removed them from all our machines. However, we were using those roles to scope some variables. It seems that when the role is removed from all machines there is still some phantom scope on the variables that were using those roles.

We are using Octopus 3.4.5

Steps to reproduce:

  1. Create a role on a machine
  2. Create a variable scoped to that role
  3. Remove the role from all machines

Expected behavior:
The scope is removed from any variables using the role that was removed

Actual Behavior:
The scope is removed but not in a good way. See the attached image. There still seems to be some scope association with a “blank” role. Note the barely visible X icon to remove it in the image. The problem is that because it has the phantom role the variable will not be applied anywhere and default values will probably be used.

Phantom_Role.PNG

Hi Rudy,

Thanks for getting in touch and reporting this.

This is a known UI bug and we have an open GitHub issue here. I’ve added your report to this issue.

As a workaround for the time being, for any variables scoped to these phantom roles, you can click the little grey X button to remove them, then save your variables and that role will be removed.

Hope this helps. Sorry there’s no fix for this issue as yet.

Cheers
Mark