Optimize by replacement on mozilla-central pushes which are not merges
Categories
(Firefox Build System :: Task Configuration, enhancement)
Tracking
(firefox81 fixed)
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: marco, Assigned: ahal)
References
(Blocks 1 open bug)
Details
Attachments
(6 files)
Bug 1636271 - [taskgraph] Create utility function for listing all tasks in a task group, r?tomprince
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
When we have a mozilla-central push that just contains commits already pushed to autoland without merges (which appears to be the most frequent case), we could optimize by replacement tasks that already run on the autoland push corresponding to the latest commit in the mozilla-central push.
For example, the mozilla-central push "52cf30bf74473e78c0baf8c4d6055910f67a0a37" only contains commits from autoland up to "52cf30bf74473e78c0baf8c4d6055910f67a0a37".
So, any task that run in the autoland push on 52cf30bf74473e78c0baf8c4d6055910f67a0a37 could be used to optimize by replacement in the corresponding mozilla-central push.
Comment 1•2 years ago
|
||
This would be easier if we had tier2/tier3 tasks that never ran on autoland :)
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 2•2 years ago
|
||
(In reply to Joel Maher ( :jmaher ) (UTC-4) from comment #1)
This would be easier if we had tier2/tier3 tasks that never ran on autoland :)
It shouldn't be a problem, we'd optimize by replacement on mozilla-central only tasks that run on the corresponding autoland push.
Assignee | ||
Comment 3•2 years ago
|
||
This is a great idea. There was discussion on #ci-cost-reduction on Matrix about moving m-c only tasks over to autoland and then only running them on backstop pushes (or even longer intervals).
So to save all the duplicated resources on m-c, we have two approaches:
Approach A:
- Fix this bug
- Move m-c only tasks over to autoland (optional)
Approach B:
- WONTFIX this bug
- Move m-c only tasks over to autoland
- Don't run anything on m-c except nightly builds
I like Approach A better as it will be less disruptive from a sherriffing standpoint plus will run tasks that somehow fell through the cracks on autoland. However if this bug ends up being too difficult, we have Approach B in our back pocket.
Comment 4•2 years ago
|
||
also we land patches directly on m-c which means Approach A is a bit more of a win. Although I would like to stop landing patches on m-c, but that is yet another problem to solve.
Assignee | ||
Comment 5•2 years ago
|
||
I started poking around here.. assigning to myself for now at least.
Comment 6•2 years ago
|
||
There are a number of things to be careful of when implementing this (though I don't think any of these apply if we limit to tests):
- we build with a different update channel on central vs. autoland (there may be other configuration changes)
- we encode the commit the build was built from; I suspect we want to reference m-c for things we ship
- if we want to implement something like Bug 1637544 on autoland (which would probably be a reasonably big win) we definitely don't want to be shipping builds built like that from autoland
Assignee | ||
Comment 7•2 years ago
•
|
||
Yes, I think anything needed to build a nightly (or thing we ship), will still need to come from m-c. Was planning to limit this to tests to start, but maybe non-shippable builds could also use it later on. We'll need to see if there are any other differences.
Comment 8•2 years ago
|
||
I can think of a few things:
- ccov builds/tests
- win/aarch64
- fenix/reference-browser android perf tests
- conditioned profile generation runs for perf tests
- wpt-backlog jobs
- probably other asan/tsan stuff, and some unique builds/tests
Reporter | ||
Comment 9•2 years ago
|
||
Bug 1639383 is another difference, hopefully we can make it go away.
Assignee | ||
Comment 10•2 years ago
|
||
This is a fairly specific use case. Let's just return the TC response directly
and let consumers use it as they see fit.
Updated•2 years ago
|
Assignee | ||
Comment 11•2 years ago
|
||
Depends on D74407
Assignee | ||
Comment 12•2 years ago
|
||
This creates a new set of optimization strategies
(taskgraph.optimize:project.autoland) to use with autoland. Among other things,
it also means there's no need for the 'test-try' optimization as the autoland
strategies are no longer the default behaviour.
Depends on D79704
Assignee | ||
Comment 13•2 years ago
|
||
Depends on D79705
Assignee | ||
Comment 14•2 years ago
|
||
Depends on D79706
Comment 15•2 years ago
|
||
The changes in https://phabricator.services.mozilla.com/rMOZILLACENTRAL5e3a55fa20f8d69a627c69fa1bc3c06caa3eacff were causing Gecko Decision tasks to fail on try:
https://treeherder.mozilla.org/#/jobs?repo=try&searchStr=Gecko%2CDecision%2CTask%2Copt%2CGecko%2CDecision%2CTask%2CD&fromchange=a29a628d444046ac78b162147c762924d72ae09c&tochange=52eca45324ad23df6f24ee5eab6a3f74e3b75fc1
I backed them out from central and autoland:
https://hg.mozilla.org/mozilla-central/rev/999a71203f26126f618d005c33b545023256d936
Comment 16•2 years ago
|
||
Pushed by ahalberstadt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d3f93bd6b1f9 [taskgraph] Create utility function for listing all tasks in a task group, r=tomprince https://hg.mozilla.org/integration/autoland/rev/4250f49877ba [taskgraph] Move 'optimize-strategies' from try_task_config.json to a parameter, r=tomprince https://hg.mozilla.org/integration/autoland/rev/4b0f13fcf941 [taskgraph] Set autoland optimizations via per-project parameter, r=tomprince
Comment 17•2 years ago
|
||
Backed out for breaking the Gecko Decision Task
Backout link: https://hg.mozilla.org/integration/autoland/rev/18cfd7807be8abbb7da9ce1a75eba6092163164e
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=310762050&repo=autoland&lineNumber=59
Assignee | ||
Comment 18•2 years ago
|
||
The above push passed with mach try auto but causes decision task failures on actual autoland. Not clear to me what the problem is, will need to investigate further tomorrow.
Comment 19•2 years ago
|
||
(In reply to Andrew Halberstadt [:ahal] from comment #18)
The above push passed with mach try auto but causes decision task failures on actual autoland. Not clear to me what the problem is, will need to investigate further tomorrow.
Forgive the fly by, but I've been poking around related code so I thought I'd have a look.
I'm not certain, but I suspect that because autoland currently uses the default
target tasks, it may end up as None
at https://searchfox.org/mozilla-central/source/taskcluster/taskgraph/decision.py#383. It's part of the options for https://searchfox.org/mozilla-central/source/taskcluster/mach_commands.py#173, and it probably ends up with a value of None
and gets set by https://searchfox.org/mozilla-central/source/taskcluster/taskgraph/decision.py#291.
Assignee | ||
Comment 20•2 years ago
|
||
Ah yes, in hindsight the fact that every other entry in PER_PROJECT_PARAMETERS
explicitly sets target_tasks_method
should have been a clue.
Assignee | ||
Comment 21•2 years ago
|
||
Not sure how to test this, as I'd need to fake the "project" value on try (and am unsure how to run the decision.py code path locally). Though it seems pretty obvious this is the issue and so am comfortable re-landing.
Comment 22•2 years ago
|
||
Pushed by ahalberstadt@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7adf02fc1803 [taskgraph] Create utility function for listing all tasks in a task group, r=tomprince https://hg.mozilla.org/integration/autoland/rev/6c1e36ffa940 [taskgraph] Move 'optimize-strategies' from try_task_config.json to a parameter, r=tomprince https://hg.mozilla.org/integration/autoland/rev/06b2344e94dc [taskgraph] Set autoland optimizations via per-project parameter, r=tomprince
Assignee | ||
Comment 23•2 years ago
|
||
Comment 24•2 years ago
|
||
Pushed by btara@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ce1870c92534 Fix flake8 issue arising from merge conflict CLOSED TREE
Comment 25•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7adf02fc1803
https://hg.mozilla.org/mozilla-central/rev/6c1e36ffa940
https://hg.mozilla.org/mozilla-central/rev/06b2344e94dc
https://hg.mozilla.org/mozilla-central/rev/ce1870c92534
Description
•