New issue
Advanced search Search tips

Issue 666540 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature

Blocking:
issue 621599



Sign in to add a comment

[W3C auto-import] If an exportable-but-not-exported commit in LayoutTests/imported exists, abort import.

Project Member Reported by qyears...@chromium.org, Nov 17 2016

Issue description

The logic to get commits that are exportable but not exported should already exist as part of the export script (see  bug 657117 ).

When importing, if there are any commits that are exportable but not exported, the import could be aborted in order to avoid clobbering exportable commits (as discussed). 
 

Comment 1 by foolip@chromium.org, Nov 22 2016

Any takers for this? Should it be blocked on some refactoring?
I'd be happy to do this after coming back from Thanksgiving travelling :-)

AFAIK, the relevant functions are currently:
 - LocalWPT.most_recent_chromium_commit: right now this returns a pair of WPT commit hash and ChromiumCommit.
 - ChromiumWPT.exportable_commits_since: This returns a list of exportable commits since some commit.

These are combined in sync_wpt.py:

    wpt_commit, chromium_commit = local_wpt.most_recent_chromium_commit()
    ...
    exportable_commits = chromium_wpt.exportable_commits_since(chromium_commit.sha)

    if exportable_commits:
        ...

One possible (but non-blocking) refactoring would be to extract a function exportable_but_not_exported_commits or something like that.

Either way, I expect that this change will involve changing deps_updater.py so that it uses these.

One useful refactoring that should probably be done first would be to to use LocalWPT in DepsUpdater and replace the current logic for getting a checkout of web-platform-tests.

Comment 3 by foolip@chromium.org, Nov 28 2016

Owner: qyears...@chromium.org
Status: Assigned (was: Available)
Sounds good, assigning to you to confirm :)
Summary: W3C auto-import: If an exportable-but-not-exported commit in LayoutTests/imported exists, abort import. (was: W3C auto-import: If an exportable but not exported exists, abort import.)
Summary: [W3C auto-import] If an exportable-but-not-exported commit in LayoutTests/imported exists, abort import. (was: W3C auto-import: If an exportable-but-not-exported commit in LayoutTests/imported exists, abort import.)
Components: Blink>Infra>Predictability
Components: -Blink>Infra
exportable_commits_since is now in test_exporter.py -- which makes sense, although it might be good if the importer and exporter don't depend on each other, in which case it might make sense to move the function to a common module used by both importer and exporter...
Do you want to create a separate issue for creating a module both can depend on?
No need, that change should be associated with this bug. I was thinking of doing that tomorrow hopefully :-)
Project Member

Comment 11 by bugdroid1@chromium.org, Jan 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5a067632aa54e3ac8c068778e7043cbc19b48121

commit 5a067632aa54e3ac8c068778e7043cbc19b48121
Author: qyearsley <qyearsley@chromium.org>
Date: Fri Jan 20 22:46:01 2017

Move exportable_commits_since to webkitpy/w3c/common.py.

Purpose: This is a refactoring CL to make it easier to use exportable_commits_since in order to abort if there are exportable and not exported commits when importing.

BUG= 666540 

Review-Url: https://codereview.chromium.org/2648783004
Cr-Commit-Position: refs/heads/master@{#445194}

[modify] https://crrev.com/5a067632aa54e3ac8c068778e7043cbc19b48121/third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_commit.py
[modify] https://crrev.com/5a067632aa54e3ac8c068778e7043cbc19b48121/third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_commit_unittest.py
[add] https://crrev.com/5a067632aa54e3ac8c068778e7043cbc19b48121/third_party/WebKit/Tools/Scripts/webkitpy/w3c/common.py
[add] https://crrev.com/5a067632aa54e3ac8c068778e7043cbc19b48121/third_party/WebKit/Tools/Scripts/webkitpy/w3c/common_unittest.py
[modify] https://crrev.com/5a067632aa54e3ac8c068778e7043cbc19b48121/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py
[modify] https://crrev.com/5a067632aa54e3ac8c068778e7043cbc19b48121/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt.py
[modify] https://crrev.com/5a067632aa54e3ac8c068778e7043cbc19b48121/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter.py
[modify] https://crrev.com/5a067632aa54e3ac8c068778e7043cbc19b48121/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py

Project Member

Comment 12 by bugdroid1@chromium.org, Jan 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/15da4792dd9356efe3ce47f101956bcfe6f3638b

commit 15da4792dd9356efe3ce47f101956bcfe6f3638b
Author: qyearsley <qyearsley@chromium.org>
Date: Fri Jan 27 03:45:56 2017

In WPT importer, abort if there are exportable-but-not-yet-exported commits.

In this CL:
 - In importer main method, check for exportable but not yet exported commits, and if there are any, print an error message and abort.
 - In order to put this in the main method, this CL also changes it so that checking out the repo is done in the main method.
 - There are also a couple places where variables are renamed, in order to try to improve clarity.

BUG= 666540 

Review-Url: https://codereview.chromium.org/2655183002
Cr-Commit-Position: refs/heads/master@{#446579}

[modify] https://crrev.com/15da4792dd9356efe3ce47f101956bcfe6f3638b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/common.py
[modify] https://crrev.com/15da4792dd9356efe3ce47f101956bcfe6f3638b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/local_wpt.py
[modify] https://crrev.com/15da4792dd9356efe3ce47f101956bcfe6f3638b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
[modify] https://crrev.com/15da4792dd9356efe3ce47f101956bcfe6f3638b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py

Status: Fixed (was: Assigned)
In theory this should be fixed now, but before closing this I'd like to verify in practice ... next time there's an exportable commit committed in Chromium we can try to run wpt-import real quick to see whether it aborts as it should.
Confirmed that this works with https://build.chromium.org/p/chromium.infra.cron/builders/w3c-test-autoroller/builds/7903, but the logging isn't very helpful; uploaded CL https://codereview.chromium.org/2665463003 to improve logging.
Project Member

Comment 16 by bugdroid1@chromium.org, Jan 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7288124e6c7c52f9c55d684d657f1fd2df0ea1e3

commit 7288124e6c7c52f9c55d684d657f1fd2df0ea1e3
Author: qyearsley <qyearsley@chromium.org>
Date: Sun Jan 29 04:18:59 2017

W3C test importer: Clean up temp repo after abort.

After running wpt-import when there are exportable-but-not-exported
commits, I noticed that the wpt repo isn't automatically cleaned up,
but it should be.

BUG= 666540 

Review-Url: https://codereview.chromium.org/2665503003
Cr-Commit-Position: refs/heads/master@{#446935}

[modify] https://crrev.com/7288124e6c7c52f9c55d684d657f1fd2df0ea1e3/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
[modify] https://crrev.com/7288124e6c7c52f9c55d684d657f1fd2df0ea1e3/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py

Components: Blink>Infra>Ecosystem
Components: -Blink>Infra>Predictability

Sign in to add a comment