Presubmit scripts that add trybots don't interact well with polygerrit |
||||||||||
Issue descriptionOriginal upload: https://chromium-review.googlesource.com/c/474547/1//COMMIT_MSG Then I guess git cl upload --gerrit noticed it needed to add some additional trybots: https://chromium-review.googlesource.com/c/474547/2//COMMIT_MSG Added another one: https://chromium-review.googlesource.com/c/474547/3//COMMIT_MSG But then when I upload a new patchset: https://chromium-review.googlesource.com/c/474547/4//COMMIT_MSG After the final patchset, there are now two Change-Id: lines. I guess Polygerrit always expects to find its metadata at the end of the message, but now it's duplicated. We should make these interact better.
,
Apr 12 2017
To start off with, I'm super confused about why a) git cl upload edited the commit message to add CQ_INCLUDE_TRYBOTS at all, instead of just doing it once in the original message b) why it did so twice, six seconds apart c) why it did so over 1.5 minutes after the initial upload Like, if it just did it in the first place along with the TBR= lines and whatever else, this wouldn't be a problem. Need to do some digging into what mechanism sets that line. Unassigning from myself because, even though I'll likely be the person to do this, I can't guarantee that it is the top thing on my stack this second. I'll grab it from our launch-blocking queue as soon as I have a sec.
,
Apr 21 2017
Issue 713955 has been merged into this issue.
,
Apr 21 2017
As noted in 633572, kbr@ did the work to get the CQ_INCLUDE_TRYBOTS lines working with gerrit in the first place, so I'm asking him to look into this to see if he can easily tell why it isn't properly preserving Change-Id lines. Ken, if you can't tell what's going on, feel free to assign back to me and I'll dig in. I'm just hopeful that you have enough retained context here that it'll be much easier for you than for me.
,
Apr 24 2017
,
Apr 24 2017
I'll fix EnsureCQIncludeTrybotsAreAdded from presubmit_support.py in depot_tools so that when it adds a CQ_INCLUDE_TRYBOTS line, it does so before any Change-Id: line.
,
Apr 24 2017
https://chromium-review.googlesource.com/486083 up for review.
,
Apr 25 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/tools/depot_tools/+/df6e7348b977771d51162cb85bead08c883ca7ad commit df6e7348b977771d51162cb85bead08c883ca7ad Author: Kenneth Russell <kbr@chromium.org> Date: Tue Apr 25 20:12:11 2017 Fix addition of CQ_INCLUDE_TRYBOTS on Gerrit. BUG= 710547 Change-Id: I6558ba08683b8e010ac5051dabfd82d9a5b9c551 Reviewed-on: https://chromium-review.googlesource.com/486083 Reviewed-by: Aaron Gable <agable@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> [modify] https://crrev.com/df6e7348b977771d51162cb85bead08c883ca7ad/presubmit_support.py [modify] https://crrev.com/df6e7348b977771d51162cb85bead08c883ca7ad/tests/presubmit_unittest.py
,
Apr 25 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/tools/depot_tools/+/df6e7348b977771d51162cb85bead08c883ca7ad commit df6e7348b977771d51162cb85bead08c883ca7ad Author: Kenneth Russell <kbr@chromium.org> Date: Tue Apr 25 20:12:11 2017 Fix addition of CQ_INCLUDE_TRYBOTS on Gerrit. BUG= 710547 Change-Id: I6558ba08683b8e010ac5051dabfd82d9a5b9c551 Reviewed-on: https://chromium-review.googlesource.com/486083 Reviewed-by: Aaron Gable <agable@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org> [modify] https://crrev.com/df6e7348b977771d51162cb85bead08c883ca7ad/presubmit_support.py [modify] https://crrev.com/df6e7348b977771d51162cb85bead08c883ca7ad/tests/presubmit_unittest.py
,
Apr 25 2017
,
Apr 26 2017
This doesn't appear to completely work. From today: WARNING: appended missing Change-Id to change description remote: Processing changes: updated: 1, done remote: remote: Updated Changes: remote: https://chromium-review.googlesource.com/487882 Use web-style naming for TreeScope::getElementById remote: To https://chromium.googlesource.com/chromium/src.git * [new branch] 5bcf457ea5fc9710e315fa1f7cfa943ead36dc60 -> refs/for/refs/heads/master%m=rebase,notify=NONE
,
Apr 26 2017
The resulting commit message is in https://chromium-review.googlesource.com/c/487882/4//COMMIT_MSG
,
Apr 26 2017
Yeah. The commit message created by this code was created as expected (The CQ_INCLUDE_TRYBOTS line is right above the Change-Id line) but our expectations were wrong. https://chromium-review.googlesource.com/c/487882/2//COMMIT_MSG The problem here is that git expects footers (things of the format Foo-Bar: asdf) to be in their own paragraph. The CQ_INCLUDE_TRYBOTS line, inserted in between "Bug: " and "Change-Id: " is confusing it. It tries to parse everything in the last paragraph as a real git footer, and when it fails to do so, it decides that none of them are proper footers. So the right thing to do is to add CQ_INCLUDE_TRYBOTS in a paragraph of its own, directly above the whole block of real git footers.
,
Apr 26 2017
I've started work on this. Prerequisite: https://chromium-review.googlesource.com/c/487606/ Implementation: https://chromium-review.googlesource.com/c/487831
,
Apr 27 2017
Aaron, thanks for picking this up. I meant to do so today but was swamped.
,
Apr 27 2017
np! After reviewing your CL I had enough context to dive in pretty quickly. Will land second CL after tandrii@'s CQ-side CL lands and deploys.
,
Apr 27 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/tools/depot_tools/+/c06db440c9ed7876a401efe0b8d88f671aa61c36 commit c06db440c9ed7876a401efe0b8d88f671aa61c36 Author: Aaron Gable <agable@chromium.org> Date: Thu Apr 27 16:25:34 2017 Make git_footers.add_footer more flexible This allows inserted footers to be specified as either before or after other potentially-present footers. It has one slight behavior change (reflected in the tests): If after_keys is specified but *doesn't match* any pre-existing footers, then the behavior does *not* switch to "insert as early as possible". The behavior switch only happens if the after_keys actually match a footer. R=iannucci@chromium.org Bug: 710547 Change-Id: If557978fe9309785285056eb557acbdc87960bb2 Reviewed-on: https://chromium-review.googlesource.com/487606 Reviewed-by: Robbie Iannucci <iannucci@chromium.org> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> Commit-Queue: Aaron Gable <agable@chromium.org> [modify] https://crrev.com/c06db440c9ed7876a401efe0b8d88f671aa61c36/git_footers.py [modify] https://crrev.com/c06db440c9ed7876a401efe0b8d88f671aa61c36/tests/git_footers_test.py
,
May 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/tools/depot_tools/+/b584c4f0d1709ca5302c38c68c6a8febf3273d17 commit b584c4f0d1709ca5302c38c68c6a8febf3273d17 Author: Aaron Gable <agable@chromium.org> Date: Mon May 01 23:15:25 2017 Make CQ_INCLUDE_TRYBOTS support review-specific This CL wholly revamps the way presubmit_support adds CQ_INCLUDE_TRYBOTS lines in commit descriptions. In particular, when the CL is being uploaded to Gerrit, it uses our pre-existing support for manipulating git footers to make the whole process much simpler. R=tandrii@chromium.org Bug: 710547 Change-Id: I5858282a44c590f131021fa3820f1cb3f70ef620 Reviewed-on: https://chromium-review.googlesource.com/487831 Commit-Queue: Aaron Gable <agable@chromium.org> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> [modify] https://crrev.com/b584c4f0d1709ca5302c38c68c6a8febf3273d17/tests/presubmit_unittest.py [modify] https://crrev.com/b584c4f0d1709ca5302c38c68c6a8febf3273d17/git_footers.py [modify] https://crrev.com/b584c4f0d1709ca5302c38c68c6a8febf3273d17/tests/git_footers_test.py [modify] https://crrev.com/b584c4f0d1709ca5302c38c68c6a8febf3273d17/presubmit_support.py
,
May 1 2017
This should now be fixed. |
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by andyb...@chromium.org
, Apr 11 2017Owner: aga...@chromium.org