Closed Bug 1571326 Opened 5 years ago Closed 5 years ago

apilint changelog check is broken

Categories

(GeckoView :: General, defect)

Unspecified
All
defect
Not set
normal

Tracking

(firefox69 wontfix, firefox70 fixed)

RESOLVED FIXED
mozilla70
Tracking Status
firefox69 --- wontfix
firefox70 --- fixed

People

(Reporter: agi, Assigned: agi)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Apilint changelog check is ignored when apilint is run as a lint, e.g. after making an api change:

$ ./mach lint --linter android-api-lint                
...
✖ 0 problems (0 errors, 0 warnings)

but when run from gradle directly:

$ ./mach gradle geckoview:apiLintWithGeckoBinariesDebug
...
ERROR: The api changelog file is out of date. Please update the file at

/Users/asferro/workspace/mozilla-central/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md

and then modify the [api-version] line as following:

>>>>
[api-version]: 9b4c4bce32fb6bbb81344a1cc163877f92c14751
<<<<

Oh dear, that's not great. Presumably I did something bad to the return code handling?

No your code is fine, the problem is that apilint doesn't return the error in the json, I'll fix it soon.

Assignee: nobody → agi

Before this version, apilint would not include CHANGELOG errors in the json
report. After Bug 1512487 we started ignoring apilint output (and erorr code)
and only consider the json report, so the CHANGELOG erorrs broke.

Updating to 0.2.5 makes it so the CHANGELOG errors are included in the json
report correctly. E.g.:

mobile/android/geckoview/src/main/java/org/mozilla/geckoview/doc-files/CHANGELOG.md
  384:14  error  The api changelog file is out of date. Please update the file
          and modify the [api-version] line as follows: [api-version]:
          a0b1e88e8bb3045a22c0942d736f4e9b4532bdeb  wrong_api_version
          (android-api-lint)

Backed out changeset 23a2c1dd36ac (bug 1571326) for lint failure at geckoview/RuntimeSettings.java on a CLOSED TREE.

Backout link: https://hg.mozilla.org/integration/autoland/rev/aeaaf608d228770fc735f7a8e799a9308e3106b9

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&selectedJob=259953299&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=23a2c1dd36ac17e8b3a31ea87847148d119e3426

Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=259953299&repo=autoland&lineNumber=1290

Log snippet:
[task 2019-08-05T17:07:20.987Z] Automation steps completed.
[task 2019-08-05T17:07:21.023Z] 0 compiler warnings present.
[task 2019-08-05T17:07:21.128Z] Overall system resources - Wall time: 399s; CPU: 0%; Read bytes: 0; Write bytes: 0; Read time: 0; Write time: 0
[task 2019-08-05T17:07:21.277Z] Notification center failed: Install notify-send (usually part of the libnotify package) to get a notification when the build finishes.
[task 2019-08-05T17:07:21.278Z] To view resource usage of the build, run |mach resource-usage|.
[task 2019-08-05T17:07:21.278Z] Your build was successful!
[task 2019-08-05T17:07:21.279Z] For more information on what to do now, see https://developer.mozilla.org/docs/Developer_Guide/So_You_Just_Built_Firefox
[task 2019-08-05T17:07:21.303Z] + ./mach --log-no-times lint -f treeherder -f json:/builds/worker/mozlint.json --linter android-api-lint --linter android-checkstyle --linter android-findbugs --linter android-lint --linter android-test
[task 2019-08-05T17:07:43.375Z] /usr/bin/python2.7 /builds/worker/checkouts/gecko/mach gradle --verbose -- geckoview:apiLintWithGeckoBinariesDebug
[task 2019-08-05T17:09:28.310Z] /usr/bin/python2.7 /builds/worker/checkouts/gecko/mach gradle --verbose -- geckoview:lintWithoutGeckoBinariesDebug
[task 2019-08-05T17:10:03.715Z] /usr/bin/python2.7 /builds/worker/checkouts/gecko/mach gradle --verbose -- app:checkstyle geckoview:checkstyleWithGeckoBinariesDebug
[task 2019-08-05T17:12:59.114Z] /usr/bin/python2.7 /builds/worker/checkouts/gecko/mach gradle --verbose -- app:findbugsXmlWithoutGeckoBinariesDebug app:findbugsHtmlWithoutGeckoBinariesDebug
[task 2019-08-05T17:17:00.665Z] /usr/bin/python2.7 /builds/worker/checkouts/gecko/mach gradle --verbose -- app:testWithoutGeckoBinariesDebugUnitTest geckoview:testWithGeckoBinariesDebugUnitTest
[task 2019-08-05T17:17:00.698Z] TEST-UNEXPECTED-ERROR | /builds/worker/checkouts/gecko/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/RuntimeSettings.java:37:28 | Unexpected api change (api_changes)
[fetches 2019-08-05T17:17:00.720Z] removing /builds/worker/fetches
[fetches 2019-08-05T17:17:03.688Z] finished
[taskcluster 2019-08-05 17:17:05.101Z] === Task Finished ===
[taskcluster 2019-08-05 17:17:05.226Z] Artifact "public/android/lint/lint-results-officialWithoutGeckoBinariesDebug.xml" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/app/reports/lint-results-officialWithoutGeckoBinariesDebug.xml"
[taskcluster 2019-08-05 17:17:05.446Z] Artifact "public/android/lint/lint-results-officialWithoutGeckoBinariesDebug_files" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/app/reports/lint-results-officialWithoutGeckoBinariesDebug_files"
[taskcluster 2019-08-05 17:17:05.662Z] Artifact "public/android/findbugs/findbugs-officialWithoutGeckoBinariesDebug-output.xml" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/app/reports/findbugs/findbugs-officialWithoutGeckoBinariesDebug-output.xml"
[taskcluster 2019-08-05 17:17:05.766Z] Artifact "public/android/geckoview/apilint-result.json" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/classes/withGeckoBinaries/debug/apilint-result.json"
[taskcluster 2019-08-05 17:17:05.866Z] Artifact "public/android/findbugs/findbugs-officialWithoutGeckoBinariesDebug-output.html" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/app/reports/findbugs/findbugs-officialWithoutGeckoBinariesDebug-output.html"
[taskcluster 2019-08-05 17:18:52.322Z] Artifact "public/android/lint/lint-results-officialWithoutGeckoBinariesDebug.html" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/app/reports/lint-results-officialWithoutGeckoBinariesDebug.html"
[taskcluster 2019-08-05 17:18:52.526Z] Artifact "public/android/geckoview/api.txt" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/classes/withGeckoBinaries/debug/api.txt"
[taskcluster 2019-08-05 17:19:39.474Z] Unsuccessful task run with exit code: 1 completed in 1804.196 seconds

Flags: needinfo?(agi)
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Flags: needinfo?(agi)

firefox69=wontfix because we don't need to uplift apilint fixes to Beta.

Has Regression Range: --- → yes
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: