Closed Bug 1248977 Opened 8 years ago Closed 8 years ago

Prompt user to login if a feature needs it

Categories

(Taskcluster :: UI, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: armenzg, Assigned: delrio.andre, Mentored)

References

(Blocks 1 open bug)

Details

(Whiteboard: [triaged])

I was trying this job [1]
This is a blocker for developers to use this button.

[1] https://treeherder.mozilla.org/#/jobs?repo=try&revision=5d196bbe596b&selectedJob=16780073
403:  You do not have sufficient scopes. This request requires you to have one of the following sets of scopes: [ [ "queue:create-task:aws-provisioner-v1/desktop-test" ], [ "queue:define-task:aws-provisioner-v1/desktop-test", "queue:task-group-id:task-graph-scheduler/AfLVXbR5SRiVvQ0p-_0cSA", "queue:schedule-task:task-graph-scheduler/AfLVXbR5SRiVvQ0p-_0cSA/dCiaXOJsTBuRgHpakwX9dw" ] ] You only have the scopes: [] In other words you are missing scopes from one of the options: * Option 0: - "queue:create-task:aws-provisioner-v1/desktop-test" * Option 1: - "queue:define-task:aws-provisioner-v1/desktop-test", and - "queue:task-group-id:task-graph-scheduler/AfLVXbR5SRiVvQ0p-_0cSA", and - "queue:schedule-task:task-graph-scheduler/AfLVXbR5SRiVvQ0p-_0cSA/dCiaXOJsTBuRgHpakwX9dw" ---- errorCode: InsufficientScopes statusCode: 403 requestInfo: method: createTask params: {"taskId":"dCiaXOJsTBuRgHpakwX9dw"} payload: { "provisionerId": "aws-provisioner-v1", "workerType": "desktop-test", "schedulerId": "task-graph-scheduler", "taskGroupId": "AfLVXbR5SRiVvQ0p-_0cSA", "priority": "normal", "retries": 0, "created": "2016-02-17T14:48:39.102Z", "deadline": "2016-02-18T02:48:39.101Z", "expires": "2016-02-24T14:48:39.102Z", "scopes": [ "docker-worker:feature:allowPtrace", "docker-worker:cache:level-1-try-test-workspace", "docker-worker:capability:device:loopbackVideo", "docker-worker:capability:device:loopbackAudio" ], "payload": { "artifacts": { "public/logs/": { "expires": "2017-02-15T16:41:17.925Z", "path": "/home/worker/workspace/build/upload/logs/", "type": "directory" }, "public/test": { "expires": "2017-02-15T16:41:17.917Z", "path": "/home/worker/artifacts/", "type": "directory" }, "public/test_info/": { "expires": "2017-02-15T16:41:17.925Z", "path": "/home/worker/workspace/build/blobber_upload_dir/", "type": "directory" } }, "cache": { "level-1-try-test-workspace": "/home/worker/workspace" }, "capabilities": { "devices": { "loopbackAudio": true, "loopbackVideo": true } }, "command": [ "bash", "/home/worker/bin/test.sh", "--no-read-buildbot-config", "--installer-url=https://queue.taskcluster.net/v1/task/TiCX8D4DRjW-rdn44XGaVw/artifacts/public/build/target.tar.bz2", "--test-packages-url=https://queue.taskcluster.net/v1/task/TiCX8D4DRjW-rdn44XGaVw/artifacts/public/build/test_packages.json", "--download-symbols=ondemand", "--mochitest-suite=browser-chrome-chunked", "--total-chunk=7", "--this-chunk=5", "--e10s" ], "env": { "GECKO_HEAD_REPOSITORY": "https://hg.mozilla.org/try/", "GECKO_HEAD_REV": "5d196bbe596b1e4d0dbfbc7173d859a8603e225a", "MOZHARNESS_CONFIG": "mozharness/configs/unittests/linux_unittest.py mozharness/configs/remove_executables.py\n", "MOZHARNESS_SCRIPT": "mozharness/scripts/desktop_unittest.py", "MOZHARNESS_URL": "https://queue.taskcluster.net/v1/task/TiCX8D4DRjW-rdn44XGaVw/artifacts/public/build/mozharness.zip", "MOZILLA_BUILD_URL": "https://queue.taskcluster.net/v1/task/TiCX8D4DRjW-rdn44XGaVw/artifacts/public/build/target.tar.bz2", "NEED_PULSEAUDIO": true, "NEED_WINDOW_MANAGER": true, "TASKCLUSTER_INTERACTIVE": "true" }, "features": { "allowPtrace": true, "interactive": true }, "image": { "path": "public/image.tar", "taskId": "GFjTG6RuQBmF9_llHWp2hQ", "type": "task-image" }, "maxRunTime": 3600 }, "metadata": { "description": "Mochitest browser-chrome e10s run 5", "name": "[TC] Linux64 mochitest-browser-chrome-e10s-5", "owner": "mozilla-taskcluster-maintenance@mozilla.com", "source": "https://hg.mozilla.org/try/file/5d196bbe596b1e4d0dbfbc7173d859a8603e225a/testing/taskcluster/tasks/builds/dbg_linux64_clobber.yml" }, "tags": { "createdForUser": "armenzg@mozilla.com" }, "extra": { "chunks": { "current": 5, "total": 7 }, "suite": { "flavor": "browser-chrome-chunked", "name": "mochitest" }, "treeherder": { "build": { "platform": "linux64" }, "collection": { "debug": true }, "groupName": "Desktop mochitests", "groupSymbol": "tc-M-e10s", "machine": { "platform": "linux64" }, "symbol": "bc5", "tier": 2 }, "treeherderEnv": [ "production", "staging" ] }, "routes": [] } time: 2016-02-17T14:48:37.746Z details: { "scopesets": [ [ "queue:create-task:aws-provisioner-v1/desktop-test" ], [ "queue:define-task:aws-provisioner-v1/desktop-test", "queue:task-group-id:task-graph-scheduler/AfLVXbR5SRiVvQ0p-_0cSA", "queue:schedule-task:task-graph-scheduler/AfLVXbR5SRiVvQ0p-_0cSA/dCiaXOJsTBuRgHpakwX9dw" ] ], "scopes": [] }
I was not logged in :/

Is there a way to prompt the user to log in?
I've put this in a trello board. I'm collecting UI/UX issues like this to be addressed together.
Summary: I do not have enough privileges to use one-click loaner → Prompt user to login if a feature needs it
Whiteboard: [triaged]
This have been very bugging me too :)
We should make a custom error message for 403..
Component: General → Tools
Can you please share steps to reproduce this bug?
Flags: needinfo?(jopsen)
@andrea,
Go to https://tools.taskcluster.net/task-creator/
Add "scopes": ["*"]
Try to create the task... Now notice that the error message isn't exactly very pretty :)

The error rendering is currently implemented here:
https://github.com/taskcluster/taskcluster-tools/blob/ed243404be26a7abae5c8f4cf4affd495b385676/lib/utils.jsx#L283-L309

There is a list of common error codes here:
https://github.com/taskcluster/taskcluster-lib-api/blob/269d52e35dd424298672358578072108fcb372ed/src/errors.js#L5-L15
(but some components may have additional error codes)

Essential is that errors are one the form:
  {code: "...", message: "...", requestInfo: {...}, details: {...}}
The message should probably be rendered as markdown.

RequestInfo can easily be displayed as a table. And details should be displayed as JSON.
Most important thing is code and message.
The other things are probably things one can click to show/expand.


For scopes errors and many other things, we've done a lot of work to make the message better.
But the tools.taskcluster.net site doesn't render it as markdown, so that's a little disappointing.
We should fix that...
Flags: needinfo?(jopsen)
This is also very confusing to developers wanting to use one-click-loaner.
Blocks: 1262260
Nice to improve Firefox automation usability. Not committing to Q3. Setting to P2
Priority: -- → P2
Assignee: nobody → delrio.andre
Mentor: wcosta
Status: NEW → ASSIGNED
https://github.com/taskcluster/taskcluster-tools/pull/122
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Thank you Andrea, this is much better!
Component: Tools → UI and Tools
You need to log in before you can comment on or make changes to this bug.