Set MOZCONFIG on build tasks from taskgraph instead of composing it in mozharness
Categories
(Release Engineering :: Applications: MozharnessCore, task, P3)
Tracking
(firefox159 fixed)
| Tracking | Status | |
|---|---|---|
| firefox159 | --- | fixed |
People
(Reporter: ahochheiden, Assigned: ahochheiden)
References
(Blocks 1 open bug)
Details
Attachments
(5 external files)
Build tasks let mozharness compose the mozconfig path from keys spread over its config files. The path is task configuration, so taskgraph computes it and sets MOZCONFIG in the task environment, mozharness reads it from there, and the keys leave the configs. No build changes its mozconfig. comm-central builds through the same kinds and will need to name its application in its kind yml.
| Assignee | ||
Comment 1•2 months ago
|
||
The mozconfig a build uses is task configuration, and taskgraph already
resolves the variant, so it computes the path and passes it to the task
as MOZCONFIG. The platform defaults to the longest mozconfig directory
name that prefixes the task name, the application to browser or to
mobile/android for Android platforms. A task with config-paths has
to name its application, so comm-central fails at graph generation
instead of building from Firefox mozconfigs. Kinds that took a variant,
platform or application from a mozharness config now say so in their
kind definitions. artifact-build and valgrind do not run the build
transforms and set the variable directly. The macOS unify tasks never
run mozharness and get nothing.
| Assignee | ||
Comment 2•2 months ago
|
||
The task environment's MOZCONFIG is the source path relative to the
checkout, which mozharness copies to .mozconfig with
extra_mozconfig_content appended. mozharness then points the build
environment's MOZCONFIG at that .mozconfig, since mach reads
MOZCONFIG before .mozconfig and the extra content would otherwise be
dropped. get_mozconfig_path stays for desktop_l10n.py.
| Assignee | ||
Comment 3•2 months ago
|
||
Nothing reads app_name, mozconfig_platform, mozconfig_variant or
src_mozconfig from these files any more. The variant configs stay
because most of them still carry debug_build, env,
disable_package_metrics or postflight_build_mach_commands, and the
Android ones that end up empty keep --custom-build-variant-cfg set,
which _is_configuration_shipped checks through build_variant.
Comment 6•2 months ago
|
||
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 7•2 months ago
|
||
Conflicted with bug 2058679. Fixed now.
Comment 9•2 months ago
|
||
How does this potentially impact Thunderbird? FYI Alex
Comment 10•2 months ago
|
||
Comment 11•2 months ago
|
||
Comment 12•2 months ago
|
||
Comment 13•2 months ago
•
|
||
(In reply to Toby Pilling [:tobyp] from comment #9)
How does this potentially impact Thunderbird? FYI Alex
I'm already trying to check for firefox, but even directly from autoland (so no enterprise specific tree, pure autoland) I cannot push it to try:
$ ./mach try fuzzy -q "'marionette | 'xpcshell"
"""
Traceback (most recent call last):
File "/usr/lib/python3.14/concurrent/futures/process.py", line 254, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/home/alex/.mozbuild/srcdirs/gecko-cinnabar-afdce27966eb/_virtualenvs/try/lib/python3.14/site-packages/taskgraph/generator.py", line 109, in load_tasks
for task_dict in transforms(trans_config, inputs)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2862, in check_run_task_caches
for task in tasks:
^^^^^
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2772, in check_perf_task_fission_filtering
for task in tasks:
^^^^^
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2757, in check_task_dependencies
for task in tasks:
^^^^^
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2743, in check_task_identifiers
for task in tasks:
^^^^^
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2724, in chain_of_trust
for task in tasks:
^^^^^
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2513, in build_task
for task in tasks:
^^^^^
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2443, in set_task_and_artifact_expiry
for job in jobs:
^^^^
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2425, in try_task_config_routes
for task in tasks:
^^^^^
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2413, in try_task_config_priority
yield from tasks
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2380, in try_task_config_env
yield from tasks
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2362, in add_github_checks_route
yield from tasks
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2329, in add_index_routes
for task in tasks:
^^^^^
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2080, in validate
yield from tasks
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2054, in task_name_from_label
for task in tasks:
^^^^^
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2044, in setup_raptor
for task in tasks:
^^^^^
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 1991, in set_defaults
for task in tasks:
^^^^^
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 1948, in set_implementation
for task in tasks:
^^^^^
File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/job/__init__.py", line 387, in use_fetches
raise Exception(
...<2 lines>...
)
Exception: android-x86_64-shippable/opt can't fetch instrumented-build-android-x86_64-shippable/opt artifacts because it has no instrumented-build-android-x86_64-shippable/opt dependencies!
"""
Am I missing something here?
Comment 14•2 months ago
|
||
Comment 15•2 months ago
|
||
Authored by https://github.com/ahochheiden
https://github.com/mozilla/enterprise-firefox/commit/7fff2c4913312b460004ca162e548c7232b0e2af
[enterprise-main] Bug 2073844 - Set MOZCONFIG in the environment of mozharness build tasks from taskgraph. r=ahal,taskgraph-reviewers,releng-reviewers
Authored by https://github.com/ahochheiden
https://github.com/mozilla/enterprise-firefox/commit/8be914ff1e59962aac996de0d8de2dddf4f66238
[enterprise-main] Bug 2073844 - Take the mozconfig path from MOZCONFIG in mozharness builds. r=ahal
Authored by https://github.com/ahochheiden
https://github.com/mozilla/enterprise-firefox/commit/6b7428c2d74c44134278c104d05e70f37c7dfb5a
[enterprise-main] Bug 2073844 - Drop the mozconfig keys from the mozharness build configs. r=ahal
Authored by Norisz Fay
https://github.com/mozilla/enterprise-firefox/commit/2de3d0a444223be49e2e0e3423ff6e094042d150
[enterprise-main] Revert "Bug 2073844, Bug 2073826, Bug 2073829, Bug 2073828 - Drop the mozconfig keys from the mozharness build configs. r=ahal" for causing Gecko Decision bustage
(via GitHub webhook, authenticated as shared-secret)
Updated•2 months ago
|
| Assignee | ||
Comment 16•2 months ago
•
|
||
(In reply to :gerard-majax from comment #13)
(In reply to Toby Pilling [:tobyp] from comment #9)
How does this potentially impact Thunderbird? FYI Alex
I'm already trying to check for firefox, but even directly from autoland (so no enterprise specific tree, pure autoland) I cannot push it to try:
$ ./mach try fuzzy -q "'marionette | 'xpcshell" """ Traceback (most recent call last): File "/usr/lib/python3.14/concurrent/futures/process.py", line 254, in _process_worker r = call_item.fn(*call_item.args, **call_item.kwargs) File "/home/alex/.mozbuild/srcdirs/gecko-cinnabar-afdce27966eb/_virtualenvs/try/lib/python3.14/site-packages/taskgraph/generator.py", line 109, in load_tasks for task_dict in transforms(trans_config, inputs) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2862, in check_run_task_caches for task in tasks: ^^^^^ File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2772, in check_perf_task_fission_filtering for task in tasks: ^^^^^ File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2757, in check_task_dependencies for task in tasks: ^^^^^ File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2743, in check_task_identifiers for task in tasks: ^^^^^ File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2724, in chain_of_trust for task in tasks: ^^^^^ File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2513, in build_task for task in tasks: ^^^^^ File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2443, in set_task_and_artifact_expiry for job in jobs: ^^^^ File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2425, in try_task_config_routes for task in tasks: ^^^^^ File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2413, in try_task_config_priority yield from tasks File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2380, in try_task_config_env yield from tasks File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2362, in add_github_checks_route yield from tasks File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2329, in add_index_routes for task in tasks: ^^^^^ File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2080, in validate yield from tasks File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2054, in task_name_from_label for task in tasks: ^^^^^ File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 2044, in setup_raptor for task in tasks: ^^^^^ File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 1991, in set_defaults for task in tasks: ^^^^^ File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/task.py", line 1948, in set_implementation for task in tasks: ^^^^^ File "/home/alex/firefox/gecko-cinnabar/taskcluster/gecko_taskgraph/transforms/job/__init__.py", line 387, in use_fetches raise Exception( ...<2 lines>... ) Exception: android-x86_64-shippable/opt can't fetch instrumented-build-android-x86_64-shippable/opt artifacts because it has no instrumented-build-android-x86_64-shippable/opt dependencies! """Am I missing something here?
As discussed on Slack, I believe this was against the Fix merge conflict change by :smolnar. It's confusing because the backout of bug 2058679 made the merge conflict resolution of this tricky, and as a result this got backed out too.
(In reply to Toby Pilling [:tobyp] from comment #9)
How does this potentially impact Thunderbird? FYI Alex
Thunderbird will need some changes, same as enterprise. I'm gonna refactor these patches a bit to make doing that easier/simpler.
Comment 17•2 months ago
|
||
Thanks a ton, much appreciated
| Assignee | ||
Comment 18•2 months ago
|
||
The goal is for every build to use one mozconfig file from the tree, so
that MOZCONFIG=<that file> ./mach build reproduces it locally. Some
builds instead had mozharness append extra lines to a copy of their
mozconfig at run time. Those lines now live in new mozconfig files that
source the original and add them.
Updated•2 months ago
|
Comment 19•2 months ago
|
||
(via GitHub webhook, authenticated as shared-secret)
Comment 20•2 months ago
|
||
Comment 21•2 months ago
|
||
Comment 22•2 months ago
|
||
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 23•2 months ago
|
||
I should have anticipated that interaction. Oh well, I'll wait until the a-s patches stick the landing, then rebase.
Comment 24•2 months ago
|
||
Comment 25•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/37bce6981a03
https://hg.mozilla.org/mozilla-central/rev/f66fcb4075ad
https://hg.mozilla.org/mozilla-central/rev/e030de9ecff0
https://hg.mozilla.org/mozilla-central/rev/d84190968022
Comment 26•2 months ago
|
||
Authored by https://github.com/lissyx
https://github.com/mozilla/enterprise-firefox/commit/92bc1d2cd811099dc2449979688f7c56a0788eff
[enterprise-main] Merge pull request #1577 from ahochheiden/mozconfig-key-pr
(via GitHub webhook, authenticated as shared-secret)
Description
•