[WPT import] wpt-importer exits before CLs actually land |
||||
Issue descriptionI've recently noticed that wpt-importer seems to consider a job finished as soon as it manages to CQ+2 its CL (or at some point close to that). In other words, it does not actually wait for the change to be processed and the CL to be officially closed and marked as merged. This didn't cause any troubles in the past, but changing wpt-importer to run continuously has shown that a new import job can start before the previous CL actually lands. Case in point: * https://luci-milo.appspot.com/buildbot/chromium.infra.cron/wpt-importer/578 ran just fine and finished with "All jobs finished" + "Update completed". Meanwhile, chromium_presubmit was still processing the job's respective CL before merging it. * Meanwhile, as soon as job 578 finished, https://luci-milo.appspot.com/buildbot/chromium.infra.cron/wpt-importer/579 started, and it says "Importing wpt@88f290de1d6561f27e7b1e4bde8ab21eadcd61d2 to Chromium ae419bbed497aacbd2b2d93842118eb0d49f9ebe". * Chromium revision ae419bbed497aacbd2b2d93842118eb0d49f9ebe is the one immediately preceding ebf2c7e52defa851cec0025877ec8f0e4a3909d7, which is the commit corresponding to job 578's CL. * Consequently, job 579's CL also included the changes from job 578 (the css/css-value-3 import and a change to a WebRTC test) because it was using a Chromium revision that did not incorporate that commit. * The new job (579) is currently running fine, as when the trybots apply the diff the bits which are already in are just skipped. I think everything's going to work and the duplicate changes will be removed when the CL is rebased, but it's still at least weird.
,
Aug 25 2017
Indeed, good diagnosis of what happened. Checking CL status (closed/open etc) can be done with git-cl (git cl status --field=status), and there's already waiting logic in our GitCL helper module. So I'm imagining is that in TestImporter we should have something like: self.git_cl.wait_for_closed_status() And GitCL should be refactored a bit so that we have a wait_for(func) function extracted out of the function we use to wait for try jobs to finish.
,
Aug 28 2017
,
Aug 29 2017
Two failure modes caused by this issue I've seen so far: * One CL is a subset of (including identical to) another CL, so when the subset CL is submitted after the other CL, there will be no changes and chromium_presubmit fails (empty diff). * Two parallel CLs are slightly different (usually due to MANIFEST.js), and the later cannot be submitted (all CQ bots fail because of patch error). It seems like this is happening almost every other import. Still no real harm though.
,
Aug 31 2017
I believe this was the cause of failure in https://build.chromium.org/p/chromium.infra.cron/builders/wpt-importer/builds/1000 There was a patch failure in CQ in WPT_BASE_MANIFEST.json, and only the importer itself has modified that file recently.
,
Aug 31 2017
For the record, I think these are all the failures between Monday and today caused by this: * https://luci-milo.appspot.com/buildbot/chromium.infra.cron/wpt-importer/985 * https://luci-milo.appspot.com/buildbot/chromium.infra.cron/wpt-importer/989 * https://luci-milo.appspot.com/buildbot/chromium.infra.cron/wpt-importer/992 * https://luci-milo.appspot.com/buildbot/chromium.infra.cron/wpt-importer/1000
,
Sep 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/be03d45198ac59099799e34d649494901b5b53c1 commit be03d45198ac59099799e34d649494901b5b53c1 Author: Quinten Yearsley <qyearsley@chromium.org> Date: Fri Sep 01 20:07:24 2017 Refactoring: extract a wait_for function in GitCL. Bug: 758929 Change-Id: Ie2abde17d26673d0ffe4cc3fc838acdc618307bc Reviewed-on: https://chromium-review.googlesource.com/641782 Commit-Queue: Quinten Yearsley <qyearsley@chromium.org> Reviewed-by: Philip Jägenstedt <foolip@chromium.org> Cr-Commit-Position: refs/heads/master@{#499269} [modify] https://crrev.com/be03d45198ac59099799e34d649494901b5b53c1/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl.py [modify] https://crrev.com/be03d45198ac59099799e34d649494901b5b53c1/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py
,
Sep 7 2017
,
Sep 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/132e9d718cc604db71069935a3ef77cbb93330b4 commit 132e9d718cc604db71069935a3ef77cbb93330b4 Author: Quinten Yearsley <qyearsley@chromium.org> Date: Fri Sep 15 16:56:23 2017 WPT import: wait for CL to be merged before exiting Bug: 758929 Change-Id: I7928730579079947c96783e0456539779a333a47 Reviewed-on: https://chromium-review.googlesource.com/666302 Commit-Queue: Quinten Yearsley <qyearsley@chromium.org> Reviewed-by: Philip Jägenstedt <foolip@chromium.org> Cr-Commit-Position: refs/heads/master@{#502284} [modify] https://crrev.com/132e9d718cc604db71069935a3ef77cbb93330b4/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl.py [modify] https://crrev.com/132e9d718cc604db71069935a3ef77cbb93330b4/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_mock.py [modify] https://crrev.com/132e9d718cc604db71069935a3ef77cbb93330b4/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py [modify] https://crrev.com/132e9d718cc604db71069935a3ef77cbb93330b4/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
,
Sep 15 2017
In theory this should be fixed now. |
||||
►
Sign in to add a comment |
||||
Comment 1 by foolip@chromium.org
, Aug 25 2017