Граф коммитов

189 Коммитов

Автор SHA1 Сообщение Дата
Andrew Halberstadt 22eb565843 Bug 1413374 - [tryselect] Fix |mach try empty| regression and add a test, r=armenzg
MozReview-Commit-ID: Iv2RDqqhL57

--HG--
extra : rebase_source : c609fea4ff27766027fb072bd7c778f3884a1d46
2017-11-01 08:12:42 -04:00
Andrew Halberstadt 25bfeaa7a6 Bug 1412134 - [tryselect] Redirect stderr to a separate pipe, r=chmanchester
We parse the output of several version control commands in |mach try|, yet
redirect stderr to stdout. This is causing issues for people whenever the
vcs outputs some kind of warning.

MozReview-Commit-ID: F0L56at0MYS

--HG--
extra : rebase_source : 40be54cd1a9e2b87c4d2b3ed7adeeec40f937a39
2017-10-30 16:35:45 -04:00
Andrew Halberstadt fed6622b29 Bug 1400503 - [tryselect] Add an option to open the presets file in an editor, r=armenzg
MozReview-Commit-ID: 2jwdAaNWHH7

--HG--
extra : rebase_source : 8b3d054ce7b6deae439ba657c9c7607043898b3d
2017-10-27 14:58:34 -04:00
Andrew Halberstadt d801a6a681 Bug 1400503 - [tryselect] Separate 'common_arguments' into groups sub-parsers can opt-in to, r=armenzg
This allows subparsers more control over which sets of arguments they need to
implement.  For example, it doesn't make sense for the 'empty' selector to
accept the preset arguments.  Now it can opt-out of those and only implement
the 'push' arguments.

MozReview-Commit-ID: GOfjcFtlfDD

--HG--
extra : rebase_source : 4542adc49e38ff8c450a16363706aba669ad6594
2017-10-27 11:06:24 -04:00
Gregory Szorc a56fef0fd4 Bug 1410969 - Consolidate code for resolving path metadata; r=ahal
find_paths_and_tags() can instantiate a BuildReader to read moz.build
metadata. We switch `mach test` to call this to avoid some redundant
code.

To facilitate `mach try`'s use case, we add test flavors to the
result of find_paths_and_metadata() and change the function name to
reflect its more generic purpose.

MozReview-Commit-ID: Lcz05W8g2dt

--HG--
extra : rebase_source : 17d6f23275f4eed1bd544a9b2cd991214625dabc
2017-10-23 10:42:41 -07:00
Gregory Szorc 9a4d779385 Bug 1410969 - Return dict from find_paths_and_tags(); r=ahal
This will make the return value more easily extensible and will help
consumers know what the data structures represent.

MozReview-Commit-ID: DaeYsqfMW37

--HG--
extra : rebase_source : 440d16f0604b21f0ec885e1bca5066c32b18f641
2017-10-23 10:36:38 -07:00
James Graham f8e091e39a Bug 1401150 - Support try pushes on a closed tree with mach try, r=ahal
This adds the magic CLOSED TREE string to the commit message for both
try syntax and the fuzzy frontend.

MozReview-Commit-ID: 492UME3VcJN

--HG--
extra : rebase_source : 425a83d6370609e1e162379213d547458c8e8cf2
2017-10-16 18:59:45 +01:00
Andrew Halberstadt 7532e51ef9 Bug 1406777 - Support --message and --no-push with |mach try empty|, r=armenzg
This adds all the common arguments to |mach try empty|, including preset
arguments which will just be ignored if specified. The commit message can be
changed with:
./mach try empty -m DONTBUILD

MozReview-Commit-ID: 5RYfLBOIX1g

--HG--
extra : rebase_source : 412cbc50c2901a97893779a73a7f70d5ee6e2d72
2017-10-11 15:45:08 -04:00
Andrew Halberstadt cb9156b339 Bug 1401199 - [tryselect] Pass in strict=False when generating tasks, r=dustin
MozReview-Commit-ID: 9XWlLeGcPeQ

