Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade simple history package #153

Merged
merged 4 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,16 @@ html_coverage: ## generate and view HTML coverage report
# Define PIP_COMPILE_OPTS=-v to get more information during make upgrade.
PIP_COMPILE = pip-compile --upgrade $(PIP_COMPILE_OPTS)

COMMON_CONSTRAINTS_TXT=requirements/common_constraints.txt
.PHONY: $(COMMON_CONSTRAINTS_TXT)
$(COMMON_CONSTRAINTS_TXT):
wget -O "$(@)" https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt || touch "$(@)"
echo "$(COMMON_CONSTRAINTS_TEMP_COMMENT)" | cat - $(@) > temp && mv temp $(@)

upgrade: export CUSTOM_COMPILE_COMMAND=make upgrade
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
upgrade: $(COMMON_CONSTRAINTS_TXT) ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
sed 's/django-simple-history==3.0.0//g' requirements/common_constraints.txt > requirements/common_constraints.tmp
mv requirements/common_constraints.tmp 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 3.2.21 on 2023-09-27 12:41

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('subsidy', '0017_add_is_soft_deleted_subsidy'),
]

operations = [
migrations.AlterModelOptions(
name='historicalsubsidy',
options={'get_latest_by': ('history_date', 'history_id'), 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical subsidy', 'verbose_name_plural': 'historical subsidys'},
),
]
3 changes: 3 additions & 0 deletions enterprise_subsidy/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,3 +357,6 @@ def root(*path_fragments):
# per-view cache timeout settings
# We can disable caching on this view by setting the value below to 0.
CONTENT_METADATA_VIEW_CACHE_TIMEOUT_SECONDS = 60

# disable indexing on history_date
SIMPLE_HISTORY_DATE_INDEX = False
5 changes: 2 additions & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ defusedxml==0.7.1
# social-auth-core
django==3.2.21
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/base.in
# django-clearcache
# django-cors-headers
Expand Down Expand Up @@ -80,9 +80,8 @@ django-object-actions==4.2.0
# via
# -r requirements/base.in
# openedx-ledger
django-simple-history==3.0.0
django-simple-history==3.4.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/base.in
# openedx-ledger
django-waffle==4.0.0
Expand Down
2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tomli==2.0.1
# via tox
tox==3.28.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/ci.in
# tox-battery
tox-battery==0.6.2
Expand Down
28 changes: 28 additions & 0 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

# A central location for most common version constraints
# (across edx repos) for pip-installation.
#
# Similar to other constraint files this file doesn't install any packages.
# It specifies version constraints that will be applied if a package is needed.
# When pinning something here, please provide an explanation of why it is a good
# idea to pin this package across all edx repos, Ideally, link to other information
# that will help people in the future to remove the pin when possible.
# Writing an issue against the offending project and linking to it here is good.
#
# 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
4 changes: 1 addition & 3 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,4 @@
# linking to it here is good.

# Common constraints for edx repos
-c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt


-c common_constraints.txt
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ django-object-actions==4.2.0
# -r requirements/dev.in
# -r requirements/validation.txt
# openedx-ledger
django-simple-history==3.0.0
django-simple-history==3.4.0
# via
# -r requirements/validation.txt
# openedx-ledger
Expand Down
7 changes: 3 additions & 4 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ distlib==0.3.7
# virtualenv
django==3.2.21
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/test.txt
# django-clearcache
# django-cors-headers
Expand Down Expand Up @@ -142,9 +142,8 @@ django-object-actions==4.2.0
# via
# -r requirements/test.txt
# openedx-ledger
django-simple-history==3.0.0
django-simple-history==3.4.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/test.txt
# openedx-ledger
django-waffle==4.0.0
Expand Down Expand Up @@ -593,7 +592,7 @@ tomlkit==0.12.1
# pylint
tox==3.28.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/test.txt
twine==4.0.2
# via -r requirements/doc.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/production.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ django-object-actions==4.2.0
# via
# -r requirements/base.txt
# openedx-ledger
django-simple-history==3.0.0
django-simple-history==3.4.0
# via
# -r requirements/base.txt
# openedx-ledger
Expand Down
7 changes: 3 additions & 4 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ distlib==0.3.7
# virtualenv
django==3.2.21
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/test.txt
# django-clearcache
# django-cors-headers
Expand Down Expand Up @@ -130,9 +130,8 @@ django-object-actions==4.2.0
# via
# -r requirements/test.txt
# openedx-ledger
django-simple-history==3.0.0
django-simple-history==3.4.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/test.txt
# openedx-ledger
django-waffle==4.0.0
Expand Down Expand Up @@ -536,7 +535,7 @@ tomlkit==0.12.1
# pylint
tox==3.28.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/test.txt
twine==4.0.2
# via -r requirements/quality.in
Expand Down
7 changes: 3 additions & 4 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ dill==0.3.7
distlib==0.3.7
# via virtualenv
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/base.txt
# django-clearcache
# django-cors-headers
Expand Down Expand Up @@ -121,9 +121,8 @@ django-object-actions==4.2.0
# via
# -r requirements/base.txt
# openedx-ledger
django-simple-history==3.0.0
django-simple-history==3.4.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/base.txt
# openedx-ledger
django-waffle==4.0.0
Expand Down Expand Up @@ -442,7 +441,7 @@ tomlkit==0.12.1
# via pylint
tox==3.28.0
# via
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -c requirements/common_constraints.txt
# -r requirements/test.in
types-pyyaml==6.0.12.11
# via responses
Expand Down
2 changes: 1 addition & 1 deletion requirements/validation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ django-object-actions==4.2.0
# -r requirements/quality.txt
# -r requirements/test.txt
# openedx-ledger
django-simple-history==3.0.0
django-simple-history==3.4.0
# via
# -r requirements/quality.txt
# -r requirements/test.txt
Expand Down