Closed
Bug 1339542
Opened 8 years ago
Closed 8 years ago
When Servo vcs sync service lands Servo commits in autoland repo, run linux64-stylo tests but skip other platforms (to reduce test load)
Categories
(Infrastructure & Operations Graveyard :: CIDuty, task)
Infrastructure & Operations Graveyard
CIDuty
Tracking
(firefox55 fixed)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
firefox55 | --- | fixed |
People
(Reporter: cpeterson, Assigned: kmoir)
References
Details
Attachments
(3 files, 2 obsolete files)
(deleted),
patch
|
coop
:
review+
kmoir
:
checked-in+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
dustin
:
review+
|
Details | Diff | Splinter Review |
When the Servo vcs sync service lands Servo's GitHub commits to autoland, Treeherder currently runs all tests on all platforms. For now, Servo code changes can only break Stylo, so we can limit tests to the linux64-stylo platform on Servo commits to save testing time and resources.
Checking the push user (servo-vcs-sync@mozilla.com) might be the easiest way to identify commits from the Servo vcs sync service.
Assignee | ||
Comment 1•8 years ago
|
||
So I talked to my releng colleagues about this, and I'm not sure how we would implement this given the existing state of the tools at our disposal
It seems like we would need something like buildbot's enable_perproduct_builds but for taskcluster but only when a commit is landed from a certain user
I'm going to ni dustin and see if he has any suggestions on how to implement this or if there is work planned to address this type of scenario
Flags: needinfo?(dustin)
Comment 2•8 years ago
|
||
You don't actually need "only a certain user" - servo-vcs-sync only touches '^servo/', so to save on Mac and Windows tests all you need is to add that to the _product_excludes for firefox. Doesn't help with talos-linux64-ix, but then, that's just the longstanding problem that Taskcluster doesn't have a perproduct, so every single mobile/android/-only push is triggering all Linux builds and tests including Linux64 talos.
Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8837797 -
Flags: review?(coop)
Comment 4•8 years ago
|
||
I want to minimize the impact of the stuff we do to minimize cost for stylo on the design of the in-tree work is kept as low as possible, since when stylo is fully merged it will all be superfluous.
So, I can think of a few ways to implement this, but I think the best, and easiest to delete later, is to add a new filter in taskcluster/taskgraph/filter_tasks.py which, when the `owner` parameter is `servo-vcs-sync@mozilla.com`, filters out tasks *not* requiring servo, that is, those that are not in SERVO_PLATFORMS.
Flags: needinfo?(dustin)
Updated•8 years ago
|
Attachment #8837797 -
Flags: review?(coop) → review+
Assignee | ||
Updated•8 years ago
|
Attachment #8837797 -
Flags: checked-in+
Assignee | ||
Comment 5•8 years ago
|
||
I wasn't sure why taskcluster/taskgraph/filter_tasks.py should be modified vs taskcluster/taskgraph/target_tasks.py so this patch is a guess
Comment 6•8 years ago
|
||
Comment on attachment 8838246 [details] [diff] [review]
bu1339542.patch
Review of attachment 8838246 [details] [diff] [review]:
-----------------------------------------------------------------
The difference is that only one target_tasks_method can be selected for a run of the taskgraph generation, whereas multiple filters can run. So in this situation, I think we want to run the "normal" target_task_method for each projct, so basic behavior doesn't change, and then add a new filter which further subtracts stylo jobs when they do not need to be run (based on owner and project).
Filters were a little clearer when there were two of them, but as of the 12th there's only one (https://hg.mozilla.org/mozilla-central/rev/4db2b9c21878).
Assignee | ||
Comment 7•8 years ago
|
||
So I tried a few approaches to this problem but it doesn't seem to be working
In the previous patch to vendor servo, the filter looked like this. Basically it is checking for the existence of a file to ensure and then filtering on associated jobs.
specifically
if b'servo/ports/geckolib' in cargo:
return graph.tasks.keys()
I'm not sure how what how to filter out the tasks servo tasks without looking for a file. I have the bits to filter out on the email address in def fltr. Do you have any suggestions?
def filter_servo(graph, parameters):
"""Filters out tasks requiring Servo if Servo isn't present."""
# This filter is temporary until Servo's dependencies are vendored.
cargo = os.path.join(GECKO, 'toolkit', 'library', 'rust', 'shared',
'Cargo.toml')
with open(cargo, 'rb') as fh:
cargo = fh.read()
if b'servo/ports/geckolib' in cargo:
return graph.tasks.keys()
logger.info('real servo geckolib not used; removing tasks requiring it')
SERVO_PLATFORMS = {
'linux64-stylo',
}
def fltr(task):
if task.attributes.get('build_platform') in SERVO_PLATFORMS:
return False
return True
return [l for l, t in graph.tasks.iteritems() if fltr(t)]
Flags: needinfo?(dustin)
Comment 8•8 years ago
|
||
So breaking down that exisitng function:
set up the condition:
> # This filter is temporary until Servo's dependencies are vendored.
> cargo = os.path.join(GECKO, 'toolkit', 'library', 'rust', 'shared',
> 'Cargo.toml')
> with open(cargo, 'rb') as fh:
> cargo = fh.read()
>
> if b'servo/ports/geckolib' in cargo:
servo exists, so run everything
> return graph.tasks.keys()
else servo does not exist, so run everything but linux64-servo
> logger.info('real servo geckolib not used; removing tasks requiring it')
>
> SERVO_PLATFORMS = {
> 'linux64-stylo',
> }
>
> def fltr(task):
> if task.attributes.get('build_platform') in SERVO_PLATFORMS:
> return False
>
> return True
>
> return [l for l, t in graph.tasks.iteritems() if fltr(t)]
From what I understand, in this case, the logic should be:
Set up the condition, by looking at the owner.
If the owner is the vcs sync service
run everything
else
run everything but linux64 servo
So basically just a different condition.
I'm not totally sure that answers your question, though.. let me know if not :)
Flags: needinfo?(dustin)
Reporter | ||
Comment 9•8 years ago
|
||
(In reply to Dustin J. Mitchell [:dustin] from comment #8)
> From what I understand, in this case, the logic should be:
>
> Set up the condition, by looking at the owner.
> If the owner is the vcs sync service
> run everything
> else
> run everything but linux64 servo
I may be misunderstanding what "run everything" means in this context, but I believe the logic we want is:
if the owner is the vcs sync service (or whatever check for servo commits):
run only the linux64-stylo tests (because Servo changes can't break Gecko)
else
run all tests, including linux64-stylo
Stylo code changes can land directly in autoland, not just upstream in the Servo GitHub repo. Also, other Gecko code changes might break the Stylo code, so we always want to run the linux64-stylo tests.
Comment 10•8 years ago
|
||
"run everything" = "run all tests, including linux64-stylo", but yes, I did misunderstand what "only" in the bug summary modifies. Thanks!
Reporter | ||
Comment 11•8 years ago
|
||
Oops. I see how my original bug summary was ambiguous, so I will reword it.
Summary: Only run tests for linux64-stylo platform when Servo vcs sync service lands Servo commits in autoland repo → When Servo vcs sync service lands Servo commits in autoland repo, run linux64-stylo tests but skip other platforms (to reduce test load)
Assignee | ||
Comment 12•8 years ago
|
||
I have new patches but I'm not sure how to test a new filter via try or if there is a different mechanism I should use
Assignee | ||
Comment 13•8 years ago
|
||
kmoir: maybe don't test on try, but test locally with `./mach taskgraph optimized` from a parameters from a stylo merge?
10:34 AM
<kmoir> Kim Moir okay will try that, thanks!
10:34 AM
<Callek> (maybe optimized --json if you want to see the tasks not just taskids, and/or mach taskgraph target)
Assignee | ||
Comment 14•8 years ago
|
||
Attachment #8853533 -
Attachment is obsolete: true
Attachment #8854072 -
Flags: feedback?(dustin)
Comment 15•8 years ago
|
||
Comment on attachment 8854072 [details] [diff] [review]
bug1339542-2.patch
Review of attachment 8854072 [details] [diff] [review]:
-----------------------------------------------------------------
This is the right idea, just needs a tweak to the logic :)
You can test this in different scenarios as Callek suggested. Just change the parameters in `parameters.yml` to simulate different conditions (e.g., set owner to the sync user, and to someone else).
::: taskcluster/taskgraph/filter_tasks.py
@@ +34,5 @@
> +
> +
> +@filter_task('check_servo')
> +def filter_servo(graph, parameters):
> + """Filters out tasks requiring Servo if Servo isn't present."""
This docstring needs a tweak, I think.
@@ +47,5 @@
> + if parameters.get('owner') == "servo-vcs-sync@mozilla.com" and \
> + task.attributes.get('build_platform') in SERVO_PLATFORMS:
> + return True
> +
> + return False
I think this will run nothing if owner != servo-vcs-sync? I suspect you want
if owner != servo-vcs-sync:
return true
return build_platform in SERVO_PLATFORMS
Attachment #8854072 -
Flags: feedback?(dustin) → feedback+
Assignee | ||
Comment 16•8 years ago
|
||
I tested this and got the expected results
Attachment #8854072 -
Attachment is obsolete: true
Attachment #8854135 -
Flags: review?(dustin)
Updated•8 years ago
|
Attachment #8854135 -
Flags: review?(dustin) → review+
Comment 17•8 years ago
|
||
Pushed by kmoir@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/37162353a3a2
When Servo vcs sync service lands Servo commits in autoland repo, run linux64-stylo tests but skip other platforms (to reduce test load) r=dustin DONTBUILD
Comment 18•8 years ago
|
||
bugherder |
Assignee | ||
Comment 19•8 years ago
|
||
Looks like this is working after the merge from m-c
https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=ff65f545908426cd3d420a19592b0c3730ce5b5d
Updated•6 years ago
|
Component: Platform Support → Buildduty
Product: Release Engineering → Infrastructure & Operations
Updated•5 years ago
|
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•