jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/356181 )
Change subject: [DNM] Backport fix "Fix change number extraction on new enough Gerrit master" ...................................................................... [DNM] Backport fix "Fix change number extraction on new enough Gerrit master" Bug: T158243 Change-Id: I2308a618f8f6a99ad8985e745b2c5d74a3b6ab1e --- M debian/changelog A debian/patches/0014-fix-gerrit-2-14-support.patch M debian/patches/series 3 files changed, 53 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/debian/changelog b/debian/changelog index af4bbe4..55686fd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +zuul (2.5.0-8-gcbc7f62-wmf7) jessie-wikimedia; urgency=medium + + * Patch: "Fix change number extraction on new enough Gerrit master" + + -- Paladox <[email protected]> Mon, 15 Jan 2018 09:47:50 +0100 + zuul (2.5.0-8-gcbc7f62-wmf6) jessie-wikimedia; urgency=medium * debian/source/options ignore a few more files diff --git a/debian/patches/0014-fix-gerrit-2-14-support.patch b/debian/patches/0014-fix-gerrit-2-14-support.patch new file mode 100644 index 0000000..53c222d --- /dev/null +++ b/debian/patches/0014-fix-gerrit-2-14-support.patch @@ -0,0 +1,46 @@ +Parent: 1f3a9fa2 (Merge "Tidy up loggers") +Author: Jan Kundrát <[email protected]> +AuthorDate: 2017-02-14 17:05:11 +0100 +Commit: Jan Kundrát <[email protected]> +CommitDate: 2017-02-14 17:08:09 +0100 + +Fix change number extraction on new enough Gerrit master + +Apparently, there's been a change in recent upstream Gerrit which +changed the JSON serialization of change numbers in the output of +`gerrit stream-events`. Previously, the change number was being +transmitted as a string. That has changed and now it's being sent as a +number. That results in a failure later on: + + 2017-02-14 15:35:55,294 ERROR zuul.IndependentPipelineManager: Exception while launching job XXX for change <Change 0x7f3efc185c90 64,1>: + Traceback (most recent call last): + File "/usr/lib/python2.7/site-packages/zuul/scheduler.py", line 1520, in _launchJobs + dependent_items) + File "/usr/lib/python2.7/site-packages/zuul/launcher/gearman.py", line 318, in launch + destination_path = os.path.join(item.change.getBasePath(), + File "/usr/lib/python2.7/site-packages/zuul/model.py", line 913, in getBasePath + self.number[-2:], self.number, self.patchset) + TypeError: 'int' object has no attribute '__getitem__' + +I would love to have this extended this with a proper testcase. Please +feel free to push an updated version over this patchset, or just let me +know which place is the most appropriate and I can do it myself, too. + +Change-Id: I68f5fa7fa4fac0b4d2eb232fe37df11e57157ecf +--- + zuul/connection/gerrit.py | 2 ++++++++++++- + 1 file changed, 1 insertions(+), 1 deletion(-) + +diff --git a/zuul/connection/gerrit.py b/zuul/connection/gerrit.py +index 62891cd..ca24058 100644 +--- a/zuul/connection/gerrit.py ++++ b/zuul/connection/gerrit.py +@@ -63,7 +63,7 @@ class GerritEventConnector(threading.Thread): + if change: + event.project_name = change.get('project') + event.branch = change.get('branch') +- event.change_number = change.get('number') ++ event.change_number = str(change.get('number')) + event.change_url = change.get('url') + patchset = data.get('patchSet') + if patchset: diff --git a/debian/patches/series b/debian/patches/series index 94a014b..03f783c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -11,3 +11,4 @@ 0011-WMF-install-zuul-clear-refs.patch 0012-WMF-pin-voluptuous-0.10.patch 0013-WMF-pin-requirements-to-what-is-deployed.patch +0014-fix-gerrit-2-14-support.patch -- To view, visit https://gerrit.wikimedia.org/r/356181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2308a618f8f6a99ad8985e745b2c5d74a3b6ab1e Gerrit-PatchSet: 13 Gerrit-Project: integration/zuul Gerrit-Branch: debian/jessie-wikimedia Gerrit-Owner: Paladox <[email protected]> Gerrit-Reviewer: Chad <[email protected]> Gerrit-Reviewer: Hashar <[email protected]> Gerrit-Reviewer: Paladox <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
