Create "built from" url artifact to replace TinderboxPrint log line
Categories
(Thunderbird :: Build Config, task)
Tracking
(thunderbird_esr115 wontfix)
| Tracking | Status | |
|---|---|---|
| thunderbird_esr115 | --- | wontfix |
People
(Reporter: sclements, Assigned: rjl)
Details
Attachments
(4 files)
I'm working on a task to discontinue the storage of job artifacts in the Treeherder database. I'd like to switch to retrieving artifacts in the UI directly from a taskcluster API but we're currently only able to retrieve "artifact uploaded" artifacts. A blocker to fully implementing this is TinderboxPrint. Treeherder currently parses[2] raw text logs for TinderboxPrint lines and stores them as artifacts for use in treeherder's job details panel.
[vcs 2020-03-25T18:26:51.244Z] TinderboxPrint:<a href=https://hg.mozilla.org/mozilla-central/rev/c5112a7573ac8a9d388e6253e3305061654b123e title='Built from mozilla-central revision c5112a7573ac8a9d388e6253e3305061654b123e'>c5112a7573ac8a9d388e6253e3305061654b123e</a>
[task 2020-03-25T08:27:34.766Z] 08:27:34 INFO - TinderboxPrint: xpcshell-xpcshell<br/>852/<em class="testfail">1</em>/4
[task 2020-03-25T08:27:34.850Z] 08:27:34 INFO - TinderboxPrint: CPU usage<br/>42.0%
[task 2020-03-25T08:27:34.851Z] 08:27:34 INFO - TinderboxPrint: I/O read bytes / time<br/>133,754,880 / 3,204
[task 2020-03-25T08:27:34.851Z] 08:27:34 INFO - TinderboxPrint: I/O write bytes / time<br/>3,524,530,176 / 514,556
[task 2020-03-25T08:27:34.852Z] 08:27:34 INFO - TinderboxPrint: CPU idle<br/>921.4 (57.6%)
[task 2020-03-25T08:27:34.852Z] 08:27:34 INFO - TinderboxPrint: CPU system<br/>132.4 (8.3%)
[task 2020-03-25T08:27:34.853Z] 08:27:34 INFO - TinderboxPrint: CPU user<br/>539.1 (33.7%)
[task 2020-03-25T08:27:34.853Z] 08:27:34 INFO - TinderboxPrint: Swap in / out<br/>0 / 0
We format them in our API like so:
{
"title": "Built from mozilla-central revision c5112a7573ac8a9d388e6253e3305061654b123e",
"value": "c5112a7573ac8a9d388e6253e3305061654b123e",
"url": "https://hg.mozilla.org/mozilla-central/rev/c5112a7573ac8a9d388e6253e3305061654b123e "
}
{
"title": "Swap in / out",
"value": "0 / 0",
"url": null
},
Tom.Prince suggested a structured artifact could be created that supplies that information (ideally for both the "Built by" link and the log lines).
[2] https://github.com/mozilla/treeherder/blob/master/treeherder/log_parser/parsers.py#L258
Hopefully some of the existing code in the two links provided could be reused.
| Reporter | ||
Comment 1•6 years ago
•
|
||
Also up for discussion is whether all of that is still needed or should still be supported, since it seems TinderboxPrint is an old/legacy reference.
| Reporter | ||
Comment 2•6 years ago
|
||
Ed Morley brought up some really good points about TinderboxPrint 2 years ago per: https://bugzilla.mozilla.org/show_bug.cgi?id=1410737#c7
| Reporter | ||
Comment 3•5 years ago
|
||
Hi Rob, Tom.Prince suggested you are someone who could help with this issue. Specifically creating a structured artifact for the "built from ..." urls that Treeherder is parsing from TinderboxPrint log lines?
Comment 4•5 years ago
|
||
I'll expand a bit on my suggestion. I'm not necessarily suggesting having a tinderbox print artifact, but that the data that was using that be put into a structured artifact (i.e. json), that treeherder could present, rather than parsing all the logs.
| Assignee | ||
Comment 5•5 years ago
|
||
I know one of our developers uses those links enough that he noticed when they broke recently. Probably whatever generates the target.txt artifact can produce a JSON file as well. I don't see the lack of pinning on comm-central being resolved anytime soon, though it's been on my mind.
I'll see what I can come up with.
| Reporter | ||
Updated•5 years ago
|
| Reporter | ||
Comment 6•5 years ago
|
||
Rob, I'll be merging the pr on Thursday that will stop storing that link in our database. Do need more time put a patch together?
| Assignee | ||
Comment 7•5 years ago
|
||
| Assignee | ||
Comment 8•5 years ago
|
||
The artifact file name is "built_from.json". Sarah, will this work?
I only did this for Thunderbird, I can port for Firefox as well if needed.
| Reporter | ||
Comment 9•5 years ago
|
||
That works! So from the taskcluster API, it'll look like this?
{ "storageType": "s3", "name": "public/built_from.json", "expires": <date>, "contentType": "application/json" }
| Reporter | ||
Comment 10•5 years ago
|
||
Comment on attachment 9144209 [details]
built_from.json sample file
Perfect :)
| Assignee | ||
Comment 11•5 years ago
|
||
Not sure where 'build' comes from? But it's present in all of the artifacts it looks like.
Here's the try job I ran if it's helpful.
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=8b06fe04af5e470a536432f5d6f654e2c2d95beb
{
"storageType": "s3",
"name": "public/build/built_from.json",
"expires": "2020-05-27T00:51:52.797Z",
"contentType": "application/json"
},
(In reply to Sarah Clements [:sclements] from comment #9)
That works! So from the taskcluster API, it'll look like this?
{ "storageType": "s3", "name": "public/built_from.json", "expires": <date>, "contentType": "application/json" }
| Assignee | ||
Updated•5 years ago
|
Comment 12•5 years ago
|
||
| Assignee | ||
Updated•5 years ago
|
| Reporter | ||
Comment 13•5 years ago
•
|
||
Rob, can you let me know when this is change is live (a sample task where it's showing up would be helpful). I want to test the changes I made before I merge it.
Comment 14•5 years ago
|
||
Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/dce2046514b0
Create build artifact to generate "Built from" links in Treeherder. r=darktrojan CLOSED TREE
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 15•5 years ago
|
||
This build will have the artifact.
https://treeherder.mozilla.org/#/jobs?repo=comm-central&selectedTaskRun=QHNQh09ZQha4Hqa5dz-AJg-0&revision=dce2046514b0a603c84bbf6cbf1cbc8730faf35e
It just occurred to me, I only have this artifact on build jobs. It would be useful on the Decision task as well, I'll do that in a follow-up somehow.
Comment 16•5 years ago
|
||
I think it would make sense for run-task to be changed to emit this, rather than having it as part of the build process.
| Assignee | ||
Updated•5 years ago
|
| Assignee | ||
Comment 17•5 years ago
|
||
Currently run-task doesn't seem to write any artifacts, and it looks like it doesn't really know where the right place to do so would be with the information it has. Is there a predictable way of finding the right path for artifacts?
UPLOAD_DIR is not always set when run-task executes. Can I rely on using /builds/worker/artifacts? (%TASKDIR%\builds\public for generic-workers?)
(In reply to Tom Prince [:tomprince] from comment #16)
I think it would make sense for
run-taskto be changed to emit this, rather than having it as part of the build process.
Comment 18•5 years ago
|
||
(In reply to Rob Lemley [:rjl] from comment #17)
Is there a predictable way of finding the right path for artifacts?
The predictable way is to add an argument to run-task to say where to put it, and adjust the taskgraph.transforms.job.run_task transform to pass that argument, and add an additional artifact specification to cover the path it uses; (my initial reaction is that run-task should use a different artifact namespace than "user level" things.
| Reporter | ||
Updated•5 years ago
|
| Assignee | ||
Updated•5 years ago
|
Updated•4 years ago
|
Updated•3 years ago
|
| Assignee | ||
Comment 19•2 years ago
|
||
| Assignee | ||
Updated•2 years ago
|
Comment 20•2 years ago
|
||
Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/6d2883f4b474
Write out built_from.json in the decision task. r=dandarnell
Updated•2 years ago
|
Description
•