{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/19253","labels_url":"https://api.github.com/repos/saltstack/salt/issues/19253/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/19253/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/19253/events","html_url":"https://github.com/saltstack/salt/pull/19253","id":52838091,"number":19253,"title":"Refactor of evented runners (#17283)","user":{"login":"jacksontj","id":1619869,"avatar_url":"https://avatars.githubusercontent.com/u/1619869?v=3","gravatar_id":"","url":"https://api.github.com/users/jacksontj","html_url":"https://github.com/jacksontj","followers_url":"https://api.github.com/users/jacksontj/followers","following_url":"https://api.github.com/users/jacksontj/following{/other_user}","gists_url":"https://api.github.com/users/jacksontj/gists{/gist_id}","starred_url":"https://api.github.com/users/jacksontj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacksontj/subscriptions","organizations_url":"https://api.github.com/users/jacksontj/orgs","repos_url":"https://api.github.com/users/jacksontj/repos","events_url":"https://api.github.com/users/jacksontj/events{/privacy}","received_events_url":"https://api.github.com/users/jacksontj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":32,"created_at":"2014-12-24T21:56:05Z","updated_at":"2015-01-02T16:51:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/saltstack/salt/pulls/19253","html_url":"https://github.com/saltstack/salt/pull/19253","diff_url":"https://github.com/saltstack/salt/pull/19253.diff","patch_url":"https://github.com/saltstack/salt/pull/19253.patch"},"body":"This is a refactor of #17283 (tangentially related to #9444 since we had some discussion in there) to avoid most of the code duplication-- since we now have async client mixins.\r\n\r\nI'm still not sure about the __progress__ global, since it is *very* specific, but I'm not sure having someone having to write out something like:\r\n```\r\n__jid_event__.fire_event({'data': 'Runner is {0}% done'.format(i), 'outputter': 'pprint'}, 'progress')\r\n```\r\nIs any better than just \r\n\r\n```\r\nevent.fire_event({'data': 'Runner is {0}% done'.format(i), 'outputter': 'pprint'}, 'progress', base=__tag__)\r\n```\r\n\r\nSo in addition to the __progress__ global I've added __jid__, __user__, __tag__, and __jid_event__.\r\n\r\nAs part of that the \"low\" func now creates a JID and events for all calls to it (so we are consistent). All of these are specific to each execution. __jid_event__ is a new class called \"NamespacedEvent\" which is just a wrapper to allow for people to fire events from a different base tag, in this case within the runner you could fire an event with tag \"foo\" and it would end up as \"salt/run/SOME_JID/foo\" (alternatively you could just use base=__tag__ with the regular event class (which I'm leaning towards, since this seems a bit messy)\r\n\r\n@cachedout @whiteinge \r\nPinging the 2 of you about the __progress__ object vs the Namespaced event. I'm thinking we could maybe generalize the outputter class in the runner to work for wheel and runner, and come up with some way of printing out all events within the namespace-- so people don't have to follow the strict event format from RunnerEvent (which I've removed)."},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/68541395","html_url":"https://github.com/saltstack/salt/pull/19253#issuecomment-68541395","issue_url":"https://api.github.com/repos/saltstack/salt/issues/19253","id":68541395,"user":{"login":"thatch45","id":507599,"avatar_url":"https://avatars.githubusercontent.com/u/507599?v=3","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"created_at":"2015-01-02T16:51:19Z","updated_at":"2015-01-02T16:51:19Z","body":"Our Linode account should be fixed, I updated the card"}}