{"action":"closed","issue":{"url":"https://api.github.com/repos/OctopusDeploy/Issues/issues/3882","repository_url":"https://api.github.com/repos/OctopusDeploy/Issues","labels_url":"https://api.github.com/repos/OctopusDeploy/Issues/issues/3882/labels{/name}","comments_url":"https://api.github.com/repos/OctopusDeploy/Issues/issues/3882/comments","events_url":"https://api.github.com/repos/OctopusDeploy/Issues/issues/3882/events","html_url":"https://github.com/OctopusDeploy/Issues/issues/3882","id":268254999,"number":3882,"title":"Scoping of variables for step Run Conditions is not clear","user":{"login":"TomPeters","id":1892715,"avatar_url":"https://avatars2.githubusercontent.com/u/1892715?v=4","gravatar_id":"","url":"https://api.github.com/users/TomPeters","html_url":"https://github.com/TomPeters","followers_url":"https://api.github.com/users/TomPeters/followers","following_url":"https://api.github.com/users/TomPeters/following{/other_user}","gists_url":"https://api.github.com/users/TomPeters/gists{/gist_id}","starred_url":"https://api.github.com/users/TomPeters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TomPeters/subscriptions","organizations_url":"https://api.github.com/users/TomPeters/orgs","repos_url":"https://api.github.com/users/TomPeters/repos","events_url":"https://api.github.com/users/TomPeters/events{/privacy}","received_events_url":"https://api.github.com/users/TomPeters/received_events","type":"User","site_admin":false},"labels":[{"id":509292211,"url":"https://api.github.com/repos/OctopusDeploy/Issues/labels/area/modelling","name":"area/modelling","color":"006b75","default":false},{"id":807118771,"url":"https://api.github.com/repos/OctopusDeploy/Issues/labels/feature/run-condition","name":"feature/run-condition","color":"1825af","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-10-25T03:27:33Z","updated_at":"2018-03-29T05:55:17Z","closed_at":"2018-03-29T05:55:17Z","author_association":"NONE","body":"When deploying, you have the option of deciding whether to run a step using [Run Conditions](https://octopus.com/docs/key-concepts/projects/deployment-processes#DeploymentProcesses-Conditions). \r\n\r\nThis run condition can be bound to a variable expression. In this case, the variable expression will be evaluated with a particular scope. It is not clear what this scope will be, nor is it mentioned in the docs.\r\n\r\nFor example, imagine you have a step which deploys to multiple deployment targets using roles. In this case, you might want to disable the step for some machines but not for others. You might expect that the Run Condition variable expression for this step is evaluated multiple times, once for each deployment target scope. This is not the case, it is only evaluated once for the entire step, and therefore the scope that it is evaluated with does not include a specific deployment target.\r\n\r\nSo we should make it clearer what scope is used here, and how this run condition is evaluated. This might involve updating docs. Perhaps a dry-run feature might be sufficient, because there are other places in the app that might have the same issue."}}
{"actor":{"display_login":"pawelpabich"}}