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

Issue 828146 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Tricium plugin doesn't show up on gerrit host; gapi.auth.authorize does not return token

Project Member Reported by qyears...@chromium.org, Apr 2 2018

Issue description

The googleoauth plugin has been enabled on gerrit-review.appspot.com (related bug:  bug 821506 ), but now the Tricium plugin isn't showing on the gerrit host.

_refreshToken in the client element is never resolving, because gapi.auth.authorize is not returning a token.

I was initially thinking that the solution will probably involve switching to gapi.auth2 ( bug 826834 ), but now I'm not so sure, after seeing that when it was added, gapi.auth was deliberately used (https://crrev.com/c/391034).

Note that gapi.auth.authorize is working on chromium-review.appspot.com, and other hosts, but maybe not gerrit-review.appspot.com.

masayasuzuki@ or ekempin@, do you have any ideas about why this might be?
 

Comment 1 by maruel@google.com, Apr 6 2018

Quinten, you mean .googlesource.com instead of .appspot.com?
Oh, that's right -- gerrit-review.googlesource.com, not .appspot.com.
I guess you didn't follow the instruction at http://go/gob/users/host-config#how-to-enable-polygerrit-buildbucket-plugin. Especially the instruction #1.
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/gerrit-plugins/tricium/+/d3e09df4a9309da52b8ff645e68a1735584cc251

commit d3e09df4a9309da52b8ff645e68a1735584cc251
Author: Quinten Yearsley <qyearsley@chromium.org>
Date: Tue Apr 10 19:25:04 2018

When refreshing oauth2 token, add a time-out

In this CL:
 - In _refreshToken, reject after a given timeout
   if gapi.auth.authorize doesn't resolve or reject.
 - Add tests for _refreshToken
 - Add logging for when we fail to refresh Oauth token,
   and also when we ignore that and make requests anyway.

This CL replaces https://crrev.com/c/990953.

Bug:  828146 
Change-Id: I0a7d5858dfb7e292a433323580b13fe82ae161be
Reviewed-on: https://chromium-review.googlesource.com/1003327
Reviewed-by: Aaron Gable <agable@chromium.org>

[modify] https://crrev.com/d3e09df4a9309da52b8ff645e68a1735584cc251/src/main/resources/static/tricium-client.js
[modify] https://crrev.com/d3e09df4a9309da52b8ff645e68a1735584cc251/test/tricium-client_test.html

Status: Started (was: Assigned)
Good point, thanks masayasuzuki@!
Status: Fixed (was: Started)
After doing instruction #1, tricium plugin is now shown on gerrit-review again. (example: https://gerrit-review.googlesource.com/c/gerrit/+/104743).

Sign in to add a comment