treeherder
treeherder copied to clipboard
Bug 1863187 - Add job description to the job info, and also add full job description tab.
for https://bugzilla.mozilla.org/show_bug.cgi?id=1863187
Added 2 feature:
- show "job description" field into job info pane, under "job name" field
- this shows the first line of the job's
descriptionfield in the source YAML file
- this shows the first line of the job's
- add "Full Description" tab
- this shows the job's
descriptionfield in the source YAML file - the field can be multi-line, and I'm about to put more info there, such as "how to run locally", and possibly a URL of document
- this shows the job's
This modifies the database in the following way:
job_desctable is added- this is used for deduplicating the
descriptionfield across multiple jobs
- this is used for deduplicating the
job_desc_idcolumn is added tojobtable- this contains the
job_desctable's id - this column defaults to an empty text in
job_desctable
- this contains the
The job's description field is retrieved via the pulse's jobInfo.summary property, that seems to be the result of the following.
https://searchfox.org/mozilla-central/rev/02841791400cf7cf5760c0cfaf31f5d772624253/taskcluster/gecko_taskgraph/transforms/task.py#2004
"task-reference": "{description} ([Treeherder job]({th_job_link}))".format(
It contains the concatenation of the job's description field and the treeherder job link.
job_loader drops the treehreder job link part and uses it as description.
if there's better way to get the raw description field, let me know.
Concern:
job_desctable will store alldescriptionvalues, and whenever thedescriptionis modified (such as, adding more info "how to run locally", URL of documents, etc), a new row is added, and the old row is kept around
Here's screenshot with this patch applied.
the data is ingested from https://treeherder.mozilla.org/jobs?repo=try&revision=929752a9757906c2775bb3981268d758ff34c71d&searchStr=spidermonkey%2Cplain&selectedTaskRun=Zfq9gthfTYCFBoUSQPdC8A.0 which adds more description with https://phabricator.services.mozilla.com/D192856
Another concern is that the description is shown also in the taskcluster task page, and the view doesn't seem to expect multi-line string.
https://firefox-ci-tc.services.mozilla.com/tasks/Zfq9gthfTYCFBoUSQPdC8A
it turns out there's extra field in the job/task schema, which is suitable for putting documentation like "how to run locally".
also using it won't break the taskcluster task page's title.
I'll look into it.
Concern:
* `job_desc` table will store all `description` values, and whenever the `description` is modified (such as, adding more info "how to run locally", URL of documents, etc), a new row is added, and the old row is kept around
When all jobs which use the description have been purged 120 days after their submission, the description will also be deleted because of the CASCADE rule.
thank you all for reviewing!
opened https://github.com/mozilla/treeherder/pull/7869 with those comments addressed, and also switched to using extra.local-run field of the YAML file, to avoid breaking the TaskCluster page.
For this PR, I'll rework it to handle single-line description, and show it only in the job info pane,
after https://github.com/mozilla/treeherder/pull/7869 .
So far prepared a patch to add job description in the job info, based on https://github.com/mozilla/treeherder/pull/7869