Investigate robustness of the Chromium commit -> PR lookup process and consider adding safety net |
|||
Issue descriptionIn issue 748876 , we experienced the case that WPTGitHub.pr_for_chromium_commit mistakenly linked a random commit with an open pull request (because the pull request has an incorrect commit position that matches the commit), and hence merged the PR assuming the corresponding CL was reviewed and submitted. The immediate fix is issue 737178 , which removes commit positions from PRs generated from in-flight CLs, as they are simply ToT+1 but not the final commit positions. This would prevent premature merging in the exact same scenarios, but after discussion with foolip@, there might be still some open questions: How reliable is the change ID? Are they globally unique, and, once created cannot be changed? Is it possible to land a change without a change ID (except via Rietveld)? And shall we implement some kind of safeguards for the lookup process, like comparing the messages and/or lists of files, and failing loudly when things don't look right?
,
Aug 9 2017
,
Aug 9 2017
I found the Gerrit document on change-ID: https://gerrit-review.googlesource.com/Documentation/user-changeid.html So the change ID is guaranteed to be unique in a branch. In our case, we only care about chromium master, so we should be good. Besides, I did some experiments trying to modify the change ID from command line and the web interface, both were denied by Gerrit, which is in accordance with the document that once created/generated, change IDs must stay the same. At this point, I'm pretty satisfied with the robustness of our current approach. Now that the issue regarding commit positions is fixed, it's unlikely to have the mismatch again. For now, I don't think it'd worth the effort to implement some heuristic safeguards. Closing as wontfix and we can come back later if the situation changes.
,
Aug 10 2017
Thanks for looking into this, resolution sounds good.
,
Aug 10 2017
Actually, there is still the issue of commit messages matching. If we trust the mapping fully, can we add an assert that the commit messages match exactly before merging PRs?
,
Aug 10 2017
foolip@: yes! See issue 753487 for the exact problem (and it's not just a "good-to-have", but actually a potential bug at the moment).
,
Aug 10 2017
Ah, thanks :) |
|||
►
Sign in to add a comment |
|||
Comment 1 by qyears...@chromium.org
, Aug 8 2017