--HG--
extra : rebase_source : 05dbf742089e857eb697736ee6a6619192c07365
2017-09-29 11:36:42 -04:00
Andrew Halberstadt 776ed09b77 Bug 1404067 - [tryselect] Improve error message on parameter mismatch, r=dustin
MozReview-Commit-ID: GMiGuNApoUF

--HG--
extra : rebase_source : 326df920793b54806cd4423ec0bf0e20df6cd42d
2017-09-28 15:25:34 -04:00
Wes Kocher 3042f50d29 Bug 1400425 - Add a `mach try empty` command to push to try with no prompts r=ahal
MozReview-Commit-ID: 6F5vEpTTDS

--HG--
extra : histedit_source : be02948a579b5dfc274f96a0d9ea07a80bc150a7%2C9e820e3058b87aea959a2fa764e3ef0789dc0652
2017-09-25 16:06:50 -07:00
Wes Kocher 31bba17090 Backed out changeset 7fc37806848f (bug 1400425) for flake8 issues a=backout
MozReview-Commit-ID: 7EI7PgX4YoS
2017-09-25 16:06:09 -07:00
Wes Kocher b4daee707a Bug 1400425 - Add a `mach try empty` command to push to try with no prompts r=ahal
MozReview-Commit-ID: 6F5vEpTTDS

--HG--
extra : rebase_source : b173ca390dad7bbdc9a4c0516ed06331f4b1367a
2017-09-25 15:17:50 -07:00
Andrew Halberstadt 5e9a048a4b Bug 1400469 - Add ability to specify commit message to |mach try|, r=armenzg
MozReview-Commit-ID: LWkAEDWn8NC

--HG--
extra : rebase_source : 24fd977d23f9f09859aa9f9a44c53ffd6c1f4673
2017-09-18 12:43:03 -04:00
Andrew Halberstadt b9233c3ea8 Bug 1400424 - [tryselect] Make sure taskgraph generation is run from topsrcdir, r=dustin
This was preventing us from running ./mach try fuzzy from a subdirectory of the
topsrcdir. This also fixes taskgraph/utils/verify.py to find the docs directory
based off of topsrcdir instead of cwd. This was needed as cwd was being set at
import time.

MozReview-Commit-ID: CgQqD6bQ5q4

--HG--
extra : rebase_source : 4d863d442b0e715b3fe386c43b4077054c10dc70
2017-09-16 00:31:45 -04:00
Chris Manchester 83c39d5afe Bug 1401017 - Make mach try work with -j in the presence of modified local files. r=ahal
Running |./mach try -j <job>| may fail if there are changes in the local
working copy because the command will attempt to provide test paths based
on those changes and subsequently require platforms to be specified on the
basis of those paths. This commit makes this auto-detection only run when
a particular option is passed so this doesn't interfere with the common
case of simply running a selected job on try.

MozReview-Commit-ID: F3RBgDAYi27

--HG--
extra : rebase_source : 81e7774d7b1af31ee188b76afdac5062db1ab811
2017-09-18 14:21:18 -07:00
Gregory Szorc 8f958c2424 Bug 1400429 - Advertise use of `mach try` in commit message; r=ahal
This will allow us to inspect Try pushes to see how many are using
`mach try`.

The commit message for `mach try fuzzy` already advertised its usage.
We tweak the syntax a little so it isn't redundant.

MozReview-Commit-ID: 6kmYRKp0ffF

--HG--
extra : rebase_source : 9dd7caa5404ba235e6a4071802000b8bb740a6b7
2017-09-15 16:17:37 -07:00
Wes Kocher 44fefedf8c Bug 1391123 - Add a newline to the end of try_task_config.json r=gps
MozReview-Commit-ID: BtQntIHOo2G

--HG--
extra : rebase_source : b8e6d6a32ea728590bf4aec85c7605a8829d47c1
2017-09-15 19:02:13 -07:00
ruby af79c59e2a Bug 1397427 - Enable py2 linter on tools/tryselect, r=ahal
MozReview-Commit-ID: K12XisbVQGq

--HG--
extra : rebase_source : 6a97dda2be81fa45601c2f09486c4a187f177cf5
2017-09-13 11:57:47 +05:30
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