Closed
Bug 1317289
Opened 9 years ago
Closed 7 years ago
Scope error displayed after signing in under certain circumstances
Categories
(Taskcluster :: UI, defect)
Taskcluster
UI
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: garndt, Assigned: hashini.0913)
Details
(Keywords: good-first-bug)
After selecting an action on one of the tools sites when not logged in, such as clicking a worker type in the aws-provisioner UI, the user is presented with an error informing them of this. However, after logging in and being redirected back to the originating site, a scope error is displayed. Navigating away from where the user was at originally and going back resolves the issue.
Comment 1•9 years ago
|
||
I think the issue is that we don't automatically re-try operations, or hide error messages, on login. Probably hiding the error message is not a bad idea, and for cases where visibility is based on scopes (aws provisioner, secrets) retrying the GET call.
Updated•7 years ago
|
Keywords: good-first-bug
| Assignee | ||
Comment 2•7 years ago
|
||
May I start working on this ?
Updated•7 years ago
|
Assignee: nobody → hashini.0913
Comment 3•7 years ago
|
||
One area where this happens is in the aws-provisioner view:
STR:
1. Navigate to https://tools.taskcluster.net/aws-provisioner
2. Make sure you are not logged in
3. Click on a worker type (e.g., ami-test)
4. You will see an error. Click on "Additional details...".
5. Login
Expected: The GET call for the worker type is retried. The error might still show if you don't have enough permissions but when you click on "Additional details..." your scopes should not be empty "[]" anymore.
Actual: The GET call is not retried and the same error is shown:
"You do not have sufficient scopes. This request requires you to have one of the following sets of scopes: [ [ "aws-provisioner:view-worker-type:ami-test" ], [ "aws-provisioner:manage-worker-type:ami-test" ] ]
You only have the scopes: []"
| Assignee | ||
Comment 4•7 years ago
|
||
The root cause for the bug is in the “componentWillReceiveProps” method in the “WorkerTypeView” component found in “src/views/AwsProvisioner/WorkerTypeView.js”
This is the root cause for “loadWorkerType” GET call for the worker type is not executed when a user logs in or changes. Also note that the GET call is only executed if “provisionerId” or “workerType” type changes. Moreover there is no clearing of the error in “this.state”.
Comment 5•7 years ago
|
||
Awesome! Thanks for looking into the issue. The next step is to create a pull-request with the fix so we can review it. Let me know if you need help along the way :)
| Assignee | ||
Comment 6•7 years ago
|
||
I have created a pull request. Link: https://github.com/taskcluster/taskcluster-tools/pull/454
I am not able to add you as a reviewer.
| Assignee | ||
Comment 7•7 years ago
|
||
I put my findings for the, PR changes requested. Could you please have a look.
Comment 8•7 years ago
|
||
Thanks Hashini, awesome job!
Comment 9•7 years ago
|
||
Commit pushed to master at https://github.com/taskcluster/taskcluster-tools
https://github.com/taskcluster/taskcluster-tools/commit/b6097065120024dda58a5c20c1efe3ceababc388
Bug 1317289 - Scope error displayed after signing in under certain circumstances
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: Tools → UI and Tools
You need to log in
before you can comment on or make changes to this bug.
Description
•