Commit Graph

20 Commits

Author SHA1 Message Date
Andrew Halberstadt
c451dcfe84 Bug 1391075 - Add template to modify task env from |mach try fuzzy|, r=dustin
This adds a new morph template for modifying a task's env and the corresponding glue
to specify it from |mach try fuzzy|. It can be used like:

./mach try fuzzy --env FOO=1 --env BAR=baz

This will simply set those environment variables in *all* tasks. We could add the
ability to only specify it for a subset of tasks in the future, but that seems like
a hard problem that probably isn't worth it.

MozReview-Commit-ID: C4sokv886PU

--HG--
extra : rebase_source : 64c9105848e6becd33fae63aeabc3423cfda3bdf
2017-08-25 15:24:22 -04:00
Andrew Halberstadt
e4dbc67d72 Bug 1395267 - [tryselect] Make default try selector used when running |mach try| without subcommands configurable, r=armenzg
To use this, create a ~/.mozbuild/machrc file and add:
[try]
default = fuzzy

Now, running |mach try| without a subcommand will default to the fuzzy selector. The syntax selector can still be
run with |mach try syntax|.

MozReview-Commit-ID: Ai6f8cW3Swq

--HG--
extra : rebase_source : 6a107478f7fbd7d8deb4882f0892963fed755b33
2017-08-30 14:45:46 -04:00
Andrew Halberstadt
6cd4e21e4b Bug 1394391 - [tryselect] Split hg implementation of files_changed to a list, r=jhford
This fixes a regression from bug 1384593. I was going to add a test for this, but it would be
a better use of time to fix bug 1185599 and add a test there. We already have vcs tests in other
parts of the tree so consolidating them into a single module is likely easier than standing up
another one-off vcs tester.

MozReview-Commit-ID: E51Tb1qC9Wb

--HG--
extra : rebase_source : f957b1857d162fd229dcef0e87668dd270512cf7
2017-08-28 09:13:46 -04:00
Andrew Halberstadt
f3a31869bb Bug 1393509 - Fix artifact builds on windows with |mach try fuzzy|, r=dustin
MozReview-Commit-ID: Fo3WzFEdLUF

--HG--
extra : rebase_source : f52c2e19bdad6e28ded106cfcdc64f3464281d54
2017-08-24 12:30:40 -04:00
Andrew Halberstadt
8c19582e1b Bug 1390969 - [tryselect] Add ability to save and load presets to |mach try fuzzy| r=jgraham
This also prints the last known query used in the commit message. This won't be accurate as
users can delete + enter multiple queries in a single session, but will give users a slightly
better idea of what was scheduled by glancing at the commit message.

MozReview-Commit-ID: 93FbEmMvd9t

--HG--
extra : rebase_source : fc09dd145a5e88e5bb77e4e483552b579e90f3ca
2017-08-24 11:04:56 -04:00
Andrew Halberstadt
9e440c1a44 Bug 1390969 - [tryselect] Pull presets handling out of the 'syntax' selector r=jgraham
MozReview-Commit-ID: KmXRj8TBvYK

--HG--
extra : rebase_source : 68974fcc3216aeb481690de1a6ee905735a3b3b7
2017-08-17 11:14:07 -04:00
Andrew Halberstadt
a4a6ffdd99 Bug 1391675 - [tryselect] Add a test for 'mach try fuzzy' and associated task, r=gps
Basic test to get the ground work laid out.

MozReview-Commit-ID: LmjA3Kq7xKN

--HG--
extra : rebase_source : c32e1954b6b5b88c825075c64c8b9993be3035c6
2017-08-21 11:52:28 -04:00
Andrew Halberstadt
dd95aa68cc Bug 1391675 - [tryselect] Move --no-push into common arguments, r=armenzg
The main motivation behind this change is to make testing easier, so e.g:
./mach try fuzzy --no-push
and
./mach try syntax --no-push

both work the same way.

MozReview-Commit-ID: LmjA3Kq7xKN

--HG--
extra : rebase_source : 49beb7e1ae0f7502966ebadc4d9c37cae4357df4
2017-08-21 13:14:31 -04:00
Andrew Halberstadt
60a3f8a31c Bug 1391675 - [tryselect] Make main command and all subcommands use the same argument parser, r=armenzg
This will give us a good way to share arguments between subcommands.

MozReview-Commit-ID: KmXRj8TBvYK

--HG--
extra : rebase_source : 9ff275af226cfe65697b980d1b19f9ca9e1dad5f
2017-08-17 11:13:50 -04:00
Andrew Halberstadt
d6f78fb8de Bug 1387135 - Add ability to use 'artifact' template to |mach try fuzzy|, r=maja_zf
This uses the new templating mechanism in taskgraph to schedule artifact builds when using
|mach try fuzzy|. Like |mach try syntax|, this will automatically be enabled if
--enable-artifact-builds is set in the mozconfig. The --artifact/--no-artifact arguments
can be used to override the default.

MozReview-Commit-ID: J8HVZzOt4mX

--HG--
extra : rebase_source : 130fa85ed24ef8f0fe5a713f254bbffd1a83b5a7
2017-08-15 11:39:46 -04:00
Andrew Halberstadt
968d6b9c63 Bug 1390141 - Pipe stderr to devnull when checking for hg in |mach try|, r=gps
MozReview-Commit-ID: IRL3GFP8CpI

--HG--
extra : rebase_source : f78c9247263816ed4572aa5748ab7cf776238e74
2017-08-16 08:22:38 -04:00
Andrew Halberstadt
79bcfe8372 Bug 1390605 - Add ability to use full_task_set and tasks from other projects to mach try fuzzy, r=Callek
This adds --full to switch to using the full_task_set instead of the target_task_set. The full set has
around ~7000 tasks while the target set for mozilla-central has ~2300, so I think leaving the target as
default makes sense (as it is the 95% use case).

This also adds the ability to specify a custom parameters.yml file via -p/--parameters. This just gets
forwarded to the taskgraph for generation.

MozReview-Commit-ID: Esjvkh1p0Yw

--HG--
extra : rebase_source : 69bfdfe2f418001b8446259461a8e404669e37e7
2017-08-15 15:22:56 -04:00
Jeff Gilbert
a10070cf8b Bug 1389366 - Fix |mach try| when hg is not installed. - r=ahal
Also find_executable doesn't seem to work on my windows machine, so I've replaced it.

MozReview-Commit-ID: 3mE4UeQ2ecy
2017-08-11 13:26:58 -07:00
Andrew Halberstadt
ae1a1c1bc5 Bug 1388811 - [try fuzzy] Add ability to run non-interactive fuzzy queries, r=armenzg
MozReview-Commit-ID: JojBS8pZHSk

--HG--
extra : rebase_source : 9a2e497d7789e3a41a37668eda05168e8301aa5b
2017-08-09 13:11:47 -04:00
Andrew Halberstadt
a98a4718e6 Bug 1384593 - Add an fzf based fuzzy try selector, r=armenzg
This try selector works as follows:

1. Generate target tasks (similar to ./mach taskgraph target)
2. Pipe all tasks to fzf (a fuzzy finding binary, this will be bootstrapped if necessary)
3. Allow user to make selection
4. Save selected tasks to 'try_task_config.json'. This is a new try scheduling
   mechanism built into taskcluster (see bug 1380306).
5. Use `hg push-to-try` (or git-cinnabar) to push the added file to try. This
   will use a temporary commit, so no trace of 'try_task_config.json' should be
   left over after use.


If you get messages like STOP! No try syntax found, you need to update version-control-tools:
./mach mercurial-setup --update



MozReview-Commit-ID: 4xHwZ9fATLv

--HG--
extra : rebase_source : e22ccb44d5e99e1556bf7315b096b5d6ac96c918
2017-07-27 11:48:53 -04:00
Andrew Halberstadt
e659d18525 Bug 1384593 - Abstract version control functionality out of syntax.py to vcs.py, r=armenzg
This copies the vcs abstraction from python/mozlint/mozlint/vcs.py. Consumers can call:

    VCSHelper.create()

and that will automatically detect whether we're in hg or git and return the appropriate
abstraction class.

MozReview-Commit-ID: 4xHwZ9fATLv

--HG--
extra : rebase_source : f89a0884a58c5057e7edebf85e7cdfca4c5b58bd
2017-07-27 11:39:27 -04:00
Andrew Halberstadt
d94b81dc03 Bug 1384257 - Fix AttributeError when passing paths into |mach try|, r=maja_zf
MozReview-Commit-ID: IuuXt1XHUuM

--HG--
extra : rebase_source : 791d9ee74b3c0fac5f79eb66ce66544ea3aeedef
2017-07-25 15:51:35 -04:00
Andrew Halberstadt
2a6c9e6348 Bug 1382775 - Move autotry logic from |mach try| into autotry proper, r=chmanchester
This is a straightforward copy of code from the mach_commands.py to autotry.py

MozReview-Commit-ID: 7TkbTff0Tv8

--HG--
extra : rebase_source : 7996131427217d9f0213af920d0d4ef0d2e7d0ac
extra : source : f0693a73539265f74f79db9d1e136e7f1c16a1f0
2017-07-18 08:52:42 -04:00
Andrew Halberstadt
7b130edcb5 Bug 1382775 - Add tools/tryselect to flake8 linter, r=chmanchester
This also fixes a handful of lint errors in the mach_commands.py and syntax.py files.

MozReview-Commit-ID: 6nXz87ch3z4

--HG--
extra : rebase_source : f4dd8e19066a28793a941112a39243429a234969
2017-07-17 21:40:15 -04:00
Andrew Halberstadt
88348cfd21 Bug 1382775 - Move testing/tools/autotry to tools/tryselect/selectors/syntax.py, r=chmanchester
The |mach try| implementation isn't really testing specific so figured while doing this refactor
anyway we could take the opportunity to move it to /tools. This renames the "autotry" module to
"syntax" as one of the 'selectors' under the newly created tryselect module.

MozReview-Commit-ID: DmnGU5sKuCk

--HG--
rename : testing/tools/autotry/autotry.py => tools/tryselect/selectors/syntax.py
extra : rebase_source : 52f2a61d97107b8d50e3894ea0f5cd9c24d4108d
2017-07-17 21:36:23 -04:00