Add Airflow 3.3 to CI test matrix#840
Open
pankajastro wants to merge 3 commits into
Open
Conversation
Adds "3.3" alongside the existing Airflow versions in the hatch test-env matrix and the CI workflow's unit/integration test matrices, plus a matching install branch in pre-install-airflow.sh. Also fixes two version-drift breaks surfaced by running against 3.3: - DagBag.__init__ dropped the `include_examples` kwarg in Airflow 3.3, so dev/tests/dags/test_dag_example.py now checks the signature before passing it. - Airflow 3.3's constraints pull in typer 0.25, which changed the CLI's "Usage:" line formatting; the help-text assertion in test__main__.py now checks the stable substrings instead of the exact string. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
pankajastro
requested review from
pankajkoti and
tatiana
and removed request for
a team
July 17, 2026 07:22
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends dag-factory’s CI and Hatch test matrices to include Apache Airflow 3.3, and updates a couple of tests to remain stable across upstream behavior/format changes introduced by Airflow 3.3’s dependency set.
Changes:
- Add Airflow
3.3to the Hatch test matrix inpyproject.tomland to the unit/integration job matrices in.github/workflows/cicd.yaml. - Update the Airflow pre-install script to install
apache-airflow~=3.3.0whenAIRFLOW_VERSION=3.3. - Fix test brittleness across versions:
- Make
DagBag(...)construction compatible with Airflow 3.3 by conditionally passinginclude_examples. - Relax CLI help output assertion to avoid Typer-version-specific
Usage:formatting drift.
- Make
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tests/test__main__.py |
Makes CLI help test resilient to Typer Usage: formatting differences pulled in via Airflow 3.3 constraints. |
scripts/test/pre-install-airflow.sh |
Adds an install branch for Airflow 3.3 while continuing to use Airflow constraints. |
pyproject.toml |
Extends Hatch matrix to run tests against Airflow 3.3 across supported Python versions. |
dev/tests/dags/test_dag_example.py |
Keeps example DAG test compatible by only passing include_examples when supported. |
.github/workflows/cicd.yaml |
Expands CI unit + integration matrices to include Airflow 3.3. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- tests/test__main__.py: CI renders typer's help output with ANSI color codes that split "Usage: " and "dagfactory" into separate spans, so the combined substring check failed there even though it passed locally without color. Check the pieces independently instead. - tests/test_example_dags.py: Airflow 3.3 made create_default_connections() session argument keyword-only, and also dropped DagBag's include_examples kwarg (same issue already handled in dev/tests/dags/test_dag_example.py) which was breaking collection for the integration test matrix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot review feedback: apache-airflow~=3.3.0 could resolve to a later 3.3.x patch release than the one the constraints-3.3.0 file (which doesn't itself pin apache-airflow's version) was generated for, causing a version/constraints mismatch. Pin exactly, matching the other exact pins in this script. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Comment on lines
38
to
41
| elif [ "$AIRFLOW_VERSION" = "3.1" ]; then | ||
| uv pip install "apache-airflow~=3.1.0" "apache-airflow-providers-http>=4.0.0" "apache-airflow-providers-cncf-kubernetes>=4.4.0" "apache-airflow-providers-common-sql>=1.2.0" "apache-airflow-providers-slack" --constraint /tmp/constraint.txt | ||
| elif [ "$AIRFLOW_VERSION" = "3.2" ]; then | ||
| uv pip install "apache-airflow~=3.2.0" "apache-airflow-providers-http>=4.0.0" "apache-airflow-providers-cncf-kubernetes>=4.4.0" "apache-airflow-providers-common-sql>=1.2.0" "apache-airflow-providers-slack" --constraint /tmp/constraint.txt |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #840 +/- ##
=======================================
Coverage 95.62% 95.62%
=======================================
Files 13 13
Lines 1372 1372
=======================================
Hits 1312 1312
Misses 60 60 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pyproject.toml) and the CI workflow's unit/integration test matrices (.github/workflows/cicd.yaml), plus a matching install branch inscripts/test/pre-install-airflow.sh.DagBag.__init__dropped theinclude_exampleskwarg in Airflow 3.3 —dev/tests/dags/test_dag_example.pynow checks the signature before passing it, so it still works on 2.9–3.2 too.Usage:line (COMMAND [ARGS]→[COMMAND] [ARGS]...) — the assertion intests/test__main__.pynow checks stable substrings instead of the exact string.Test plan
hatch run tests.py3.13-3.3:test— 293 passedhatch run tests.py3.12-3.3:test— 293 passedhatch run tests.py3.13-3.2:test— 293 passed (no regression)🤖 Generated with Claude Code