ArielGlenn has submitted this change and it was merged. Change subject: precise 2014.7.5 continue reading events even after getting one with wrong tag ......................................................................
precise 2014.7.5 continue reading events even after getting one with wrong tag the event polling loop should return None if no events are available, the event if we find one we 'subscribed' to (has a matching tag), or keep reading if we got an event intended for another client. Previously it returned None on reading an event with the wrong tag; this caused the salt cli script to stop listening for minion returns early. This bug has been fixed in 2015.8.x due to a refactoring of the code. Change-Id: I04494a0a53baa11b49e88b49ea289c0bca01c71b --- A debian/patches/event_reading_returns_prematurely_WMF.patch M debian/patches/series 2 files changed, 36 insertions(+), 0 deletions(-) Approvals: ArielGlenn: Verified; Looks good to me, approved diff --git a/debian/patches/event_reading_returns_prematurely_WMF.patch b/debian/patches/event_reading_returns_prematurely_WMF.patch new file mode 100644 index 0000000..cd5d882 --- /dev/null +++ b/debian/patches/event_reading_returns_prematurely_WMF.patch @@ -0,0 +1,35 @@ +Description: Continue reading events after reading one with wrong tag +Author: Ariel T. Glenn <[email protected]> +Forwarded: no +--- a/salt/client/__init__.py ++++ b/salt/client/__init__.py +@@ -808,11 +808,11 @@ + if HAS_ZMQ: + try: + raw = event.get_event_noblock() +- if (raw and (raw.get('tag', '').startswith(jid) or +- any([raw.get('tag', '').startswith(tag) for tag in tag_search]))): +- yield raw +- else: ++ if not raw: + yield None ++ elif (raw.get('tag', '').startswith(jid) or ++ any([raw.get('tag', '').startswith(tag) for tag in tag_search])): ++ yield raw + except zmq.ZMQError as ex: + if ex.errno == errno.EAGAIN or ex.errno == errno.EINTR: + yield None +@@ -820,10 +820,10 @@ + raise + else: + raw = event.get_event_noblock() +- if raw and raw.get('tag', '').startswith(jid): +- yield raw +- else: ++ if not raw: + yield None ++ elif raw.get('tag', '').startswith(jid): ++ yield raw + + def get_iter_returns( + self, diff --git a/debian/patches/series b/debian/patches/series index ac37b55..4427e49 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,3 +5,4 @@ missing_locale_dir make-log-file-group-readable.patch batch_returns_bad_dict_WMF.patch +event_reading_returns_prematurely_WMF.patch -- To view, visit https://gerrit.wikimedia.org/r/260569 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I04494a0a53baa11b49e88b49ea289c0bca01c71b Gerrit-PatchSet: 1 Gerrit-Project: operations/debs/salt Gerrit-Branch: precise Gerrit-Owner: ArielGlenn <[email protected]> Gerrit-Reviewer: ArielGlenn <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
