From f6a425c0fbdba42b8fc42860b02390b69b75b5ef Mon Sep 17 00:00:00 2001 From: Quan Pham Date: Wed, 10 Sep 2025 16:23:22 -0400 Subject: [PATCH] Resolves CI failure due to bad patch failure The latest version of `coldfront` (v1.1.7) made a change to `coldfront/config/urls.py b/coldfront/config/urls.py`, which caused `01_add_coldfront_urls.patch` to be out-of-date. This meant the CI script was unable to apply the patch. A version pin for `coldfront` has been added to `requirements.txt`, matching the version used in `coldfront-nerc` (v1.1.6). The order of pip install commands in `ci/setup.sh` has been changed to resolve a much more convoluted dependancy-related issue as described below. `coldfront v1.1.6` required `django-q` [1], while `coldfront v1.1.7` required `django-q2` [2]. Both packages provide the `django_q` module, and are incompatible with each other. The `test-requirements.txt` file in this repo requires `coldfront-plugin-cloud`, which doesn't set a upper limit on the version of `coldfront`. `coldfront-plugin-api` requires `coldfront v1.1.6`. This means when `test-requirements.txt` is installed first, it will install `coldfront v1.1.7` and `django-q2`. Afterwards, when `coldfront-plugin-api` is installed, it will downgrade `coldfront` to v1.1.6, and install `django-q`, which will corrupt the `django_q` module. By reversing the order of installation, `coldfront` is never downgraded, avoiding the corruption. All of this stems from the fact that `coldfront-plugin-cloud` doesn't set an upper limit on the version of `coldfront` it supports. [1] https://github.com/Koed00/django-q/tree/master [2] https://github.com/django-q2/django-q2 --- ci/setup.sh | 2 +- requirements.txt | 2 +- setup.cfg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ci/setup.sh b/ci/setup.sh index 48412d7..659c53d 100755 --- a/ci/setup.sh +++ b/ci/setup.sh @@ -7,7 +7,7 @@ if [[ ! "${CI}" == "true" ]]; then fi python -m pip install --upgrade pip -pip3 install -r test-requirements.txt pip3 install -e . +pip3 install -r test-requirements.txt ./ci/patch_coldfront_urls.sh diff --git a/requirements.txt b/requirements.txt index 8eb7c0b..c2c07e0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -coldfront +coldfront==1.1.6 djangorestframework mozilla-django-oidc django-scim2 >=0.19.0, <0.20.0 diff --git a/setup.cfg b/setup.cfg index 235a3a4..7b8ad08 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,7 +20,7 @@ package_dir = packages = find: python_requires = >=3.8 install_requires = - coldfront + coldfront==1.1.6 djangorestframework mozilla-django-oidc django-scim2 >=0.19.0, <0.20.0