We currently use `--option=arg` in the decision task [1], but
`--option arg` in treeherder actions. These are essentially equivalent.
In scriptworkers' chain of trust verification, we verify the
action or decision task's command is allowlisted. To do so, we ignore
options [2]. By specifying them as `--option=arg`, we're able to skip
verifying args as well as options.
We have plans to make this better, but until then, let's use
`--option=arg`.
[1] https://hg.mozilla.org/mozilla-central/file/ab2d700fda2b/.taskcluster.yml#l111
[2] 8437d4cd38/scriptworker/cot/verify.py (L903)
This fixes:
```
rest_framework/filters.py:74: DeprecationWarning: The built in 'rest_framework.filters.DjangoFilterBackend' is deprecated. You should use 'django_filters.rest_framework.DjangoFilterBackend' instead.
rest_framework/filters.py:50: DeprecationWarning: The built in 'rest_framework.filters.FilterSet' is deprecated. You should use 'django_filters.rest_framework.FilterSet' instead.
```
This is to allow any job type to be able to belong to any
job group. This will also mean that if someone accidentally
picked the wrong group for a job type, we don't need to
fix it in the DB for all new jobs. They can fix their task
definition, and all new jobs will go to the new job group.
This includes a management command to migrate the old
data from job_type.job_group to the new field of job.job_group.
A follow-up PR will remove the old field and set the API to
read from the job.job_group field.
By default MySQL#s InnoDB flushes to disk after every transaction to
reduce the chance of data loss in the case of a crash. During testing
and development this is not necessary and only serves to limit I/O
throughput. By switching to mode `0` (flushing every second), test
runtimes are reduced by 20-30%.
See:
https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_flush_log_at_trx_commit
Since it's mostly pointless locally, given that the DB is rarely
large enough to cause a slow query and that it's unlikely that devs
check the logs anyway.
pytest treats objects starting with the string "Test" as tests, so an
underscore prefix has been added to prevent warnings of form:
```
WC1 .../test_detect_intermittents.py cannot collect test class 'TestFailureDetector' because it has a __init__ constructor
```
The split of test directories between each Python chunk has been
adjusted to more evenly balance runtime. The `tests/e2e` directory
has been moved from chunk B to chunk A, and the `tests/webapp/embed`
+ `tests/webapp/graphql` directories from chunk C to chunk A.
Short of moving tests in the `tests/webapp/api` directory around,
this is the best we can do for now. Hopefully bug 1348947 can
improve the situation in the future.
Travis occasionally update the stable release Trusty image, however
not as often as would be ideal. The newer images now have recent
yarn pre-installed, meaning the manual install steps can be removed.
In addition, the `$HOME/bin` directory now exists by default in the
image.
Whilst the sudo-less EC2 container builds have a faster boot time than
the fully virtualised GCE jobs (1s vs 20-30s), they have less CPU/RAM
available due to resource contention, so are slower than GCE for
longer running jobs.
Switching roughly halves the runtime of this job.
When an action has no schema, this hides the JSON payload field and
doesn't try to JSON.parse it.
Note that this still fails for schema = {}, since json-schema-defaults
returns `undefined` for that value.
To prevent confusing pytest `ImportMismatchError` exceptions if the
paths hardcoded in pyc files (which are git-ignored) leftover from
the past, don't match the paths used now.
To reduce the risk that one of the commands we run is broken by things
that need cleaning up (eg pyc files). An unnecessary `|| true` has also
been removed from the `rm -f` moved command.
It's having to be added as a platform rather than a new job/group
name, since otherwise comparisons can't be made in Perfherder with
the existing tests.