Skip to content

Commit

Permalink
Merge pull request #172 from openedx/bbeggs/repair-upgrade-automation
Browse files Browse the repository at this point in the history
chore: Updates to requirement constraints to install the desired versions of Django and django-simple-history
  • Loading branch information
macdiesel authored Nov 2, 2023
2 parents b0f03c9 + b78c0f5 commit 0ca4b26
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ lint: ## run Python code linting
pylint: lint

quality:
tox -e quality
tox -e quality

pii_check: ## check for PII annotations on all Django models
DJANGO_SETTINGS_MODULE=enterprise_subsidy.settings.test \
Expand Down Expand Up @@ -115,6 +115,7 @@ $(COMMON_CONSTRAINTS_TXT):
upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
sed -i.'' 's/Django<4.0//g' requirements/common_constraints.txt
sed -i.'' 's/django-simple-history==//g' requirements/common_constraints.txt
pip install -qr requirements/pip-tools.txt
# Make sure to compile files after any other files they include!
$(PIP_COMPILE) --allow-unsafe -o requirements/pip.txt requirements/pip.in
Expand Down
7 changes: 0 additions & 7 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,10 @@
# Note: Changes to this file will automatically be used by other repos, referencing
# this file from Github directly. It does not require packaging in edx-lint.


# using LTS django version
Django<4.0

# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process.
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
elasticsearch<7.14.0

# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected


# tox>4.0.0 isn't yet compatible with many tox plugins, causing CI failures in almost all repos.
# Details can be found in this discussion: https://github.com/tox-dev/tox/discussions/1810
tox<4.0.0
5 changes: 4 additions & 1 deletion requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
# Common constraints for edx repos
-c common_constraints.txt

Django<4.3
# using LTS django version
Django>=4.2,<4.3

# django-simple-history>3.4.0 for this repo... we were not concerned about migration issues
django-simple-history>=3.4.0,<3.5.0

0 comments on commit 0ca4b26

Please sign in to comment.