Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Issue 1058893004: Rietveld schedules builds on buildbucket (Closed)

Created:
5 years, 8 months ago by nodir
Modified:
5 years, 3 months ago
Reviewers:
jrobbins, esprehn
CC:
chromium-reviews, rmistry+cc_chromium.org, sheyang
Base URL:
https://chromium.googlesource.com/infra/infra.git@master
Target Ref:
refs/heads/master
Project:
infra
Visibility:
Public.

Description

Rietveld schedules builds on buildbucket Rietveld deprecated UI now schedules builds through buildbucket instead of /edit_flags endpoint. It uses Google API JavaScript Client (gapi) to authenticate the user to Google APIs and call buildbucke.put() on their behalf. API authentication happens the first time the user tries to schedule builds: a popup windows opens asking for user's consent to share their email address with Rietveld. Then the access token is saved to cookies. This consent screen happens because API authentication and GAE authentication are separate. If user logs out and logs in with a different rietveld account, API will be authenticated with a different user by sending "login_hint" query string parameter during authentication. BuildBucket buckets have own ACLs. Users in chromium-project-tryjob-access group [1] have SCHEDULER role on master.tryserver.chromium.* buckets. The client id used to call APIs must be put into the "OwnClientId" entity with key "web". It is created on the first attempt to load any page. The client id is included in the rendered in base.html template. Then script.js uses it to call authenticate to APIs. If client id is not set, nothing will blow up, but users won't be able to schedule builds. script.js now has global "rietveld" variable and keeps global state there. The rationale is to avoid polluting global namespace. Two dependencies added: * Google API JavaScript API * ES6 Promise polyfill Instructions for deployment: * Create a new client id in Permissions page of the Developer Console * Whitelist the client id at https://chrome-infra-auth.appspot.com/auth/oauth_config * Upload a new version * Load any page * Go to Developers Console, find an existing OwnClientId entity and set its client_id property * Verify that build scheduling works [1]: https://chrome-infra-auth.appspot.com/auth/groups#project-chromium-tryjob-access R=jrobbins@chromium.org CC=esprehn@chromium.org, sheyang@chromium.org BUG=461620 COMMIT=false (CQ-BuildBucket will be verified first. Then M_scheduleBuild will be updated if needed)

