Skip to content

Upgrade Django to 6.0 and refresh dependencies#22

Merged
jruszo merged 5 commits intomasterfrom
feature/django6-dependency-upgrade
Apr 3, 2026
Merged

Upgrade Django to 6.0 and refresh dependencies#22
jruszo merged 5 commits intomasterfrom
feature/django6-dependency-upgrade

Conversation

@jruszo
Copy link
Copy Markdown
Owner

@jruszo jruszo commented Apr 2, 2026

Summary

Upgrade the project to Django 6.0 and refresh direct backend and frontend dependencies to their latest supported versions.

What Changed

  • upgraded backend/runtime stack to Django 6.0.3 and Python 3.12
  • refreshed direct Python dependency pins and dev requirements
  • replaced django-q with django-q2 and switched Oracle support to oracledb
  • updated Django 6 compatibility points in settings, model indexes, and runtime helpers
  • refreshed frontend direct dependencies, regenerated package-lock.json, and removed the Vite devtools plugin because its current release does not declare Vite 8 support
  • added the generated migration to rename the query privilege index

Why

The repo was still on Django 4.1.13 with older Python and package baselines. Moving to Django 6 required runtime, dependency, and compatibility updates across the backend and frontend.

Impact

  • backend now runs on Python 3.12 / Django 6.0.3
  • CI is aligned to the new Python floor
  • dependency installation is reproducible via explicit pins
  • frontend build stays green on the refreshed toolchain

Validation

  • docker exec datamingle-app pytest -q
  • docker exec datamingle-app python manage.py makemigrations sql --check
  • black --check .
  • npm run build

Summary by CodeRabbit

Release Notes

  • Chores

    • Upgraded Python runtime from 3.11 to 3.12
    • Updated core dependencies: Django 4.1 → 6.0, MySQL service 5.7 → 8.0
    • Modernized CI/CD workflows and Docker build process
    • Pinned development and production dependencies to stable versions
    • Improved database schema structure with named indexes
    • Enhanced Docker build infrastructure with multi-stage approach
  • Tests

    • Strengthened email notification test verification

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 2, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ab395575-25c6-44a7-a0fe-3473c344df84

📥 Commits

Reviewing files that changed from the base of the PR and between 7cd986e and 573a810.

⛔ Files ignored due to path filters (1)
  • frontend/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (18)
  • .github/workflows/django.yml
  • .github/workflows/docker-image.yml
  • archery/settings.py
  • common/tests.py
  • dev-requirements.txt
  • frontend/package.json
  • frontend/vite.config.ts
  • requirements.txt
  • sql/engines/goinception.py
  • sql/engines/mysql.py
  • sql/engines/oracle.py
  • sql/migrations/0004_rename_queryprivileges_user_name_instance_db_name_valid_date_query_privilege_lookup_idx.py
  • sql/models.py
  • sql/slowlog.py
  • sql_api/views.py
  • src/docker/Dockerfile
  • src/docker/Dockerfile-base
  • src/docker/Dockerfile.local-arm

📝 Walkthrough

Walkthrough

The PR performs comprehensive modernization of the project infrastructure and dependencies, upgrading Python from 3.11 to 3.12, MySQL from 5.7 to 8.0, modernizing Django settings to current standards, pinning dependencies across production and development, refactoring database engine string escaping, and updating CI/CD workflows and Docker configurations.

Changes

Cohort / File(s) Summary
GitHub Actions CI/CD Workflows
.github/workflows/django.yml, .github/workflows/docker-image.yml
Updated Django CI to target Python 3.12 only, modernized action versions, upgraded MySQL service to 8.0 with explicit root password authentication and enhanced healthcheck. Refactored docker-image workflow to build base and main images as separate steps with explicit tagging and conditional push logic.
Django Settings & Configuration
archery/settings.py
Removed deprecated USE_L10N setting and replaced STATICFILES_STORAGE with modern STORAGES dict configuration defining both default and staticfiles backends.
Production & Development Dependencies
requirements.txt, dev-requirements.txt
Pinned dev dependencies to specific versions (pytest==9.0.2, pytest-django==4.12.0, etc.). Upgraded production dependencies including Django 4.1.13→6.0.3, replaced django-q with django-q2, switched cx-Oracle to oracledb, opensearch_py to opensearch-py, and pinned 50+ packages across database drivers, frameworks, and integrations. Added blessed==1.38.0.
Frontend Dependencies & Configuration
frontend/package.json, frontend/vite.config.ts
Updated npm dependencies to newer patch/minor versions for lucide-vue-next, vue, vue-router, and build tools (@vitejs/plugin-vue, typescript, vite). Removed vite-plugin-vue-devtools plugin from Vite config.
Docker Image Configuration
src/docker/Dockerfile, src/docker/Dockerfile-base, src/docker/Dockerfile.local-arm
Updated Python base image from 3.11 to 3.12 across all Dockerfiles. Removed explicit redis installation from main Dockerfile. Simplified local-arm build by removing package filtering for cx-Oracle and OpenAI, installing directly from modernized requirements files.
Database Engine String Escaping
sql/engines/mysql.py, sql/engines/goinception.py, sql/slowlog.py
Updated string escaping to use pymysql.converters.escape_string imported as pymysql_escape_string instead of calling pymysql.escape_string directly.
Oracle Driver Compatibility
sql/engines/oracle.py
Added fallback import logic that first attempts to load oracledb as cx_Oracle, falling back to direct cx_Oracle import if unavailable, with stub module registration for missing-module error handling.
Database Models & Migrations
sql/models.py, sql/migrations/0004_rename_...
Replaced deprecated index_together with explicit indexes using models.Index() in QueryPrivileges and SlowQueryHistory model Meta classes. Added corresponding Django migration to rename index on queryprivileges table.
Package Discovery
sql_api/views.py
Replaced pkg_resources.working_set iteration with importlib.metadata.distributions() for package enumeration in debug view, constructing entries as "{dist.metadata['Name']}=={dist.version}".
Test Assertion
common/tests.py
Tightened mock assertion in CheckTest.testEmailCheck from send_email.called_once_with(...) (non-asserting attribute) to send_email.assert_called_once_with(...) for active verification.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Through versions I bounded with cheer,
Python twelve arrives, crystal clear!
Dependencies pinned, MySQL so bright,
Django renewed in modern light,
Deprecations hophopped out of sight! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/django6-dependency-upgrade

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jruszo jruszo changed the title [codex] Upgrade Django to 6.0 and refresh dependencies Upgrade Django to 6.0 and refresh dependencies Apr 2, 2026
@jruszo jruszo marked this pull request as ready for review April 3, 2026 08:38
@jruszo jruszo merged commit 15921ca into master Apr 3, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant