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 requirements #28487

Merged
merged 5 commits into from
Sep 28, 2020
Merged

Upgrade requirements #28487

merged 5 commits into from
Sep 28, 2020

Conversation

millerdev
Copy link
Contributor

@millerdev millerdev commented Sep 9, 2020

First part of https://dimagi-dev.atlassian.net/browse/SAAS-11205

SUMMARY

Pin several unsafe library upgrades and a security update, and then upgrade requirements using make upgrade-requirements.

RISK ASSESSMENT / QA PLAN

The risk of this change set is hard to evaluate since many things are changing. However, the change log of every library that is being upgraded has been assessed to ensure as well as possible that no major/breaking changes are included in these upgrades.

Notes on pinned libraries

  • django-phonenumber-field - big jump, possible issues:
    • 2.4.0: Saving or filtering by an invalid phone number will now raise a ValueError.
  • django-redis - wants to downgrade to 4.9 (was 4.10)

Took a slight risk on these

  • jinja2 - many changes in 2.11.0, not sure about backward compatibility
  • python-dateutil
    • 2.8.1 made several changes that seem possibly not backward compatible
      (although probably unlikely to cause issues)
      • parser.parse will now raise TypeError when tzinfos is passed a type that cannot be interpreted as a time zone. Prior to this change, it would raise an UnboundLocalError instead. UnboundLocalError does not appear anywhere in our codebase.

I toyed with the idea of rolling out upgrades in smaller chunks, but the dependency graph is complex enough that it felt simpler to try them all in one go to see if tests pass. Test failures should hopefully provide an easy non-arbitrary way to find problems. The final commit of this PR could still be split into multiple chunks if there are no test failures but the risk still seems too large to roll out all at once.

Review by commit.

@millerdev millerdev added Open for review: do not merge A work in progress product/invisible Change has no end-user visible impact labels Sep 9, 2020
@@ -14,6 +14,7 @@ function setup() {

scripts/uninstall-requirements.sh
pip install -r requirements/test-requirements.txt
hash -d pip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh interesting. What does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It removes /vendor/bin/pip from bash's command cache. This is necessary if the command path changes, as is the case when pip is upgraded on the line above.

requirements/dev-requirements.txt Show resolved Hide resolved
@millerdev millerdev added awaiting QA QA in progress. Do not merge and removed Open for review: do not merge A work in progress labels Sep 15, 2020
@millerdev millerdev added the dependencies Pull requests that update a dependency file label Sep 17, 2020
@millerdev millerdev force-pushed the dm/requirements branch 2 times, most recently from 5f65562 to 04d786a Compare September 23, 2020 14:30
@millerdev millerdev added QA Passed and removed awaiting QA QA in progress. Do not merge labels Sep 25, 2020
@millerdev
Copy link
Contributor Author

millerdev commented Sep 25, 2020

QA Pass. Waiting to merge until after the weekend.

@millerdev millerdev merged commit 9bd24b8 into master Sep 28, 2020
@millerdev millerdev deleted the dm/requirements branch September 28, 2020 11:06
@millerdev millerdev mentioned this pull request Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file product/invisible Change has no end-user visible impact QA Passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants