Skip to content

CHORE: gate PR validation on supported Django, run EOL versions on nightly - #566

Merged
Gaurav Sharma (bewithgaurav) merged 1 commit into
devfrom
bewithgaurav/ci-supported-matrix
Aug 7, 2026
Merged

CHORE: gate PR validation on supported Django, run EOL versions on nightly#566
Gaurav Sharma (bewithgaurav) merged 1 commit into
devfrom
bewithgaurav/ci-supported-matrix

Conversation

@bewithgaurav

Copy link
Copy Markdown
Collaborator

What

Splits the PR-validation matrix into two tiers:

  • Core (Windows_Core / Linux_Core) runs on every PR and CI build. It covers the Django versions still supported upstream today: 5.2 (LTS) and 6.0.
  • Legacy (Windows_Legacy / Linux_Legacy) covers the end of life versions 3.2, 4.0, 4.1, 4.2, 5.0 and 5.1. These run only on the nightly schedule (or a manual queue), gated with condition: or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Build.Reason'], 'Manual')).

The per-leg build/test steps move into azure-pipelines-steps-windows.yml and azure-pipelines-steps-linux.yml so the Core and Legacy jobs share one step definition instead of duplicating ~150 lines of setup shell.

Why

The matrix had grown to 29 legs per OS (58 total) on every PR, and more than half of that is Django versions that are end of life upstream. Gating PRs on the currently supported set keeps the fast feedback lean while the nightly still exercises the full history.

Support status as of today (per endoflife.date):

Django EOL (incl. security) Tier
6.0 2027-04-30 Core
5.2 (LTS) 2028-04-30 Core
5.1 2025-12-03 Legacy (EOL)
5.0 2025-04-02 Legacy (EOL)
4.2 (LTS) 2026-04-07 Legacy (EOL)
4.1, 4.0, 3.2 <= 2023 Legacy (EOL)

Coverage is not dropped

This changes when the old versions run, not whether. setup.py and tox.ini are untouched, so we still declare and test Django 3.2 through 6.0. The full matrix runs nightly (always: true) and on manual queue.

Legs per run

Per OS Total (Win + Linux)
Before, every PR 29 58
After, per PR (Core) 7 14
After, nightly (Core + Legacy) 29 58

Django 6.1 is not on dev yet; it joins the Core tier via #564, taking Core to 10 legs per OS (20 total).

…ghtly

Split the PR-validation matrix into a Core tier (Django 5.2 and 6.0, the
versions still supported upstream) that runs on every PR/CI build, and a
Legacy tier (3.2, 4.0, 4.1, 4.2, 5.0, 5.1) gated to the nightly schedule
and manual queues. Per-leg steps move into shared templates so the Core
and Legacy jobs do not duplicate them.

setup.py and tox.ini are untouched: support for the older versions is not
dropped, only moved off the per-PR gate. The full matrix still runs nightly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 7, 2026 07:52
Comment thread azure-pipelines-steps-linux.yml Dismissed
Comment thread azure-pipelines-steps-linux.yml Dismissed
Comment thread azure-pipelines-steps-linux.yml Dismissed
Comment thread azure-pipelines-steps-linux.yml Dismissed
Comment thread azure-pipelines-steps-windows.yml Dismissed
@bewithgaurav
Gaurav Sharma (bewithgaurav) merged commit d6d03c5 into dev Aug 7, 2026
7 of 23 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the Azure DevOps PR-validation pipeline to reduce per-PR CI load by splitting the test matrix into “Core” (supported upstream Django versions) that runs on every PR/CI build, and “Legacy” (EOL Django versions) that runs only on scheduled nightly builds or manual queues. It also centralizes per-leg build/test steps into shared YAML templates to avoid duplication across jobs.

Changes:

  • Split Windows/Linux jobs into Core (always) and Legacy (schedule/manual only) tiers via job-level condition.
  • Extract per-leg Windows and Linux build/test steps into azure-pipelines-steps-*.yml templates referenced by both tiers.
  • Preserve full Django version coverage by running the full matrix on nightly/manual runs.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
azure-pipelines.yml Splits the CI matrix into Core/Legacy jobs and wires both to shared step templates.
azure-pipelines-steps-windows.yml New shared Windows template containing CredScan, Python selection, SQL Server/ODBC setup, and tox execution.
azure-pipelines-steps-linux.yml New shared Linux template containing Docker SQL Server startup, ODBC/tools install, tox execution, and result publishing.
Suppressed comments (3)

azure-pipelines.yml:227

  • This CI matrix entry runs py311-django41, but tox's declared envlist for django41 only includes {py38,py39,py310} (tox.ini:5). Consider removing this row (or updating tox.ini to declare/support it) so CI reflects the intended compatibility matrix.
        Python3.11 - Django 4.1:
          python.version: '3.11'
          tox.env: 'py311-django41'

azure-pipelines.yml:239

  • This CI matrix entry runs py311-django40, but tox's declared envlist for django40 only includes {py38,py39,py310} (tox.ini:4). Aligning Linux nightly legs with tox.ini will make the CI matrix easier to reason about and avoid unexpected failures.
        Python3.11 - Django 4.0:
          python.version: '3.11'
          tox.env: 'py311-django40'

azure-pipelines.yml:251

  • This CI matrix entry runs py311-django32, but tox's declared envlist for django32 only includes {py36,py37,py38,py39} (tox.ini:3). Removing this row keeps nightly CI aligned with the declared supported environments.
        Python3.11 - Django 3.2:
          python.version: '3.11'
          tox.env: 'py311-django32'

Comment thread azure-pipelines.yml
Comment thread azure-pipelines.yml
Comment thread azure-pipelines.yml
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.

4 participants