Stop locking non-test dependencies twice

Currently we have a situation where we're not running tests against
new versions of dependencies, as requirements_for_test.txt is not
being kept in-sync with requirements.txt by pyup. Deploys are only
working because Concourse silently ignores version issues.

From a deployment log:

awscli 1.18.211 has requirement PyYAML<5.4,>=3.10; python_version != "3.4", but you'll have pyyaml 5.4 which is incompatible.

This switches to a single requirements file for test dependencies,
in order to keep it in-sync with requirements.txt i.e. we run our
tests against the same versions of dependencies that we deploy with,
and the build fails if we try to use package versions that are not
mutually compatible, as this example PR shows [1].

ERROR: Cannot install -r requirements_for_test.txt (line 17), -r requirements_for_test.txt (line 198) and pyyaml==5.4.1 because these package versions have conflicting dependencies.

We shouldn't need to have fine-grained locking on test dependencies,
beyond those we want to list manually in the file.

[1]: https://github.com/alphagov/notifications-admin/pull/3804
This commit is contained in:
Ben Thorner
2021-02-16 17:08:03 +00:00
parent 14ef2b95cd
commit 627e4e41ab
4 changed files with 14 additions and 404 deletions

View File

@@ -5,4 +5,4 @@ schedule: "every week on monday"
search: False
requirements:
- requirements.in
- requirements_for_test.in
- requirements_for_test.txt