Patch Set 1 : #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+226 lines, -38 lines) Patch
M appengine/chromium_rietveld/app.yaml View 1 chunk +3 lines, -0 lines 0 comments Download
M appengine/chromium_rietveld/codereview/auth_utils.py View 2 chunks +11 lines, -1 line 0 comments Download
M appengine/chromium_rietveld/codereview/buildbucket.py View 3 chunks +3 lines, -11 lines 0 comments Download
M appengine/chromium_rietveld/codereview/common.py View 1 chunk +12 lines, -0 lines 0 comments Download
M appengine/chromium_rietveld/codereview/responses.py View 2 chunks +7 lines, -0 lines 0 comments Download
M appengine/chromium_rietveld/codereview/views.py View 2 chunks +2 lines, -3 lines 0 comments Download
A appengine/chromium_rietveld/static/es6-promise/README.chromium View 1 chunk +2 lines, -0 lines 0 comments Download
A appengine/chromium_rietveld/static/es6-promise/es6-promise-2.0.1.min.js View 1 chunk +18 lines, -0 lines 2 comments Download
M appengine/chromium_rietveld/static/script.js View 6 chunks +151 lines, -21 lines 5 comments Download
M appengine/chromium_rietveld/templates/base.html View 2 chunks +16 lines, -1 line 1 comment Download
M appengine/chromium_rietveld/templates/issue.html View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 31 (6 generated)
nodir
Jason, PTAL. I will not land this CL until CQ successfully processes >=15% of all ...
5 years, 8 months ago (2015-04-13 16:56:48 UTC) #6
esprehn
We need to be able to schedule jobs in a single http request, not make ...
5 years, 8 months ago (2015-04-14 01:00:11 UTC) #8
nodir
Adding put_batch endpoint https://codereview.chromium.org/1082303002/
5 years, 8 months ago (2015-04-14 18:45:13 UTC) #9
jrobbins
What's forcing this change? I thought we had settled on the JS talking to rietveld ...
5 years, 8 months ago (2015-04-16 18:09:27 UTC) #10
nodir
FWIU, even if rietveld server talks to buildbucket, you still need user consent at least ...
5 years, 8 months ago (2015-04-16 18:15:11 UTC) #11
esprehn
I too would like to avoid this, I thought it was required because of some ...
5 years, 8 months ago (2015-04-16 18:15:18 UTC) #12
nodir
On 2015/04/16 18:15:18, esprehn wrote: > I too would like to avoid this, I thought ...
5 years, 8 months ago (2015-04-16 18:50:53 UTC) #13
esprehn
On 2015/04/16 at 18:50:53, nodir wrote: > On 2015/04/16 18:15:18, esprehn wrote: > > I ...
5 years, 8 months ago (2015-04-16 18:56:15 UTC) #14
nodir
The long term solution is to use OAuth2 everywhere, which means authenticate to Rietveld from ...
5 years, 8 months ago (2015-04-16 19:00:40 UTC) #15
nodir
Actually it is questionable whether is is unacceptable. If Buildbucket had its own auth scope, ...
5 years, 8 months ago (2015-04-16 19:08:56 UTC) #16
jrobbins
I'm sorry to have not responded to issue 461620 sooner. In fact, at one point ...
5 years, 8 months ago (2015-04-16 19:11:35 UTC) #17
nodir
Let's accept Rietveld server being a proxy for Buildbucket for a moment. How would it ...
5 years, 8 months ago (2015-04-16 19:25:44 UTC) #18
jrobbins
On 2015/04/16 at 19:00:40, nodir wrote: > The long term solution is to use OAuth2 ...
5 years, 8 months ago (2015-04-16 19:28:39 UTC) #19
nodir
On 2015/04/16 19:25:44, nodir wrote: > If Rietveld authenticates with its own credentials, Buildbucket will ...
5 years, 8 months ago (2015-04-16 19:28:50 UTC) #20
jrobbins
> If Rietveld authenticates with its own credentials, Buildbucket will lose info who (human) created ...
5 years, 8 months ago (2015-04-16 19:34:50 UTC) #21
nodir
On 2015/04/16 19:34:50, Jason Robbins wrote: > > If Rietveld authenticates with its own credentials, ...
5 years, 8 months ago (2015-04-16 19:37:07 UTC) #22
Vadim Sh.
On 2015/04/16 19:37:07, nodir wrote: > On 2015/04/16 19:34:50, Jason Robbins wrote: > > > ...
5 years, 8 months ago (2015-04-16 19:50:26 UTC) #23
jrobbins
On 2015/04/16 at 19:37:07, nodir wrote: > On 2015/04/16 19:34:50, Jason Robbins wrote: > > ...
5 years, 8 months ago (2015-04-16 19:53:42 UTC) #24
nodir
On 2015/04/16 19:53:42, Jason Robbins wrote: > On 2015/04/16 at 19:37:07, nodir wrote: > > ...
5 years, 8 months ago (2015-04-16 21:01:37 UTC) #25
jrobbins
> If it is just an string field with plaintext email address, how can we ...
5 years, 8 months ago (2015-04-16 23:10:14 UTC) #26
nodir
On 2015/04/16 23:10:14, Jason Robbins wrote: > > If it is just an string field ...
5 years, 8 months ago (2015-04-16 23:43:00 UTC) #27
Adrian Kuegel
On 2015/04/16 23:43:00, nodir wrote: > On 2015/04/16 23:10:14, Jason Robbins wrote: > > > ...
5 years, 7 months ago (2015-05-12 14:30:20 UTC) #28
nodir
Yes, I'll continue working on this one today On Tue, May 12, 2015, 7:30 AM ...
5 years, 7 months ago (2015-05-12 14:50:02 UTC) #29
nodir
This is blocked on chrome-infra-auth's impersonation implementation. Adrian, is this urgent for you?
5 years, 7 months ago (2015-05-14 03:31:33 UTC) #30
nodir
5 years, 3 months ago (2015-09-17 17:40:43 UTC) #31
Closing this because scheduling is implemented on the server now, with
impersonation https://codereview.chromium.org/1344253002/

Powered by Google App Engine
This is Rietveld 408576698