{"action":"created","issue":{"url":"https://api.github.com/repos/screwdriver-cd/config-parser/issues/89","repository_url":"https://api.github.com/repos/screwdriver-cd/config-parser","labels_url":"https://api.github.com/repos/screwdriver-cd/config-parser/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/screwdriver-cd/config-parser/issues/89/comments","events_url":"https://api.github.com/repos/screwdriver-cd/config-parser/issues/89/events","html_url":"https://github.com/screwdriver-cd/config-parser/pull/89","id":492971267,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE3MDQxMDM2","number":89,"title":"fix: Should evaluate environment variables by declaration order","user":{"login":"tkyi","id":3230529,"node_id":"MDQ6VXNlcjMyMzA1Mjk=","avatar_url":"https://avatars3.githubusercontent.com/u/3230529?v=4","gravatar_id":"","url":"https://api.github.com/users/tkyi","html_url":"https://github.com/tkyi","followers_url":"https://api.github.com/users/tkyi/followers","following_url":"https://api.github.com/users/tkyi/following{/other_user}","gists_url":"https://api.github.com/users/tkyi/gists{/gist_id}","starred_url":"https://api.github.com/users/tkyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkyi/subscriptions","organizations_url":"https://api.github.com/users/tkyi/orgs","repos_url":"https://api.github.com/users/tkyi/repos","events_url":"https://api.github.com/users/tkyi/events{/privacy}","received_events_url":"https://api.github.com/users/tkyi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-09-12T18:51:18Z","updated_at":"2019-09-24T05:47:22Z","closed_at":"2019-09-13T21:32:49Z","author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/screwdriver-cd/config-parser/pulls/89","html_url":"https://github.com/screwdriver-cd/config-parser/pull/89","diff_url":"https://github.com/screwdriver-cd/config-parser/pull/89.diff","patch_url":"https://github.com/screwdriver-cd/config-parser/pull/89.patch"},"body":"## Context\r\n\r\nSometimes users override environment variables previously defined in templates. While the environment variable would be overwritten, the order in which the environment variables was evaluated stayed the same. This can cause issues if the environment variable they override depends on another variable defined in their screwdriver.yaml file.\r\n\r\n**For example:** \r\n\r\nTemplate has `[ A=, B=2 ]`\r\nShared has `[X=1, A=X]`\r\nConsequently, the order of environment variables => `[A=X, B=2, X=1]`\r\n\r\n## Objective\r\n\r\nThis PR checks if the environment variable being declared already exists. If so, it will delete it. Then it will do the merge.\r\n\r\n## License\r\n\r\nI confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.\r\n"},"comment":{"url":"https://api.github.com/repos/screwdriver-cd/config-parser/issues/comments/534399351","html_url":"https://github.com/screwdriver-cd/config-parser/pull/89#issuecomment-534399351","issue_url":"https://api.github.com/repos/screwdriver-cd/config-parser/issues/89","id":534399351,"node_id":"MDEyOklzc3VlQ29tbWVudDUzNDM5OTM1MQ==","user":{"login":"DekusDenial","id":1331106,"node_id":"MDQ6VXNlcjEzMzExMDY=","avatar_url":"https://avatars3.githubusercontent.com/u/1331106?v=4","gravatar_id":"","url":"https://api.github.com/users/DekusDenial","html_url":"https://github.com/DekusDenial","followers_url":"https://api.github.com/users/DekusDenial/followers","following_url":"https://api.github.com/users/DekusDenial/following{/other_user}","gists_url":"https://api.github.com/users/DekusDenial/gists{/gist_id}","starred_url":"https://api.github.com/users/DekusDenial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DekusDenial/subscriptions","organizations_url":"https://api.github.com/users/DekusDenial/orgs","repos_url":"https://api.github.com/users/DekusDenial/repos","events_url":"https://api.github.com/users/DekusDenial/events{/privacy}","received_events_url":"https://api.github.com/users/DekusDenial/received_events","type":"User","site_admin":false},"created_at":"2019-09-24T05:47:22Z","updated_at":"2019-09-24T05:47:22Z","author_association":"NONE","body":"yes, the intention would be ambiguous. Having a better doc will save people time and avoid situation like this. Once we explain how we process env vars among contexts, it's up to the user to interpret following the rules."}}
{"actor":{"display_login":"DekusDenial"}}