Uploaded image for project: 'Cost Management'
  1. Cost Management
  2. COST-118

Determine upgrade path to Django 3.x

XMLWordPrintable

    • COST Sprint 53, COST Sprint 54, COST Sprint 55

      User Story

      As a Koku Developer, I want to understand what it will take to run the latest supported software versions so that I can plan an upgrade path to the latest version of Django.

      Django 3.0.x is out. As of this writing, 3.0.2 is the latest. We're currently developing using Django 2.2.x. Django 2.2.x has stopped receiving mainstream support, but will continue to receive extended support until 2022. (See: https://www.djangoproject.com/download/#supported-versions ) In Django terms, this means 2.2.x will no longer receive features or non-critical bugfixes and will only receive updates for security fixes and data loss bugs.

      Django 3.0 release notes: https://docs.djangoproject.com/en/3.0/releases/3.0/

      Why do we need 3.0 now?

      • Try a local upgradeĀ 
      • Run unit tests
      • Run QE tests
      • How'd it go?
      • Deliver results

      Impacts

      API, maybe others

      Role

      Developer

      Assumptions

      API responses should not change
      No significant code changes are expected from this issue. Just research and report.

      Acceptance Criteria

      Determine the feasibility and level of effort to upgrade to Django 3.0.x and report it to the team.
      Produce a document, diagram, etc. and/or meeting to discuss the findings and decide next-steps.
      New issues have been created to get the upgrade plan into the backlog


      Results

      • Django 3.x deprecates django.contrib.postgres.fields.JSONField and it must be imported from django.db.models.JSONField instead.
      • Django 3.x core now conflicts with django-tenant-schemas with a duplicate ArgumentParser option. We must patch this somehow to ensure that --skip-checks is not passed into the core command classes.
      • A different tenant module was tried django-tenants which tries to force a 1:1 between a domain url and a tenant. This was solved with some changes to the koku middleware.
      • One test is failing cost_models.test.tests_view.CostModelViewTests.test_list_cost_model_rate_rbac_access. This failure must be resolved

      TODO

      • That last test has been corrected, any fallout from the fix should be assessed and rectified.
      • The tox tests and smokes tests should run successfully.

      Branch

              hproctor HAP Proctor (Inactive)
              blentz@redhat.com Brett Lentz (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: