Closed
Bug 1504224
Opened 7 years ago
Closed 2 years ago
add additional data to IFV API
Categories
(Tree Management :: Treeherder, enhancement, P3)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: jmaher, Unassigned)
Details
in orange factor we had APIs that returned more data, while we have many APIs to get information from IFV, it would help with some research and other tools if we could get similar information to what we had in orange factor.
here are two api's and examples of data that we would get from orange factor:
getInfoForJob(job_id): returns same information as in the of database
example: {"buildtype": "debug", "branch": "mozilla-central", "treeherder_job_id": 154710280, "date": "2018-01-08", "bug": "1421183", "machinename": "t-yosemite-r7-0196", "classification_time": "1515409982", "platform": "osx-10-10", "starttime": "1515407953", "test": "test-macosx64/debug-mochitest-browser-chrome-e10s-2", "revision": “ca379fcca95b1f4a3744242ea8647004b99b3507"}
getOrangesForDate(date): returns all jobs for the given date that were classified as intermittents.
example: [{"buildtype": "debug", "branch": "mozilla-central", "treeherder_job_id": 154710280, "date": "2018-01-08", "bug": "1421183", "machinename": "t-yosemite-r7-0196", "classification_time": "1515409982", "platform": "osx-10-10", "starttime": "1515407953", "test": "test-macosx64/debug-mochitest-browser-chrome-e10s-2", "revision": "ca379fcca95b1f4a3744242ea8647004b99b3507"}, {"buildtype": "debug", "branch": "mozilla-central", "treeherder_job_id": 154708575, "date": "2018-01-08", "bug": "1127836", "machinename": "i-0b03cd393e5f29dba", "classification_time": "1515411997", "platform": "linux64", "starttime": "1515407579", "test": "test-linux64/debug-mochitest-devtools-chrome-e10s-5", "revision": "ca379fcca95b1f4a3744242ea8647004b99b3507"}, {"buildtype": "debug", "branch": "mozilla-central", "treeherder_job_id": 154856980, "date": "2018-01-08", "bug": "1412158", "machinename": "i-078ea5aa5d13e5f78", "classification_time": "1515456404", "platform": "android-4-3-armv7-api16", "starttime": "1515451596", "test": "test-android-4.3-arm7-api-16/debug-xpcshell-6", "revision": "05fed903f40f05fd923ba2137696ecc1fa0bafe6”}]
Comment 1•7 years ago
|
||
To address the first endpoint you mentioned - getInfoForJob - there's the `failuresbybug` endpoint:
{
"push_time": "2018-10-08 21:52:47",
"platform": "windows7-32",
"revision": "df860e79a6a3cc41712cfd86ffbd18cf84fce626",
"test_suite": "mochitest-devtools-chrome-e10s-7",
"tree": "mozilla-central",
"build_type": "debug",
"job_id": 204108193,
"bug_id": 1497029,
"machine_name": "i-0f706dfdcfba514f5",
"lines": [
"23:19:50 ERROR - TEST-UNEXPECTED-FAIL | leakcheck | default process: missing output line for total leaks!",
"23:19:50 ERROR - TEST-UNEXPECTED-FAIL | leakcheck | tab process: missing output line for total leaks!",
"23:19:50 ERROR - TEST-UNEXPECTED-FAIL | leakcheck | tab process: missing output line for total leaks!",
"23:19:50 ERROR - TEST-UNEXPECTED-FAIL | leakcheck | tab process: missing output line for total leaks!",
"23:19:50 ERROR - TEST-UNEXPECTED-FAIL | leakcheck | tab process: missing output line for total leaks!",
"23:19:50 ERROR - TEST-UNEXPECTED-FAIL | leakcheck | tab process: missing output line for total leaks!"
]
},
The only things that are missing are `starttime`, `classification_time` and `date` (I'd have to look back in the code to see what field ES was getting the date from and which one `push_time` was supposed to be replacing). Do you want those added?
As for getOrangesForDate, I might be able to modify that endpoint to give you the data you want (list view vs detail view). Is this a high priority?
Flags: needinfo?(jmaher)
| Reporter | ||
Comment 2•7 years ago
|
||
if we could add those 3 time based fields to failuresbybug, that would be great. It sounds like getOrangesForDate is smaller tweaks.
As for priority, of course the sooner the better, but I would treat this as a P2 as I know there is the large react conversion upcoming. If you put some pointers to code in the bug here, we might be able to submit a PR and you can just review :)
Flags: needinfo?(jmaher)
Comment 4•7 years ago
|
||
Joel, does `failuresbybug` work for us here? We only get the data that's in the pulse message from taskcluster (currently `exchange/taskcluster-treeherder/v1/jobs`) and don't have any bugzilla data. We somehow need to bridge the gap between `job_id` and `bug_id` then.
Also, having `starttime` and `endtime` (=> runtime) and `cpuload` in there would be crucial. Assuming `lines` contains the error messages, this would provide us with all the data we need and would make querying telemetry obsolete for test data (for us).
Regarding `getOrangesForDate`, this should do just fine the way as described above.
Flags: needinfo?(jmaher)
| Reporter | ||
Comment 5•6 years ago
|
||
Sascha, great comment- I think we should be able to get the start/endtime but cpuload comes from a different artifact and isn't related. Can you pull that cpu time from activedata ? here is an example activedata query:
https://activedata.allizom.org/tools/query.html#query_id=Db_MV1aV
Flags: needinfo?(jmaher) → needinfo?(methos-bugzilla)
Comment 6•6 years ago
|
||
Joel, thanks for the pointer. That will do just fine.
Flags: needinfo?(methos-bugzilla)
Comment 7•6 years ago
|
||
I won't be able to get to this before next year, so if anyone wants to submit a patch here's where to make changes:
https://github.com/mozilla/treeherder/blob/master/treeherder/webapp/api/intermittents_view.py#L48
Any endpoint changes also needs to correspond with changes to its serializer: https://github.com/mozilla/treeherder/blob/master/treeherder/webapp/api/serializers.py#L284
For the modification of `failuresbybug` to include additional fields, I think the `job__start_time` field (on TH's Job model) corresponds to `start_time` and `job__submit_time` corresponds to `classification_time`. It'd be worth looking at the TH pr for removing the elastic search code used with Orange Factor to verify. From what I recall, the names for fields changed from file-to-file so you might also need to dig into the legacy OF code.
For the second part of this task (returning job data for all bugs) rather than try to modify `failuresbybug` it might be more efficient to create a new endpoint querying the Job model (if you go in that direction, it should go in the same file as `failuresbybug`). Also, this serializer is used for query parameter validation so this should be included: https://github.com/mozilla/treeherder/blob/master/treeherder/webapp/api/serializers.py#L312
Updated•6 years ago
|
Priority: P2 → P3
| Assignee | ||
Updated•3 years ago
|
Component: Intermittent Failures View → TreeHerder
| Reporter | ||
Comment 8•2 years ago
|
||
work hasn't been done for a few years and we don't have a current use case for this.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•