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

32 Коммитов

Автор SHA1 Сообщение Дата
Andrew Halberstadt 0e697ce235 Bug 1422302 - Create python/mozterm for sharing terminal blessings across modules r=gps
This is a new module that will provide a place to store some common
abstractions around the 'blessings' module. The main entrypoint is:

    from mozterm import Terminal
    term = Terminal()

If blessings is available, this will return a blessings.Terminal()
object. If it isn't available, or something went wrong on import,
this will return a NullTerminal() object, which is a drop-in
replacement that does no formatting.

MozReview-Commit-ID: 6c63svm4tM5

--HG--
extra : rebase_source : 9ab221774d92a418d9b098d79bb2c88f75d937f8
2017-12-04 09:38:24 -05:00
Tom Prince 98988ab6fc Bug 1421002: Get tasks for `mach try fuzzy` from the root of the repository; r=ahal
`mach try` pushes the repository containing the current directory. When this is
a comm-central checkout, the taskcluster configuration should also come from that
repository.

MozReview-Commit-ID: KWbNAe4jrHT

--HG--
extra : rebase_source : e40f5038bdd190fb4cb801ba817c31a3e4031354
extra : source : 7164b051c965280aeb3083e47a93c6d4ac44e2ed
2017-11-21 13:39:21 -07:00
Andrew Halberstadt 28d07aeea3 Bug 1414919 - [tryselect] Add --rebuild support to |mach try fuzzy|, r=jmaher
This allows rebuilding all selected tasks. This defines an upper limit of
20 rebuilds per push. If more are needed, developers can either change it
in code or push multiple times.

MozReview-Commit-ID: I0XtMP5yEEq

--HG--
extra : rebase_source : 2583bed5dd33df72a4d7f1cd0ce012e412418c5e
2017-11-07 10:27:44 -05:00
Andrew Halberstadt 52dad304bf Bug 1414399 - [moztest] Refactor |mach test|'s resolving logic into moztest.resolve r=gps
The code in |mach test| for test resolving, should get merged with the TestResolver
class in moztest.resolve. This way it can be shared with other modules and we'll
have a single canonical place for all our test resolving logic.

MozReview-Commit-ID: IHRXXi5mB4G

--HG--
extra : rebase_source : 6f96d06412ab8fa152ac5d9bdd15acbcdc9695c4
2017-11-08 09:59:51 -05:00
Andrew Halberstadt 8f49c97d69 Bug 1414894 - [tryselect] Don't install shell extensions when bootstrapping fzf for |mach try fuzzy|, r=armenzg
Currently the prompts don't make it clear enough that running fzf will mess with your
shell settings. This means users could install it without realizing, forget and get
confused later on.

Rather than try to address this, it's simpler to always skip the shell extensions as
|mach try fuzzy| doesn't need them anyway. The extensions are useful, but are better
installed via something like |mach bootstrap| which can be tackled in a separate bug.

MozReview-Commit-ID: 2kx7UGO5LJ0

--HG--
extra : rebase_source : 64474626aeab9f2f04f491afc65ca7cadd717296
2017-11-06 20:29:25 -05:00
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 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
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
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
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 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 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 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
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