Closed Bug 1353720 Opened 7 years ago Closed 4 years ago

Inconsistent handling of jobs with logs whose name is not 'buildbot_text'

Categories

(Tree Management :: Treeherder, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: davehunt, Unassigned)

Details

The Firefox Test Engineering jobs have started to be ingesting into Treeherder. Something I saw whilst working on this with a local Treeherder instance was the log parsing never completing for logs without failures. I was able locally to see the results of log parsing when introducing a failure. I'm seeing the same issue now on the public instance of Treeherder.

The failure summary of https://treeherder.allizom.org/#/jobs?repo=fxapom&selectedJob=82628976 shows "Log parsing in progress.", however the raw log is available.
This is due to the log name of `py27_tbpl.txt:
https://treeherder.allizom.org/api/project/fxapom/job-log-url/?job_id=81923253

Compare to another job's log names of `buildbot_text` / `errorsummary_json`:
https://treeherder.allizom.org/api/project/mozilla-inbound/job-log-url/?job_id=82815309

The naming is somewhat historical, however the intention is to indicate which is (a) the primary log for display in the main UI, (b) which are logs used for other purposes (eg structured log parsing). See the docs here (if you can think of ways to make this clearer, please do say :-)):
https://treeherder.readthedocs.io/submitting_data.html#specifying-custom-log-names

This is used here to determine which tasks to schedule here:
https://github.com/mozilla/treeherder/blob/dd0f01687c8c53494d650dd87151d4e01c69fd48/treeherder/etl/jobs.py#L391-L395

The UI could definitely handle this case better however, since the logic for determining whether there are pending logs remaining uses a different set of conditions ("assume anything not ending in _json will be parsed"):
https://github.com/mozilla/treeherder/blob/dd0f01687c8c53494d650dd87151d4e01c69fd48/ui/plugins/controller.js#L184-L201

...which means:
1) The raw log link works even though the main error summary panel doesn't
2) The summary panel shows "Log parsing in progress." rather than "No logs available for this job"

I'll file Treeherder bugs for making the error message clearer.
Thanks Ed! I've raised https://github.com/mozilla/fxtest-jenkins-pipeline/issues/12 to use buildbot_text as the log name. As I'm using Pulse to submit to Treeherder, I must confess to not reading through the Python client documentation. Could we perhaps add some guidance on the specially treated log names to the pulse schema? A description under log>name would be ideal.

As for making this clearer in the future, perhaps the schema could evolve to carry additional log properties that would indicate the format or the purpose. That way Treeherder could know which logs are raw, TBPL, etc, and which should be used for parsing.
(In reply to Dave Hunt (:davehunt) from comment #2)
> Could we perhaps add some guidance on the specially treated log names to the pulse
> schema? A description under log>name would be ideal.

Ah yes this would be a good short term solution.

Since the GitHub issue is now open for changing the log name, let's morph this to be about the medium-long term treeherder changes.
Component: Treeherder: Log Viewer → Treeherder
Summary: Log parsing never completes for logs generated by pytest-mozlog without failures → Inconsistent handling of jobs with logs that do not have name of buildbot_text
Summary: Inconsistent handling of jobs with logs that do not have name of buildbot_text → Inconsistent handling of jobs with logs whose name is not 'buildbot_text'
Component: Treeherder → Treeherder: Log Parsing & Classification

Closing as out of date.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
Component: Treeherder: Log Parsing & Classification → TreeHerder
You need to log in before you can comment on or make changes to this bug.