{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/34803","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/34803/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/34803/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/34803/events","html_url":"https://github.com/saltstack/salt/pull/34803","id":166474280,"number":34803,"title":"salt/state.py: set `chunk['order'] = 0' with `order: first'; fixes #24744","user":{"login":"junovitch","id":2576974,"avatar_url":"https://avatars.githubusercontent.com/u/2576974?v=3","gravatar_id":"","url":"https://api.github.com/users/junovitch","html_url":"https://github.com/junovitch","followers_url":"https://api.github.com/users/junovitch/followers","following_url":"https://api.github.com/users/junovitch/following{/other_user}","gists_url":"https://api.github.com/users/junovitch/gists{/gist_id}","starred_url":"https://api.github.com/users/junovitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junovitch/subscriptions","organizations_url":"https://api.github.com/users/junovitch/orgs","repos_url":"https://api.github.com/users/junovitch/repos","events_url":"https://api.github.com/users/junovitch/events{/privacy}","received_events_url":"https://api.github.com/users/junovitch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-20T01:21:36Z","updated_at":"2016-07-20T01:22:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/34803","html_url":"https://github.com/saltstack/salt/pull/34803","diff_url":"https://github.com/saltstack/salt/pull/34803.diff","patch_url":"https://github.com/saltstack/salt/pull/34803.patch"},"body":"### What does this PR do?\r\nFixes behavior of 'order: first' (explain in further detail in the commit message and below)\r\n\r\n### What issues does this PR fix or reference?\r\n#24744 and the later (closed) #26278\r\n\r\n### Previous Behavior\r\nExplained in commit message.\r\n\r\n### New Behavior\r\nFirst goes first :)\r\n\r\n### Tests written?\r\n\r\nNo. Tested manually before removing the debug logging and committing.\r\n\r\n### Commit Message\r\n\r\nsalt/state.py: set chunk['order'] = 0' withorder: first'; fixes #24744\r\n\r\nCurrently the `order: first' keyword executes later states without order\r\noptions. Consider a test case such as:\r\n\r\n```SaltStack\r\nsleep 1:\r\n  cmd.run:\r\n    - order: first\r\nsleep 2:\r\n  cmd.run\r\nsleep 3:\r\n  cmd.run\r\nsleep 4:\r\n  cmd.run:\r\n    - order: last\r\n```\r\n\r\nThe contents of each chunk dictionary at runtime show that the 'first' state\r\nis not evaluated to 'first'.\r\n\r\n{'name': 'sleep 4', 'state': 'cmd', '__id__': 'sleep 4', 'fun': 'run', '__env__': 'base', '__sls__': u'test', 'order': 1010100}\r\n{'name': 'sleep 2', 'state': 'cmd', '__id__': 'sleep 2', 'fun': 'run', '__env__': 'base', '__sls__': u'test', 'order': 10000}\r\n{'name': 'sleep 3', 'state': 'cmd', '__id__': 'sleep 3', 'fun': 'run', '__env__': 'base', '__sls__': u'test', 'order': 10001}\r\n{'name': 'sleep 1', 'state': 'cmd', '__id__': 'sleep 1', 'fun': 'run', '__env__': 'base', '__sls__': u'test', 'order': 10100}"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/233813398","html_url":"https://github.com/saltstack/salt/pull/34803#issuecomment-233813398","issue_url":"https://api.github.com/repos/saltstack/salt/issues/34803","id":233813398,"user":{"login":"junovitch","id":2576974,"avatar_url":"https://avatars.githubusercontent.com/u/2576974?v=3","gravatar_id":"","url":"https://api.github.com/users/junovitch","html_url":"https://github.com/junovitch","followers_url":"https://api.github.com/users/junovitch/followers","following_url":"https://api.github.com/users/junovitch/following{/other_user}","gists_url":"https://api.github.com/users/junovitch/gists{/gist_id}","starred_url":"https://api.github.com/users/junovitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junovitch/subscriptions","organizations_url":"https://api.github.com/users/junovitch/orgs","repos_url":"https://api.github.com/users/junovitch/repos","events_url":"https://api.github.com/users/junovitch/events{/privacy}","received_events_url":"https://api.github.com/users/junovitch/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T01:22:33Z","updated_at":"2016-07-20T01:22:33Z","body":"Open against 2015.8 per @cachedout in https://github.com/saltstack/salt/pull/34769. Should be a clean merge forward to 2016.3 and develop."}}
{"actor":{"display_login":"junovitch"}}