Closed Bug 1754241 Opened 3 years ago Closed 3 years ago

android lints not running - warning: no files linted

Categories

(Firefox Build System :: Task Configuration, defect, P1)

Unspecified
All
defect

Tracking

(firefox-esr91 unaffected, firefox97 unaffected, firefox98 fixed, firefox99 fixed)

RESOLVED FIXED
99 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox97 --- unaffected
firefox98 --- fixed
firefox99 --- fixed

People

(Reporter: agi, Assigned: mhentges)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

The logs show:

taskcluster 2022-02-08 14:11:11.100Z] Artifact "public/geckoview/unittest" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/reports/tests"
[taskcluster 2022-02-08 14:11:11.190Z] Artifact "public/android/lint/lint-results-officialWithoutGeckoBinariesDebug.html" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/reports/lint-results-withGeckoBinariesDebug.html"
[taskcluster 2022-02-08 14:11:11.274Z] Artifact "public/android/checkstyle/checkstyle.html" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/reports/checkstyle/withGeckoBinariesDebug.html"
[taskcluster 2022-02-08 14:11:11.366Z] Artifact "public/android/geckoview/api.txt.map" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/javac/withGeckoBinariesDebug/classes/api.txt.map"
[taskcluster 2022-02-08 14:11:11.454Z] Artifact "public/android/geckoview/api.txt" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/javac/withGeckoBinariesDebug/classes/api.txt"
[taskcluster 2022-02-08 14:11:11.554Z] Artifact "public/android/checkstyle/checkstyle.xml" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/reports/checkstyle/withGeckoBinariesDebug.xml"
[taskcluster 2022-02-08 14:11:11.746Z] Artifact "public/android/geckoview/javadoc-results.json" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/reports/javadoc-results-withGeckoBinariesDebug.json"
[taskcluster 2022-02-08 14:11:11.846Z] Artifact "public/android/geckoview/apilint-result.json" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/intermediates/javac/withGeckoBinariesDebug/classes/apilint-result.json"
[taskcluster 2022-02-08 14:11:11.938Z] Artifact "public/android/lint/lint-results-withGeckoBinariesDebug.xml" not found at "/builds/worker/checkouts/gecko/obj-firefox/gradle/build/mobile/android/geckoview/reports/lint-results-withGeckoBinariesDebug.xml"
[taskcluster 2022-02-08 14:11:12.088Z] Successful task run with exit code: 0 completed in 768.104 seconds

https://treeherder.mozilla.org/logviewer?job_id=367072851&repo=autoland&lineNumber=1563

I think this log is actually more interesting:

[task 2022-02-08T14:11:00.276Z] + ./mach --log-no-times lint -f treeherder -f json:/builds/worker/mozlint.json --linter android-api-lint --linter android-format --linter android-javadoc --linter android-checkstyle --linter android-lint --linter android-test
[task 2022-02-08T14:11:01.011Z] created virtual environment CPython3.9.2.final.0-64 in 46ms
[task 2022-02-08T14:11:01.011Z]   creator CPython3Posix(dest=/builds/worker/checkouts/gecko/obj-firefox/_virtualenvs/common, clear=False, no_vcs_ignore=False, global=False)
[task 2022-02-08T14:11:01.011Z]   activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator
[task 2022-02-08T14:11:09.966Z] warning: linting the entire repo takes a long time, using --outgoing and --workdir instead. If you want to lint the entire repo, run `./mach lint .`
[task 2022-02-08T14:11:09.966Z] warning: no files linted
[task 2022-02-08T14:11:09.966Z] No lint issues found.
Summary: android lints not running → android lints not running - warning: no files linted

Notice there is no gradle output in Comment 1.

Severity: -- → S3
Flags: needinfo?(mhentges)
Priority: -- → P1
Regressed by: 1753701

Could we also maybe break the lint on No files linted? there really isn't a good scenario where our CI doesn't lint any files.

Assignee: nobody → mhentges
Status: NEW → ASSIGNED
Flags: needinfo?(mhentges)

If there's no files to lint in CI, that's a smell that something is
misconfigured.

Resolve this by raising an exception accordingly if MOZ_AUTOMATION is
set. Automatically recommend specifying *, as (assuming the use of a
shell) that will resolve to "all files/dirs at $topsrcdir", which matches existing behaviour if --outgoingand--workdir` aren't
provided.

Explicitly specify that the linter should run on all files (*), to
circumvent bug 1753701's behaviour of defaulting to VCS-changed files.

Depends on D138172

Note that this needs to land after Bug 1754244 as we accidentally introduced a regression in the lint. The patch for that bug is queued to autoland already.

Depends on: 1754244
Attachment #9262880 - Attachment description: WIP: Bug 1754241: `./mach lint` now raises exception on no-op in CI → Bug 1754241: `./mach lint` now raises exception on no-op in CI
Attachment #9262881 - Attachment description: WIP: Bug 1754241: Fix `mozlint-android-lints` not checking any files → Bug 1754241: Fix `mozlint-android-lints` not checking any files

Set release status flags based on info from the regressing bug 1753701

Has Regression Range: --- → yes
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6f144b23a65e `./mach lint` now raises exception on no-op in CI r=ahal https://hg.mozilla.org/integration/autoland/rev/7a65c0ab12df Fix `mozlint-android-lints` not checking any files r=ahal
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
Component: General → Task Configuration
Product: GeckoView → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: