Closed Bug 1253082 Opened 4 years ago Closed 4 years ago

Android lint tier 2 job failure looks like an intermittent issue

Categories

(Firefox for Android :: Testing, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED DUPLICATE of bug 1255875

People

(Reporter: mcomella, Unassigned)

References

Details

Attachments

(1 file)

From bug 1238788 comment 8 (which will land android lint burning the tree on failure):

The error in the summary:
You are using pip version 7.1.2, however version 8.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Return code: 0
OSError: [Errno 2] No such file or directory

    566330 Linux64 Talos failure: OSError: [Errno 2] No such file or directory

IOError: [Errno 2] No such file or directory: 'dist/bin/platform.ini'
IOError: [Errno 2] No such file or directory: 'dist/bin/platform.ini'
IOError: [Errno 2] No such file or directory: 'dist/bin/platform.ini'
IOError: [Errno 2] No such file or directory: 'dist/bin/platform.ini'
IOError: [Errno 2] No such file or directory: 'dist/bin/platform.ini'
SyntaxError: unexpected EOF while parsing
Return code: 1
1 not in success codes: [0]
Halting on failure while running ['python2.7', 'mach', '--log-no-times', 'gradle', 'app:lintAutomationDebug']
---

And I found the failure is due to lint in the full logs:

20:30:40     INFO -  Lint found 1 errors and 865 warnings
20:30:40     INFO -  :app:lintAutomationDebug FAILED
20:30:40     INFO -  FAILURE: Build failed with an exception.
---

The try revision:
  https://treeherder.mozilla.org/#/jobs?repo=try&revision=b4422b622264

Some suggestions from irc: 
14:28 <&garndt> mcomella: if I understand correctly, when someone sees that job fail on treeherder, once selecting that job, they should see only the error "Android lint failed" and none of the other errors.  Right now I don't think that's possible.  Treeherder will display *all* errors that are in the log, not just the one you want to display
14:29 <nalexander> garndt: mcomella: focus on printing links to the Gradle report and the Unit Test report.
14:30 <&garndt> mcomella: it's a series of regexes that are configured within the service https://github.com/mozilla/treeherder/blob/master/treeherder/log_parser/parsers.py#L383
14:30 <nalexander> garndt: mcomella: structured logging is possible but wasted effort in my opinion.
14:30 <&garndt> thanks nalexander 
14:35 <mcomella> nalexander: Do you have an example of how to do that?
14:35 <nalexander> mcomella: structured logging?
14:36 <mcomella> nalexander: print links to the gradle report & unit test report
14:36 <nalexander> mcomella: the Robocop and xpcshell test runners do it in Python.
14:36 <nalexander> mcomella: not really.  I don't know how to reference artifact uploads in logs.
14:36 <nalexander> mcomella: I kinda think it's not possible?
---

This section sounds like the best approach:

14:53 <&garndt> mcomella: actually! I just remembered I added this one a while back https://github.com/mozilla/treeherder/blob/master/treeherder/log_parser/parsers.py#L396
14:53 <&garndt> mcomella: so if you prefixed your line like "[lint:error] <message>" that should show up
14:55 <nalexander> mcomella: it would not be hard to output things from Gradle itself in response to lint things.
14:56 <nalexander> mcomella: post-processing is tricky because there are layers of things invoking things (mozharness -> mach gradle -> Gradle)
14:56 <nalexander> mcomella: you could try to modify the lint tasks in Gradle...
14:58 <nalexander> mcomella: like, find the task, use doLast to add a closure, and then try to print the status.  But I don't know how to get the status.
14:59 <nalexander> mcomella: you get the lint XML report, however.  You could add things to the task.yml to parse and print the results you want.
14:59 <nalexander> mcomella: it does the doLast, but execResult is special to the Exec type of task.
14:59 <nalexander> mcomella: don't know if you can get the Gradle status.
14:59 <mcomella> Ah
14:59 <nalexander> mcomella: the Lint status.
15:01 <nalexander> mcomella: you might be able to use Gradle's finalizedBy, but I don't know how to get the task status.
15:12 <nalexander> mcomella: I think you can do this with finalizedBy and getFailure.  I'll investigate locally.
It's there in https://treeherder.mozilla.org/#/jobs?repo=try&revision=239a28d3d962.  It's just masked by the reams of garbage :(
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1255875
You need to log in before you can comment on or make changes to this bug.