New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 671684 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 693792



Sign in to add a comment

webkit-patch rebaseline-cl: Remove dependency on Rietveld; support Gerrit

Project Member Reported by qyears...@chromium.org, Dec 6 2016

Issue description

This tool currently depends on Rietveld for several things:

 1. Listing the latest try jobs for a given CL.
 2. Listing the changed files in a given CL.

Both of the above are done using:

https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Tools/Scripts/webkitpy/common/net/rietveld.py

When Chromium switches to Gerrit code review, that module should be removed.
 
Cc: aga...@chromium.org wkorman@chromium.org qyears...@chromium.org
Status: Available (was: Unconfirmed)
Note: In the comments for https://codereview.chromium.org/2547153002:
 I said that it would be easy to remove this dependency if webkit-patch rebaseline-cl was changed to only support CLs associated with local branches.
 wkorman@ said that we could perhaps do a small survey to see how many people would be affected by that change.
Cc: kojii@chromium.org
 Issue 692607  has been merged into this issue.
Cc: -qyears...@chromium.org drott@chromium.org
Labels: -Pri-3 Pri-1
Owner: qyears...@chromium.org
Summary: webkit-patch rebaseline-cl: Remove dependency on Rietveld; support Gerrit (was: Remove dependency on Rietveld: webkit-patch rebaseline-cl.)

Comment 4 by drott@chromium.org, Feb 16 2017

What would it take to rewrite this Tools/Scripts/webkitpy/common/net/rietveld.py for gerrit? How is it becoming easier when requiring the branch being local only?

For the upcoming FreeType rebaseline, using rietveld seems slow and difficult. Gerrit might work much better.
Status: Assigned (was: Available)
Great question, I didn't fully investigate. In general, the two pieces of information that I think we want to fetch when preparing to rebaseline are (as noted in the original post): the try job status, and the list of changed files.

The public documentation (https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html) doesn't mention try job status, but that information is probably accessible via the API.

The reason why this becomes easier when requiring the branch to be local only is that `git cl try-results` can then be used to get try results, and the rebaseline tool wouldn't have to talk directly to either Rietveld or Gerrit.

I'll start working on this and continue to update this bug until it's resolved.

Comment 6 by drott@chromium.org, Feb 17 2017

Thanks, sounds great.

Comment 7 by aga...@chromium.org, Feb 17 2017

Gerrit does not provide an API for try job results. The display of try job results in Gerrit is via a plugin, which itself relies on the Buildbucket API to get the necessary data. (This is the same API that the CQ itself uses.)

Here's the code in the plugin which constructs the buildbucket query and reads the result:
https://chromium.googlesource.com/infra/gerrit-plugins/buildbucket/+/master/src/main/resources/static/cr-buildbucket-view.js#143
Status: Started (was: Assigned)
Thanks agable@, that makes sense.

So, besides using on `git cl try-results`, the other way to get try job results would involve making requests to the buildbucket API. I suspect that using git cl try-results is probably going to be easier; the only downside is that it means that rebaseline-cl would just work with local branches.

Now uploaded CL to use git cl try-results to get results: https://codereview.chromium.org/2692423005
Blocking: 693792
Project Member

Comment 10 by bugdroid1@chromium.org, Feb 19 2017

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

commit e0b4961639a9d8781023e68392847f6fe37f19d9
Author: qyearsley <qyearsley@chromium.org>
Date: Sun Feb 19 23:46:59 2017

rebaseline-cl: Get latest try jobs using git-cl when no --issue given.

This CL moves filter_latest_builds() into webkitpy.common.net.buildbot,
and adds a method latest_try_jobs to the GitCL class, which behaves like
the latest_try_jobs method currently on the Rietveld class.

The purpose of this change is to make it easier to drop dependency
on Rietveld.

BUG= 671684 

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

[modify] https://crrev.com/e0b4961639a9d8781023e68392847f6fe37f19d9/third_party/WebKit/Tools/Scripts/webkitpy/common/net/buildbot.py
[modify] https://crrev.com/e0b4961639a9d8781023e68392847f6fe37f19d9/third_party/WebKit/Tools/Scripts/webkitpy/common/net/buildbot_unittest.py
[modify] https://crrev.com/e0b4961639a9d8781023e68392847f6fe37f19d9/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl.py
[modify] https://crrev.com/e0b4961639a9d8781023e68392847f6fe37f19d9/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py
[modify] https://crrev.com/e0b4961639a9d8781023e68392847f6fe37f19d9/third_party/WebKit/Tools/Scripts/webkitpy/common/net/rietveld.py
[modify] https://crrev.com/e0b4961639a9d8781023e68392847f6fe37f19d9/third_party/WebKit/Tools/Scripts/webkitpy/common/net/rietveld_unittest.py
[modify] https://crrev.com/e0b4961639a9d8781023e68392847f6fe37f19d9/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl.py
[modify] https://crrev.com/e0b4961639a9d8781023e68392847f6fe37f19d9/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py

Labels: Proj-Gerrit-Migration
Update: next proposed change: https://codereview.chromium.org/2700283002

Meanwhile, in theory, using Gerrit should work now as long as you don't use the --issue or --only-changed-tests flags.
Status: Fixed (was: Started)
I believe that rebaseline-cl should now not depend on Rietveld; https://chromium-review.googlesource.com/c/444189/ is the first real test-case.

More work needs to be done for w3c-test-autoroller to stop depending on Rietveld though ( bug 693792 ).

Sign in to add a comment