-
Notifications
You must be signed in to change notification settings - Fork 24
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
[BB2-1283, BB2-1313] Django Upgrade 2.2.28 to 3.2.13 Python37 #1027
[BB2-1283, BB2-1313] Django Upgrade 2.2.28 to 3.2.13 Python37 #1027
Conversation
This pull request introduces 1 alert when merging 59f8a76 into d9799a7 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 63d2119 into d9799a7 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 82e4e30 into d9799a7 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging daba0ce into d9799a7 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 8cb31fe into d9799a7 - view on LGTM.com new alerts:
|
…4.manylinux2014_x86_64.whl(the binary used on CI docker) in vendor folder.
Dockerfile.selenium
Outdated
RUN pip3 install --upgrade pip | ||
RUN pip3 install selenium psycopg2-binary==2.8.6 pyyaml==5.4.1 Pillow==9.0.1 | ||
# libpq-dev: ubuntu dev lib for psypsycopg2 sdist build | ||
RUN apt-get update && apt-get install -yq python3.8 python3-pip git libpq-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is leaving python3.8 here an oversight or intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was like that on master, note: on local selenium docker the python version does not necessarily need to be the same as those on CI docker or AMI, and it also shows that BB2 is pretty flexible on python versions, a selenium docker with python 3.8 serve the purpose of testing BB2 webUI and the authorize flows and fhir flows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JFU-GIT Looking good. Just got an error running the integration tests. See below.
The following is a summary of the local testing:
-
Tested a fresh PR install.
- Tests and install work OK!
- Python version in docker container shows 3.7
-
Tested the upgrade/migrations procedure for r88 to PR branch.
- Did a fresh install of the r88 tag.
- Verified install and tests worked OK.
- Switched to the "jfuqian/BB2-1283-1313-Django-Upgrade-2.2.28-to-3.2.13-Python37" branch.
- Verified tests DO NOT work anymore.
- Ran the docker build for the web container.
- Command: docker-compose up --build --no-deps web
- Connected to the DB using the following command:
- Command: psql -h localhost -U postgres -d bluebutton
- Ran the following SQL:
BEGIN; insert into django_migrations (app, name, applied) values ('oauth2_provider', '0001_initial', '2022-06-01 10:00:00'); insert into django_migrations (app, name, applied) values ('oauth2_provider', '0002_auto_20190406_1805', '2022-06-01 10:00:00'); insert into django_migrations (app, name, applied) values ('oauth2_provider', '0003_auto_20201211_1314', '2022-06-01 10:00:00'); insert into django_migrations (app, name, applied) values ('oauth2_provider', '0004_auto_20200902_2022', '2022-06-01 10:00:00'); COMMIT;
-
Verified and Ran the migrations using the following commands:
- Command: docker-compose exec web python manage.py showmigrations
- Command: docker-compose exec web python manage.py migrate
-
Ran the Django tests. They worked OK!
- Command: docker-compose exec web python runtests.py
-
Integration tests ran OK!
- Command: docker-compose/run_integration_tests_local_keybase.sh dc
-
Integration tests using the "cbc" option failed with:
Processing ./vendor/python_stdnum-1.17-py2.py3-none-any.whl Processing ./vendor/pytz-2022.1-py2.py3-none-any.whl ERROR: Could not find a version that satisfies the requirement pyyaml==6.0 (from versions: none) ERROR: No matching distribution found for pyyaml==6.0
Thanks for testing, think cbc is not suppose to run on local, only run dc on local.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran fine for me locally all tests passing. Great job James!
This pull request fixes 3 alerts when merging 7cbca9f into d9799a7 - view on LGTM.com fixed alerts:
|
This pull request fixes 3 alerts when merging 5a185b6 into d9799a7 - view on LGTM.com fixed alerts:
|
This pull request fixes 3 alerts when merging a6f9efa into d9799a7 - view on LGTM.com fixed alerts:
|
This pull request fixes 3 alerts when merging c2110e3 into d9799a7 - view on LGTM.com fixed alerts:
|
…13-Django-Upgrade-2.2.28-to-3.2.13-Python37
This pull request fixes 3 alerts when merging 153ef08 into 9e823f1 - view on LGTM.com fixed alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JFU-GIT Just had this one change suggestion for now.
All of the testing has been going well!
Just wanting to review some more tomorrow before approving.
hhs_oauth_server/settings/base.py
Outdated
@@ -138,8 +138,7 @@ | |||
|
|||
ALLOWED_HOSTS = env("DJANGO_ALLOWED_HOSTS", ["*", socket.gethostname()]) | |||
|
|||
# DEBUG = env("DEBUG", True) | |||
DEBUG = True | |||
DEBUG = env("DEBUG", True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JFU-GIT I think this original code should be changed to the following to handle any case where the ENV variable might not be set. It should default to False
always.
DEBUG = env("DEBUG", False)
This pull request fixes 3 alerts when merging 252c553 into 9e823f1 - view on LGTM.com fixed alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me!
- Testing has gone well in our TEST env.
- Performed several passes over the code changes. They are looking good. Only having one fringe case type item to discuss with the team on our stand up.
- I believe this is ready for deployment out to Sandbox.
@JFU-GIT Thank you for the great work on this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on this! As a final sweep over this {PR I find that everything is looking good and ready for deployment.
JIRA Ticket:
BB2-1283
BB2-1313
User Story or Bug Summary:
Context:
This is the follow up ticket for BB2-1224: Spike: Upgrade Django to 3.2
The SPIKE successfully prototyped BB2 server with Django upgraded from 2.2.28 to 3.2.13 (Latest 3.2), the main functional areas work as expected.
Since Django 2.2.28 is already passed extension LTS (APR 11, 2022), it is highly desirable that BB2 upgrade to 3.2.13 which will keep BB2 good through to 2024.
The next next step might be upgrade to 4.0 for further benefits etc.
AC:
This PR is a re-work of PR 1024: #1024
where the python version is bumped to 3.8.10, in this PR python 3.7.10 is used (to work around uWSGI python plugin issue with python 3.8).
BB2-1283:
BB2 Server Upgraded Django from version 2.2.28 to 3.2.13
For BB2-1313:
There is no code changes in bb2 code base, BB2-1313 is about deployment to TEST, SBX (and eventually PROD), the pre-deployment custom migration details are documented in the CF page as shown below:
BB2 Server Upgrade Django from 2.2.28 to 3.2.13
Bumped Django to 3.2.14 security patch for a C vuln: CVE-2022-34265OPEN THIS LINK IN A NEW TAB
Please go to migrations section for details.
Verification and testing instructions and SQL scripts can be found in the CF page.
Note: before go to LLE, it is more convenient for reviewers to perform the customized migrations on a local simulated BB2 Django 2.2 to Django 3.2 migration - details are also documented in the CF page.
What Does This PR Do?
Upgrade Django to 3.2.13
What Should Reviewers Watch For?
If you're reviewing this PR, please check these things, in particular:
Here is the confluence page where more details on testing and verifications can be found:
BB2 Server Upgrade Django from 2.2.28 to 3.2.13
What Security Implications Does This PR Have?
Submitters should complete the following questionnaire:
What Needs to Be Merged and Deployed Before this PR?
This PR cannot be either merged or deployed until the following pre-requisite changes have been fully deployed:
Any Migrations?
Submitter Checklist
I have gone through and verified that...:
README
updates and changelog / release notes entries.TODO
and/orFIXME
comments, which include a JIRA ticket ID for any items that require urgent attention.