Since it's actually needed to catch unused imports, albeit it's a bit
more strict than it used to be, so required some fix-ups before it could
be re-enabled.
These are used by consumers of the package on PyPI, so whilst there are
probably better ways to structure the modules (including more contained
exports by using `__all__`), this is safer/less effort for now.
Fixes:
treeherder/client/thclient/__init__.py:1:1: F401 '.client.*' imported but unused
treeherder/client/thclient/__init__.py:2:1: F401 '.perfherder.*' imported but unused
At some point we should probably just merge perfalert into Perfherder,
but for now let's avoid unnecessary wildcard imports to save a few
characters.
Fixes:
treeherder/perfalert/__init__.py:1:1: F401 '.perfalert.*' imported but unused
This import only affects internal treeherder usage, people using the
PyPI package import from the `thclient` subdirectory instead.
Fixes:
treeherder/client/__init__.py:1:1: F401 '.thclient.*' imported but unused
They only save a few characters and make the location of imported
functions less clear.
Fixes:
treeherder/etl/tasks/__init__.py:1:1: F401 '.buildapi_tasks.*' imported but unused
treeherder/etl/tasks/__init__.py:2:1: F401 '.pulse_tasks.*' imported but unused
treeherder/etl/tasks/__init__.py:3:1: F401 '.classification_mirroring_tasks.*' imported but unused
treeherder/etl/tasks/__init__.py:4:1: F401 '.tasks.*' imported but unused
Fixes:
tests/autoclassify/test_classify_failures.py:7:1: F401 'treeherder.model.models.TextLogErrorMetadata' imported but unused
tests/etl/test_job_loader.py:7:1: F401 'treeherder.model.models.Repository' imported but unused
tests/model/test_classified_failure.py:6:1: F401 'treeherder.model.models.FailureLine' imported but unused
tests/seta/conftest.py:2:1: F401 'django.utils.timezone' imported but unused
tests/seta/test_job_priorities.py:8:1: F401 'treeherder.seta.settings.SETA_LOW_VALUE_PRIORITY' imported but unused
tests/webapp/api/test_text_log_summary_lines.py:4:1: F401 'treeherder.model.models.TextLogError' imported but unused
treeherder/auth/backends.py:13:5: F401 'django.utils.encoding.smart_str as smart_bytes' imported but unused
treeherder/autoclassify/tasks.py:4:1: F401 'django.conf.settings' imported but unused
treeherder/autoclassify/tasks.py:6:1: F401 'treeherder.celery_app' imported but unused
treeherder/perfalert/__init__.py:1:1: F401 '.perfalert.*' imported but unused
treeherder/seta/analyze_failures.py:7:1: F401 'treeherder.etl.seta.valid_platform' imported but unused
treeherder/seta/job_priorities.py:10:1: F401 'treeherder.model.models.Repository' imported but unused
treeherder/seta/models.py:7:1: F401 'treeherder.model.models.Repository' imported but unused
The seta migrations file change is due to the seta models no longer
depending on `model` (since the unnecessary `Repository` import has
been removed).
Since it isn't required on this line as line length checks are disabled,
and in fact disables flake8 for the entire file rather than just the
one line.
These were hidden by the use of `# flake8: noqa`.
treeherder/seta/update_job_priority.py:12:1: F401 'copy' imported but unused
treeherder/seta/update_job_priority.py:14:1: F401 'json' imported but unused
treeherder/seta/update_job_priority.py:16:1: F401 'os' imported but unused
treeherder/seta/update_job_priority.py:17:1: F401 'time' imported but unused
treeherder/seta/update_job_priority.py:54:1: E302 expected 2 blank lines, found 1
treeherder/seta/update_job_priority.py:104:1: E302 expected 2 blank lines, found 1
treeherder/seta/update_job_priority.py:126:1: E302 expected 2 blank lines, found 1
treeherder/seta/update_job_priority.py:129:1: E302 expected 2 blank lines, found 1
treeherder/seta/update_job_priority.py:144:1: E302 expected 2 blank lines, found 1
treeherder/seta/update_job_priority.py:192:23: E127 continuation line over-indented for visual indent
Since it's faster, deterministic and doesn't given obscure errors when
using `--no-bin-links` (which is required for both npm and yarn on
Windows hosts), and as such unblocks the work in bug 1343624.
Many of the commands are the same as with npm. See:
https://yarnpkg.com/en/docs/usage
Node packages that are intended to be called from the command line can
request that symlinks be added to `node_modules/.bin/` as part of their
installation. When `npm/yarn run` is used, it automatically adds that
directory to the PATH, so commands listed in `scripts` in `package.json`
can normally be specified without the full filepath.
However when npm/yarn is used inside a Linux Vagrant instance running on
a Windows host, even though the guest OS supports symlinks, errors will
occur if symlinks are created in a directory that is shared with the
host using Virtualbox shared folders.
In this case, the workaround is to prevent the creation of symlinks
using `--no-bin-links`. However unfortunately instead of having a
sensible fallback (eg a shell script that acts like a symlink) instead
no files are created in `node_modules/.bin/` at all.
As such, we have to use full paths in `package.json` after all.
The `test` script entry in `package.json` (used by `npm test`) already
calls karma with the appropriate parameters, so the helper scripts are
unnecessary.
For the same reason as the previous commit.
Ideally we'd remove the grunt abstraction entirely and call eslint from
the `lint` command, but we might as well save that to the Neutrino PR.
Routing commands via npm/yarn is preferred, since it avoids
having to do global installs of grunt-cli, which simplifies contributor
setup, and means less effort when we switch to Yarn (since it requires
manual PATH setup for globally installed packages).
Since previously the select was evaluated independently of the delete,
causing timeouts when attempting to returning 2.6 million machine ids
from the jobs table.
Now the select queryset isn't evaluated on it's own, and instead is only
used to generate the subquery in eg:
SELECT `machine`.`id`, `machine`.`name` FROM `machine` WHERE NOT
(`machine`.`id` IN (SELECT U0.`machine_id` FROM `job` U0));
In most cases, but not all, we want to expire performance datum on the
same cadence as job data. Add some code to do this, with an optional
override to keep it around indefinitely for some cases.
Vagrant uses the latest 7.x.x release, which is now 7.7.2. To reduce
differences between environments whilst the Neutrino/webpack work is
stabilised, it makes sense to update Heroku/Travis again too.