From 9d1bb3626bc1dbcf29a55aeb094f4350067317cd Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Tue, 26 Oct 2021 09:18:16 +0900 Subject: [PATCH] Allow both Django 2.2 and 3.2 for smooth transition I believe we need the following steps and it is what I did in past when we bump the Django minimum version. 1. (already done) update global-requirements.txt to allow horizon to update requirements.txt to include Django 3.2. 2. specify the required Django version which includes both 2.2 and 3.2 (at this point upper-constraints uses 2.2) 3. update upper-constraints.txt in the requirements repo to use Django 3.2 4. bump the min version of Django in horizon (optionally) update non-primary-django tests to include non-primary versions of Django. It seems you drops 2.2 support together when we support 3.2, so perhaps this step is not the case though. https://review.opendev.org/c/openstack/horizon/+/811412 directly updated the min version to Django 3.2 which is incompatible with the global upper-constraints.txt. To avoid this, https://review.opendev.org/c/openstack/horizon/+/815206 made almost all tests non-voting. I am not a fan of such approach and believe there is a way to make the transition of Django version more smoothly. --- This commit reverts the zuul configuration changes in https://review.opendev.org/c/openstack/horizon/+/815206 and https://review.opendev.org/c/openstack/horizon/+/811412. horizon-tox-python3-django32 is voting now as we are making it the default version. Change-Id: I60bb672ef1b197e657a8b3bd86d07464bcb1759f --- .zuul.d/django-jobs.yaml | 12 ++++-------- .zuul.d/project.yaml | 26 ++++++++++++-------------- lower-constraints.txt | 2 +- requirements.txt | 2 +- 4 files changed, 18 insertions(+), 24 deletions(-) diff --git a/.zuul.d/django-jobs.yaml b/.zuul.d/django-jobs.yaml index db85788d30..7a81e6568a 100644 --- a/.zuul.d/django-jobs.yaml +++ b/.zuul.d/django-jobs.yaml @@ -38,13 +38,9 @@ # We specify a job in openstack-python3-yoga-jobs(-horizon) # to keep this project template as it is used in horizon plugins. # NOTE: We keep it as a template even though it is not used now. - - openstack-tox-py38: - voting: false - - horizon-tox-python3-django32: - voting: false + - openstack-tox-py38 + - horizon-tox-python3-django32 gate: jobs: - - openstack-tox-py38: - voting: false - # Skip these until the django3.x jobs become voting. - # - horizon-tox-python3-django32 + - openstack-tox-py38 + - horizon-tox-python3-django32 diff --git a/.zuul.d/project.yaml b/.zuul.d/project.yaml index 5a77c6b114..8320597e03 100644 --- a/.zuul.d/project.yaml +++ b/.zuul.d/project.yaml @@ -2,29 +2,27 @@ templates: - check-requirements - horizon-cross-jobs - #- horizon-nodejs14-jobs + - horizon-nodejs14-jobs - horizon-non-primary-django-jobs - openstack-lower-constraints-jobs - #- openstack-python3-yoga-jobs + - openstack-python3-yoga-jobs - periodic-stable-jobs - #- publish-openstack-docs-pti + - publish-openstack-docs-pti - release-notes-jobs-python3 check: jobs: - - horizon-selenium-headless: - voting: false - #- horizon-integration-tests - #- horizon-dsvm-tempest-plugin - #- horizon-tox-bandit-baseline - #- horizon-tempest-plugin-ipv6 + - horizon-selenium-headless + - horizon-integration-tests + - horizon-dsvm-tempest-plugin + - horizon-tox-bandit-baseline + - horizon-tempest-plugin-ipv6 gate: queue: horizon jobs: - #- horizon-dsvm-tempest-plugin - - horizon-selenium-headless: - voting: false - #- horizon-integration-tests - #- horizon-tempest-plugin-ipv6 + - horizon-dsvm-tempest-plugin + - horizon-selenium-headless + - horizon-integration-tests + - horizon-tempest-plugin-ipv6 experimental: jobs: - horizon-integration-tests-xstatic-master diff --git a/lower-constraints.txt b/lower-constraints.txt index f3976063cf..058a134ab6 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -15,7 +15,7 @@ cryptography==3.0 debtcollector==1.2.0 decorator==4.4.2 deprecation==1.0 -Django==3.2 +Django==2.2 django-appconf==1.0.5 django-compressor==2.4.1 django-debreach==1.4.2 diff --git a/requirements.txt b/requirements.txt index 151359316d..b04b6011d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pbr>=5.5.0 # Apache-2.0 # Horizon Core Requirements Babel>=2.6.0 # BSD debtcollector>=1.2.0 # Apache-2.0 -Django>=3.2,<3.3 # BSD +Django>=2.2,<3.3 # BSD django-compressor>=2.4.1 # MIT django-debreach>=1.4.2 # BSD License (2 clause) django-pyscss>=2.0.2 # BSD License (2 clause)