Closed
Bug 1242083
Opened 9 years ago
Closed 9 years ago
Support --setenv in try syntax to set environment variables
Categories
(Release Engineering :: Applications: MozharnessCore, defect)
Release Engineering
Applications: MozharnessCore
Tracking
(firefox47 fixed)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
firefox47 | --- | fixed |
People
(Reporter: MattN, Assigned: chmanchester)
References
Details
Attachments
(1 file, 1 obsolete file)
For mochitest-browser-screenshots, the env. variable MOZSCREENSHOTS_SETS lets one pick which browser combinations to capture e.g. `MOZSCREENSHOTS_SETS=LightweightThemes,Tabs,WindowSize` and it would be convenient if developers could easily specify that in try syntax to get non-default screenshots.
There are some other environment variables used by our applications that could also use this feature.
Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=76971f07ef86
Reporter | ||
Comment 1•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/32035/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/32035/
Attachment #8711234 -
Flags: review?(cmanchester)
Reporter | ||
Comment 2•9 years ago
|
||
Comment on attachment 8711234 [details]
MozReview Request: Bug 1242083 - Support --setenv in try syntax to set environment variables. r=chmanchester
So the try push reminded me why this may not be ideal: the argument is passed to harnesses that give an error due to the unknown argument.
Should I implement a solution like --try-test-paths?
Attachment #8711234 -
Flags: review?(cmanchester) → feedback?(cmanchester)
Assignee | ||
Comment 3•9 years ago
|
||
https://reviewboard.mozilla.org/r/32035/#review29089
::: testing/mozharness/mozharness/mozilla/testing/try_tools.py:48
(Diff revision 1)
> known_try_arguments = {
> + '--setenv': {
> + 'action': 'append',
> + 'dest': 'environment',
> + 'default': [],
> + "metavar": "NAME=VALUE",
> + },
As you've found this will cause problems for harnesses that don't take this argument. It looks like it would be pretty straightforward to have an idea here of what flavors an argument is acceptable for, make harness_extra_args a dict mapping flavors to args, and then take arguments based on flavor in the try_args function.
How does that sound?
Assignee | ||
Updated•9 years ago
|
Attachment #8711234 -
Flags: feedback?(cmanchester)
Comment 4•9 years ago
|
||
MattN and I spoke about this to be possible for both try syntax as well as properties when scheduled out of band with mozci.
From looking at the code [1], TryToolsMixin is available for test jobs.
I will be reading tomorrow my comment in [2] and see what exactly we need to support properties for test jobs as well (since that comment was about talos).
This is just a heads up about our intentions.
[1] https://dxr.mozilla.org/mozilla-central/source/testing/mozharness/mozharness/mozilla/testing/testbase.py#102
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1241535#c2
Assignee | ||
Comment 5•9 years ago
|
||
Armen, comment 3 is all we need to do this from try syntax. Let me know if you'd like me to write the patch.
Assignee | ||
Comment 6•9 years ago
|
||
Reporter | ||
Comment 8•9 years ago
|
||
Yep!
> --setenv MOZSCREENSHOTS_SETS=LightweightThemes,Tabs,WindowSize
led to https://treeherder.mozilla.org/logviewer.html#?job_id=16306592&repo=try#L1501
> console.info: mozscreenshots: 3 sets: Array ["LightweightThemes","Tabs","WindowSize"]
Works great
Reporter | ||
Updated•9 years ago
|
Assignee: MattN+bmo → cmanchester
Assignee | ||
Comment 9•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/33659/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/33659/
Attachment #8715931 -
Flags: review?(armenzg)
Comment 10•9 years ago
|
||
Comment 11•9 years ago
|
||
Comment 12•9 years ago
|
||
Comment on attachment 8715931 [details]
MozReview Request: Bug 1242083 - Add --setenv to the arguments accepted by mozharness to pass to the harness command, add a way to specify flavors an argument applies to. r=armenzg
https://reviewboard.mozilla.org/r/33659/#review30451
wfm
::: testing/mozharness/mozharness/mozilla/testing/try_tools.py:53
(Diff revision 1)
> - },
> + }, ('marionette', 'xpcshell', 'mochitest', 'browser-chrome',
Could you please re-org the suites alphabetically?
It will make it easier in the long term what suites are applicable to each argument.
Perhaps listing one per line.
Attachment #8715931 -
Flags: review?(armenzg) → review+
Reporter | ||
Updated•9 years ago
|
Attachment #8711234 -
Attachment is obsolete: true
Comment 13•9 years ago
|
||
Comment 14•9 years ago
|
||
bugherder |
You need to log in
before you can comment on or make changes to this bug.
Description
•