Skip to content

Commit 0e8397f

Browse files
committed
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
1 parent 7ca0a28 commit 0e8397f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

ci/setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if [[ ! "${CI}" == "true" ]]; then
77
fi
88

99
python -m pip install --upgrade pip
10-
pip3 install -r test-requirements.txt
1110
pip3 install -e .
11+
pip3 install -r test-requirements.txt
1212

1313
./ci/patch_coldfront_urls.sh

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
coldfront
1+
git+https://github.com/ubccr/[email protected]#egg=coldfront
22
djangorestframework
33
mozilla-django-oidc
44
django-scim2 >=0.19.0, <0.20.0

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ package_dir =
2020
packages = find:
2121
python_requires = >=3.8
2222
install_requires =
23-
coldfront
23+
coldfront==1.1.6
2424
djangorestframework
2525
mozilla-django-oidc
2626
django-scim2 >=0.19.0, <0.20.0

0 commit comments

Comments
 (0)