ArielGlenn has submitted this change and it was merged. Change subject: jessie 2014.7.5 continue reading events even after getting one with wrong tag ......................................................................
jessie 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. Revert "Revert "jessie 2014.7.5 continue reading events even after getting one with wrong tag"" This reverts commit 52b7c3f1fac1c6b34420f8b033938726b3596ea6. resubmitting to go through gerrit Change-Id: I0a0f23166b5d6669eab0a945247723b2858b6e45 --- 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/260372 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0a0f23166b5d6669eab0a945247723b2858b6e45 Gerrit-PatchSet: 2 Gerrit-Project: operations/debs/salt Gerrit-Branch: jessie Gerrit-Owner: ArielGlenn <[email protected]> Gerrit-Reviewer: ArielGlenn <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
