Closed Bug 1895157 Opened 10 months ago Closed 9 months ago

`buildconfig` lint doesn't run for `./mach try --preset {firefox-android, android-components}`

Categories

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

defect

Tracking

(firefox127 fixed)

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: lina, Assigned: gbrown)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

There used to be a job called lint-buildconfig-{android-components, fenix, focus} that would run on GitHub PRs, and post a link to a .buildconfig.yml diff if any Gradle dependencies changed. Now that Android is in m-c, I was wondering how to trigger this job on Try.

Over in this review comment, Jon suggested trying ./mach try --preset firefox-android or ./mach try --preset android-components, but neither of them seemed to trigger it.

For example, this run and this run are both green, even though they need .buildconfig.yml changes.

I was able to run the lint locally using:

pip install --requirement taskcluster/scripts/lint/requirements.txt
taskcluster/scripts/lint/is_buildconfig_yml_up_to_date.py mobile/android/android-components

...Which did update .buildconfig.yml, and which I landed in this commit.

Interestingly, the Treeherder results for that landing do show a tier-2 buildconfig task, but I'm wondering if it doesn't trigger for the preset? (I also didn't see any buildconfig tasks in ./mach try chooser).

Assignee: nobody → gbrown

mach try chooser does not provide any options for buildconfig ... but it also doesn't support any other lint tasks either. I could see us adding a new "Lint" category for try chooser, but that's probably best considered in a bug of its own.

The buildconfig tasks can be explicitly selected with mach try fuzzy, although the names are a bit unusual:

source-test-buildconfig-buildconfig-android-components
source-test-buildconfig-buildconfig-focus
source-test-buildconfig-buildconfig-fenix

Those tasks can also be triggered from treeherder's "Add new jobs" or "Add new jobs (Search)" menu items.

But normally, buildconfig tasks would not need to be run explicitly: they should run on any push that changes relevant files; "relevant files" meaning .buildconfig.yml or build.gradle:
https://searchfox.org/mozilla-central/rev/bf57a034d975b990b549f990563f1bdab3ca559d/taskcluster/kinds/source-test/buildconfig.yml#36-38

I agree that a-c buildconfig (at least) should have run on https://treeherder.mozilla.org/jobs?repo=try&revision=9e15c94cf16d959c337cfc15515635da7213531d, which modified mobile/android/android-components/components/feature/accounts-push/build.gradle.

I can also reproduce on try: if I change .buildconfig.yml, no buildconfig tasks are scheduled automatically.

Might this be related somehow to the recent work on skip-unless-mozlint, bug 1885361?

Flags: needinfo?(rob)

Possibly. That bug has been backed out again and I do not plan to reland it.

Flags: needinfo?(rob)

I check try pushes with and without the changes from bug 1885361 -- no change to the behaviour I am seeing. I think this issue is unrelated.

The buildconfig tasks are lint-like tasks that should run on-push whenever certain files are modified,
even on try when not explicitly requested. The existing skip-unless-changed optimizations look correct,
but always-target was missing.

Severity: -- → S3
Type: task → defect
Priority: -- → P1

Thanks so much for fixing this, :gbrown!

mach try chooser does not provide any options for buildconfig ... but it also doesn't support any other lint tasks either. I could see us adding a new "Lint" category for try chooser, but that's probably best considered in a bug of its own.

That's great to know, thank you—I was wondering if maybe I was just looking in the wrong place! 😅

Pushed by gbrown@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8fac1d6443c5 Set always-target for buildconfig tasks r=jcristau
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: