Closed Bug 1273134 Opened 9 years ago Closed 8 years ago

Add link to "One click loaner" in treeherder details pane

Categories

(Taskcluster :: Services, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ahal, Assigned: garndt)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The bug where taskcluster was unable to add more info to the details pane in treeherder has been fixed. One click loaner is super useful, but is hard to find so developers are unlikely to use it. We should link directly to it from treeherder (i.e under the 'Inspect Task' link).
Greg - is this something we can help with this quarter or next?
Component: General → Platform and Services
Flags: needinfo?(garndt)
I definitely think it's something we can help with, but it might be until later (like next month)
Flags: needinfo?(garndt)
Another alternative is to put this under the "retrigger" button in treeherder, as the one-click loaner is essentially retriggering the task (with some modification). I don't have strong preference whether we use the retrigger button or simply put a link in job details. Will Lachance might also be able to help out with this next quarter.
What link and parameters are needed for creating an interactive task? At the moment Treeherder does not have TaskCluster auth, thus, we will have to log them in before they can request it (unless they already were authenticated).
Right now the best we can do is link to the task-inspector for a task, e.g: https://tools.taskcluster.net/task-inspector/#P3up972vQeK7v9SeHm70mw/ This isn't good enough because we still have to scroll down to find the button. Ideally we want that button to be a simple link to the one-click loaner landing page, and then have the landing page call into the react event on-load (as opposed to on-click in the button). So this will require a bit of modifications in the taskcluster-tools repo. I don't imagine this change would be terribly hard though.
I think something like the following could work well: 1. Modify the task inspector page to take some kind of argument that automatically pops up the one-click loaner modal (e.g. https://tools.taskcluster.net/task-inspector/#P3up972vQeK7v9SeHm70mw/one-click-loaner) 2. If there is a task-inspector link, put a button that says something like "Reproduce this job on a loaner instance" just above the failure summary, which will open the link implemented in (1). The failure summary is what treeherder displays by default when there is a failing job, so I think putting this feature there will make things a lot more discoverable. Thoughts?
That sounds better than my idea, +1. Though putting it in the failure summary makes it hard to find if you want to reproduce a passing job (which I can think of several use cases for). Would it be bad to put it above/below the "inspect task" link in the details panel instead?
(In reply to Andrew Halberstadt [:ahal] from comment #7) > That sounds better than my idea, +1. > > Though putting it in the failure summary makes it hard to find if you want > to reproduce a passing job (which I can think of several use cases for). > Would it be bad to put it above/below the "inspect task" link in the details > panel instead? We can always put it in two places. :)
What we could do is include a link when we submit job data (like we do for inspect task) that will redirect to our one-click-loaner site here: https://tools.taskcluster.net/one-click-loaner/#<task id> From there it's very obvious to click the one click loaner button without having to search around. Here is an example: https://tools.taskcluster.net/one-click-loaner/#ERj7QeONRo-MZSgA2baWBA
(In reply to Greg Arndt [:garndt] from comment #9) > What we could do is include a link when we submit job data (like we do for > inspect task) that will redirect to our one-click-loaner site here: That's perfect. We can display a special button in the failure summary if there is a one click loaner property, otherwise it will just be displayed by default in job details.
so it looks like we need to specify a label and linkText...what would you like those to be if we could add this?
In the future we could also use that landing page to let developers tweak the settings of the loaner.. For example they could set how long they want the loaner to be reserved for them, or even tweak the task definition itself.
(In reply to Greg Arndt [:garndt] from comment #11) > so it looks like we need to specify a label and linkText...what would you > like those to be if we could add this? Unless someone has a better idea, we should probably just follow the example of "Inspect Task" and just use "One Click Loaner" for both.
So something like this on the job details pane? https://treeherder.allizom.org/#/jobs?repo=autoland&selectedJob=311212
(In reply to Greg Arndt [:garndt] from comment #14) > So something like this on the job details pane? > https://treeherder.allizom.org/#/jobs?repo=autoland&selectedJob=311212 Yup, exactly!
Cameron, this should add a one click loaner link to the job details pane of all jobs now reported by taskcluster-treeherder. So right now only staging, but when we deploy soon to prod those jobs will have it too.
Attachment #8768488 - Flags: review?(cdawson)
Though that doesn't show up under "Failure summary" which is the default view when a job fails. I think this is fine for now though and already a huge improvement over the status quo.
If there is a way to include this on the failure tab easily in the job messages we're submitting to the pulse exchange, I could add it there upon exception/failure too.
The Failure Summary tab is currently only populated by: 1. the "Bug suggestions" artifact (created by log parsing) 2. if no errors found in #1, it uses the "text_log_summary" artifact (also created by log parsing) To get other links into this page, we could do one of the following: 1. Have this link show in the log, look like an error and get added to "Bug suggestions" (hack-tastic!) 2. Add a field to the job_details model that specifies the "type" of detail (general, error) or the tab it belongs to or something. We could query for those details in the Failure Summary tab and add those links to it.
Attachment #8768488 - Flags: review?(cdawson) → review+
(In reply to Cameron Dawson [:camd] from comment #19) > The Failure Summary tab is currently only populated by: > > 1. the "Bug suggestions" artifact (created by log parsing) > 2. if no errors found in #1, it uses the "text_log_summary" artifact (also > created by log parsing) > > To get other links into this page, we could do one of the following: > > 1. Have this link show in the log, look like an error and get added to "Bug > suggestions" (hack-tastic!) > 2. Add a field to the job_details model that specifies the "type" of detail > (general, error) or the tab it belongs to or something. We could query for > those details in the Failure Summary tab and add those links to it. It's a total hack, but I was thinking of just looking for a specific job detail called "One Click Loaner" and special casing the handling of it inside the failure summary tab JavaScript.
Sounds like at least from a taskcluster-treeherder perspective this patch can land as is, and we'll figure out how to get it into the failure tab by other fantastic means.
Merged into taskcluster-treeherder and deployed: https://github.com/taskcluster/taskcluster-treeherder/commit/c55429c1c851b49b302a73e07b89337f0af98ce8 I can leave this bug open if we want to discuss how to get it onto the failure tab.
Assignee: nobody → garndt
Component: Platform and Services → Integration
(In reply to Greg Arndt [:garndt] from comment #22) > Merged into taskcluster-treeherder and deployed: > https://github.com/taskcluster/taskcluster-treeherder/commit/ > c55429c1c851b49b302a73e07b89337f0af98ce8 > > > I can leave this bug open if we want to discuss how to get it onto the > failure tab. Let's close this one. I filed bug 1285007 to track better treeherder integration.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
We might want to prevent all tasks from getting this link. For instance, I believe the gecko decision task should not have a one-click loaner link. I tried using it and I got the following error. ######################################## InsufficientScopes Error! 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/gecko-decision" ], [ "queue:define-task:aws-provisioner-v1/gecko-decision", "queue:task-group-id:task-graph-scheduler/KG87OLHrQrW02hE_UKhOjg", "queue:schedule-task:task-graph-scheduler/KG87OLHrQrW02hE_UKhOjg/Pdx9mInbRlWybsjn74vedQ" ] ] 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/gecko-decision" Option 1: - "queue:define-task:aws-provisioner-v1/gecko-decision", and - "queue:task-group-id:task-graph-scheduler/KG87OLHrQrW02hE_UKhOjg", and - "queue:schedule-task:task-graph-scheduler/KG87OLHrQrW02hE_UKhOjg/Pdx9mInbRlWybsjn74vedQ" errorCode: InsufficientScopes statusCode: 403 requestInfo: method: createTask params: {"taskId":"Pdx9mInbRlWybsjn74vedQ"} payload: { "provisionerId": "aws-provisioner-v1", "workerType": "gecko-decision", "schedulerId": "task-graph-scheduler", "taskGroupId": "KG87OLHrQrW02hE_UKhOjg", "priority": "normal", "retries": 0, "created": "2016-07-14T15:32:41.059Z", "deadline": "2016-07-15T03:32:41.058Z", "expires": "2016-07-21T15:32:41.059Z", "scopes": [ "docker-worker:cache:level-1-", "docker-worker:cache:tooltool-cache", "scheduler:extend-task-graph:", "assume:repo:hg.mozilla.org/try:*" ], "payload": { "env": { "GECKO_BASE_REPOSITORY": "https://hg.mozilla.org/mozilla-central", "GECKO_HEAD_REPOSITORY": "https://hg.mozilla.org/try/", "GECKO_HEAD_REF": "20af57a728fba3c09a50ca28a4252525c7e41ff6", "GECKO_HEAD_REV": "20af57a728fba3c09a50ca28a4252525c7e41ff6", "TASKCLUSTER_INTERACTIVE": "true" }, "cache": { "level-1-try-tc-vcs-public-sources": "/home/worker/.tc-vcs/", "level-1-try-gecko-decision": "/home/worker/workspace" }, "features": { "taskclusterProxy": true, "interactive": true }, "image": "taskcluster/decision:0.1.0", "maxRunTime": 10800, "command": [ "/bin/bash", "-cx", "mkdir -p /home/worker/artifacts && checkout-gecko workspace && cd workspace/gecko && ln -s /home/worker/artifacts artifacts && ./mach taskgraph decision --pushlog-id='134028' --project='try' --message='try: -b d -p linux64 -u reftest-1 -t none' --owner='armenzg@mozilla.com' --level='1' --base-repository='https://hg.mozilla.org/mozilla-central' --head-repository='https://hg.mozilla.org/try/' --head-ref='20af57a728fba3c09a50ca28a4252525c7e41ff6' --head-rev='20af57a728fba3c09a50ca28a4252525c7e41ff6' --revision-hash='94bb0868034aec3646de734c97f390ed40737f89'\n" ] }, "metadata": { "owner": "mozilla-taskcluster-maintenance@mozilla.com", "source": "https://hg.mozilla.org/try/raw-file/20af57a728fba3c09a50ca28a4252525c7e41ff6/.taskcluster.yml", "name": "Gecko Decision Task", "description": "The task that creates all of the other tasks in the task graph\n" }, "tags": { "createdForUser": "armenzg@mozilla.com" }, "extra": { "treeherder": { "symbol": "D" } }, "dependencies": [], "requires": "all-completed", "routes": [] } time: 2016-07-14T15:32:41.149Z details: { "scopesets": [ [ "queue:create-task:aws-provisioner-v1/gecko-decision" ], [ "queue:define-task:aws-provisioner-v1/gecko-decision", "queue:task-group-id:task-graph-scheduler/KG87OLHrQrW02hE_UKhOjg", "queue:schedule-task:task-graph-scheduler/KG87OLHrQrW02hE_UKhOjg/Pdx9mInbRlWybsjn74vedQ" ] ], "scopes": [] }
The link is just directing to the tools site to request a loaner, then it's up to your credentials if you're allowed to create a loaner for that task or not. This is no different than going to the task inspector, clicking the one click loaner button for a task, and getting the same error. The link just simplifies how to try to request one. When we are adding a link, we have no way of knowing what tasks a user might have scopes to create a loaner for as it depends on a per task and per user basis.
Component: Integration → Services
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: