yaml.load() can evaluate arbitrary Python code via syntax such as
`!!python/object/apply:os.system`. Seriously.
Let's switch taskgraph to yaml.safe_load(), which is reasonable
about limiting magic.
Differential Revision: https://phabricator.services.mozilla.com/D1736
Summary:
We need to run things less often than once a day, so adding support for
days to taskcluster cron. 'day' is the day of the month, 'weekday' is used
as a datetime.weekday (not isoweekday), or a string comparable to strftime('%A')
or strftime('%a')
Reviewers: dustin
Reviewed By: dustin
Bug #: 1453067
Differential Revision: https://phabricator.services.mozilla.com/D903
--HG--
extra : rebase_source : 65be900f383a2c4fd6240d4b8fb0eebef613281f
This is a new issue that gets linted with flake8 3.5.0. Basically you should
never use a blank except: statement.
This will catch all exceptions, including KeyboardInterrupt and SystemExit
(which is likely not intended). If a catch all is needed, use
`except: Exception`. If you *really* mean to also catch KeyboardInterrupt et
al, use `except: BaseException`.
Of course, being specific is often better than a catch all.
MozReview-Commit-ID: FKx80MLO4RN
--HG--
extra : rebase_source : 7c74a7d0d81f2c984b47aff3a0ee3448b791177b
Changes to cron decision tasks:
- drops some unnecessary routes
- drops tags.createdForUser: nobody@..
- more use of environment variables within the command line
MozReview-Commit-ID: 9zoqFvwrBRs
--HG--
extra : rebase_source : 77e17089b67e5d72360d5ecb617887b7a71457fe
We'd like to use routes like:
index.gecko.v2.mozilla-central.latest.firefox.decision
to automatically find the latest parameters.yml file from a decision task. Unfortunately,
sometimes the latest decision task happens to be triggered by a cron job which uses a different
target_tasks method and therefore won't generate the expected tasks.
This patch *should* create a different index for these types of decision tasks, though I'm not
sure how I can test it before pushing.
MozReview-Commit-ID: 1993ISgb1Dn
--HG--
extra : rebase_source : f86fc60e823e02b922e5eec888620a28f4dc254c
This is needed before we can upgrade to flake8 3.3.0, as that version starts flagging these errors.
These files were modified by running:
autopep8 --select E305 --in-place -r <dir>
on the affected directories. I did it one dir at a time and verified the result after each.
MozReview-Commit-ID: FmlsfiKIbtr
--HG--
extra : rebase_source : 9df32258cadff5d27a0e72113c57f782756c0b18
The purpose of this parameter has been superseded by the `include_nightly`
property.
MozReview-Commit-ID: 4iXQsv9Drqg
--HG--
extra : rebase_source : c94142282909a88c29fe6809d87721bef1f198c2
Various modules under taskcluster are doing ad-hoc url formatting or
requests to taskcluster services. While we could use the taskcluster
client python module, it's kind of overkill for the simple requests done
here. So instead of vendoring that module, create a smaller one with
a limited set of functions we need.
This changes the behavior of the get_artifact function to return a
file-like object when the file is neither a json nor a yaml, but that
branch was never used (and was actually returning an unassigned
variable, so it was broken anyways).
At the same time, make the function that does HTTP requests more
error-resistant, using urllib3's Retry with a backoff factor.
Also add a function that retrieves the list of artifacts, that while
currently unused, will be used by `mach artifact` shortly.
--HG--
extra : rebase_source : d7ef633e8e5041dc8450f3ff2f3751c85f144cdc
Instead of every file trying to get the top source directory having an
ad-hoc definition that gets wrong if the files gets moved around for
some reason, define it in a more central location.
--HG--
extra : rebase_source : 1a0cbea267193f6b388b88b36166353e20ac8569
Instead of every file trying to get the top source directory having an
ad-hoc definition that gets wrong if the files gets moved around for
some reason, define it in a more central location.
--HG--
extra : rebase_source : 06fa06d47732223e19b0201f8791fdbffdc9ee03
This requires moving the schema utilities to their own util module.
MozReview-Commit-ID: KR5xSJ9ak5Y
--HG--
extra : rebase_source : 1c1f6bfb6a08deb8c0be4b2b58db02d85aafeb89
This adds `.cron.yml` and a new mach command to interpret it. While
functionality is limited to nightlies right now, there is room to expand to
more diverse periodic tasks. Let your imagination run wild!
MozReview-Commit-ID: KxQkaUbsjQs
--HG--
extra : rebase_source : ddf0a1eadae5a1169c0ead7bcb7b9ce61b255fbf