Python 3's `map()`, `filter()` and others now return iterators rather
than list/..., so must be cast back to a `list()` if used in contexts
where an iterator is not supported.
This merges the three separate non-selenium Python test jobs into
one, reducing the overall job count from 7 to 5. This helps avoid
hitting Travis concurrency limits, that delay starting the selenium
job (which is the long pole for the end to end time).
Previously all created/updated `RunnableJobs` entries were using the
`job_group` default of `2`, rather than the actual job group ID.
Not bothering to add a test since `RunnableJobs` will be going away
once buildbot supported is removed.
The pytest run would normally ensure that the migrations succeed and
that none are missing. However the unit tests currently fail due to
bug 1428362, so this provides equivalent coverage in the meantime.
Since under Python 3 `zip()` returns an iterable rather than a list,
which causes Django to ignore the value passed to `choices`, and so
results in `makemigrations` creating a new migration removing the
choices present in the existing migration.
Now that the models / `settings.py` contain the `unicode_literal`
import, we either need to generate a new migration to bring the
migrations in sync with the model, or else manually edit the existing
migrations.
We have to do the latter for the `replaces` property instances due to:
https://code.djangoproject.com/ticket/29290
...so for consistency (and to save creating a pointless migration),
we do so for the other instances too.
To prevent new migrations generated by `makemigrations` or
`squashmigrations` from containing spurious bytestring attributes:
https://docs.djangoproject.com/en/1.11/topics/migrations/#supporting-python-2-and-3
The `settings.py` addition is required since the app name used in
the `replaces` property of squashed migrations comes `INSTALLED_APPS`,
since we're not using the newer approach of an `AppConfig` defined
in `apps.py`.
The `login.html` partial is a leftover from the switch to Auth0 in
bug 1395356, and `errorActions.html` appears to have never been used
since it landed in 8e56de8 (bug 1321798).
Even though the raw unicode (`ur`) string is in the Python 2 branch
of the conditional, the whole file was parsed, causing a `SyntaxError`
when running Django check under Python 3:
```
...
File "/home/vagrant/treeherder/treeherder/etl/text.py", line 13
filter_re = re.compile(ur"([\U00010000-\U0010FFFF])", re.U) # noqa: E999
^
SyntaxError: invalid syntax
```
The `ur` syntax isn't supported under Python 3 (since it was removed
by https://bugs.python.org/issue15096), however we can use the
workaround suggested here:
https://stackoverflow.com/a/33027349
* Switches from the deprecated Django `six` shim to importing directly.
* No longer imports `input` into the global namespace, to stop `futurize`
from falsely thinking it needs converting to use `future.builtins`.
Relative imports found by running:
`futurize -w -n -f absolute_import .`
...however then hand-edited to convert to absolute, and the newly added
`from __future__ import absolute_import` removed (since we mostly
don't use relative imports, and PEP8 prefers absolute).
Since it's hidden and has never been used.
The `thSettingsPanel.html` partial is a leftover from when this
feature was first added in 3e625f3 / 6b0c56e.
* enable react/prop-types eslint rule
While enabling this, I set all the PropTypes as ``isRequired`` then ran the app
and wherever I hit issues where the value was undefined, then I removed ``isRequired``.
* Enable react/require-default-props eslint rule
In some cases "null" was the best default. I think this is OK. But having empty arrays
for others meant less checking in the actual code, so bonus! :)
After looking at these, I think I want to go back to using "th" prefix and "ph" prefix.
It is a nice way to see right off the bat that these are constants that are established
by our code and not some external library. So converting ``platformMap`` back to
``thPlatformMap``. It also makes for less code/blame churn as we move to imported
constants.
* Move thOptionOrder to constants.js
* Move thFailureResults to constants.js
* Move thRepoGroupOrder to constants.js
* Move thFavIcons to constants.js
* Move phCompareDefaultOriginalRepo to constants.js
* Move phCompareDefaultNewRepo to constants.js
* Move thDefaultRepo to constants.js
* Move thTitleSuffixLimit to constants.js
* Move phTimeRanges to constants.js
* Move thDateFormat to constants.js
* Move phDefaultTimeRangeValue to constants.js
* Move phTimeRangeValues to constants.js
* Move phBlockers to constants.js
* Move phDefaultFramework to constants.js
* Move phAlertSummaryStatusMap to constants.js
* Move phAlertSummaryIssueTrackersMap to constants.js
* Move phAlertStatusMap to constants.js
* Move thJobNavSelectors to constants.js
* Move thPerformanceBranches to constants.js
* Move phDashboardValues to dashboard.js
* Move phCompareBaseLineDefaultTimeRange to constants.js
* Move thPinboardCountError to constants.js
* Remove now-unused values.js
* Move thResultStatusFilters to constants.js
* Move thEvents to constants.js
* Move thAggregateIds to a aggregateIdHelper.js
* Move thReftestStatus to jobHelper.js
* Remove now-unused provider.js