Closed Bug 1737673 Opened 3 years ago Closed 3 years ago

Formalize the 'variant' subsystem in test transforms

Categories

(Firefox Build System :: Task Configuration, enhancement)

enhancement

Tracking

(firefox96 fixed)

RESOLVED FIXED
Tracking Status
firefox96 --- fixed

People

(Reporter: ahal, Assigned: ahal)

References

Details

Attachments

(11 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Variants cover runtime configuration we set in tasks that tweak how Firefox behaves (typically prefs). We currently define them in a big JSON object in transforms/tests.py, but it's getting unwieldy to maintain and use.

In this bug I plan to:

  1. Tests
  2. Move definition to a yaml file
  3. Create documentation (and checks to ensure it stays up to date)
  4. Force an owner to be listed
  5. Allow composing variants (e.g, variants: ["fission", "webgl-ipc", "fission+webgl-ipc"])
  6. Possibly pull the logic to a new transform file?
  7. ???

This makes them easier to find and inspect.

Depends on D129826

This ensures the filters stay alongside the variant definitions. I called the
key 'when' as 'filter' is ambiguous about whether the tasks that match are
being included or excluded.

Depends on D129827

Ensures variants all conform to a well defined schema and don't
contain any extra or unexpected data.

Depends on D129828

This also splits the blurb for the 'test' kind into a new file as it was
getting too long for kinds.rst. Having documentation for every kind in the same
file tends to lead towards uninformative documentation.

Depends on D129829

This makes things less confusing as we no longer sneakily override the value
defined in the test configs.

Depends on D129831

This is identical to the 'webgl-ipc' variant and only used in one place.

Depends on D129832

Listing contacts next to the variant will provide a point of contact in case
there are questions around cost / capacity or relative importance of a given
variant.

Keywords: leave-open
Attachment #9248269 - Attachment description: Bug 1737673 - Add a 'contact' key to variants in the yaml file, r?jmaher,jgilbert,cpeterson → Bug 1737673 - Add a 'contact' key to variants in the yaml file, r?jmaher!,jgilbert!,cpeterson!
Attachment #9248261 - Attachment description: Bug 1737673 - [taskgraph] Add a test for 'split_variants' in tests.py transforms, r?jmaher → Bug 1737673 - [taskgraph] Add a test for 'split_variants' in tests.py transforms, r?jmaher!
Attachment #9248262 - Attachment description: Bug 1737673 - Pull 'variant' definitions into a yaml file, r?jmaher → Bug 1737673 - Pull 'variant' definitions into a yaml file, r?jmaher!
Attachment #9248263 - Attachment description: Bug 1737673 - Use 'jsone' to replace variant filter functions, r?jmaher → Bug 1737673 - Use 'jsone' to replace variant filter functions, r?jmaher!
Attachment #9248264 - Attachment description: Bug 1737673 - Validate variants against a schema, r?jmaher → Bug 1737673 - Validate variants against a schema, r?jmaher!
Attachment #9248265 - Attachment description: Bug 1737673 - Add documentation for the 'variants' system, r?jmaher → Bug 1737673 - Add documentation for the 'variants' system, r?jmaher!
Attachment #9248266 - Attachment description: Bug 1737673 - Remove unused 'webrender' variant, r?jmaher → Bug 1737673 - Remove unused 'webrender' variant, r?jmaher!
Attachment #9248267 - Attachment description: Bug 1737673 - Stop setting 'run-on-projects' in variants.yml, r?jmaher → Bug 1737673 - Stop setting 'run-on-projects' in variants.yml, r?jmaher!
Attachment #9248268 - Attachment description: Bug 1737673 - Remove duplicate 'webgl-ipc-profiling' variant, r?jmaher → Bug 1737673 - Remove duplicate 'webgl-ipc-profiling' variant, r?jmaher!
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/98a659f60686
[taskgraph] Add a test for 'split_variants' in tests.py transforms, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/e38b571d248d
Pull 'variant' definitions into a yaml file, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/18eec84f404b
Use 'jsone' to replace variant filter functions, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/e1d2518592d4
Validate variants against a schema, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/7147d8490b9c
Add documentation for the 'variants' system, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/44bf02d34aaf
Remove unused 'webrender' variant, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/070efa174493
Stop setting 'run-on-projects' in variants.yml, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/6b374ffe6878
Remove duplicate 'webgl-ipc-profiling' variant, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/b7ad64578b84
Add a 'contact' key to variants in the yaml file, r=jmaher,jgilbert,cpeterson

Often we have two variants that we want to test together. The only way to do
this currently is to create a 3rd variant that is the sum of the previous two.

This feature will allow tasks to define multiple variants using the '+' token.
E.g:

variants: ["fission", "webgl-ipc", "fission+webgl-ipc"]

The third variant there will first apply the 'fission' configuration, then the
'webgl-ipc' configuration (in order).

This replaces the following variants with composites:
webrender-sw-a11y-checks
webrender-sw-fission
webrender-sw-wayland

The full task graph is identical after this change.

Depends on D130399

Blocks: 1739596

Thanks for the backout, sorry about that!

Looks like it just needs to be joined to gecko_taskgraph.GECKO.

Flags: needinfo?(ahal)
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8e4b3a24e96a
[taskgraph] Add a test for 'split_variants' in tests.py transforms, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/de45d5de31dd
Pull 'variant' definitions into a yaml file, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/906cce4fe844
Use 'jsone' to replace variant filter functions, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/4e7fba3ff6ee
Validate variants against a schema, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/2c7aa54e0414
Add documentation for the 'variants' system, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/baedbe12cb81
Remove unused 'webrender' variant, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/9e7d1bac29a6
Stop setting 'run-on-projects' in variants.yml, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/11a908ecd5ae
Remove duplicate 'webgl-ipc-profiling' variant, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/c5d8a5c91ddd
Add a 'contact' key to variants in the yaml file, r=jmaher,jgilbert,cpeterson
https://hg.mozilla.org/integration/autoland/rev/829097878a30
Support 'composite' variants, r=jmaher
https://hg.mozilla.org/integration/autoland/rev/3db46303ab27
Remove 'webrender-sw-*' variants in favour of composite variants, r=jmaher
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: