Repository navigation
Skip airflowctl state store tests on servers older than 3.3 - #75753
Conversation
The asset and task instance state store APIs first shipped in Airflow 3.3.0. Against an older server, every state store command fails with 404 or 405. These failures are not compatibility bugs, and they hide the real ones in a run against an older core.
|
Note: this should be backport to |
Backport failed to create: airflow-ctl/v0-1-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker fccfbf8 airflow-ctl/v0-1-testThis should apply the commit to the airflow-ctl/v0-1-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
Why
The airflowctl integration tests start Airflow with Docker Compose and run each airflowctl command against it. The
DOCKER_IMAGEvariable selects the Airflow image. So the same tests can run against an older Airflow (#57826).The asset and task instance state store APIs first shipped in Airflow 3.3.0. Against
apache/airflow:3.2.2, all 13 state store commands fail with 404 or 405. Each command runs in two login modes. This gives 26 failures, and none of them is a compatibility bug.On
airflow-ctl/v0-1-test, #70724 skips the asset state store tests for every server, because that branch targets core 3.2.x. So these commands have no integration coverage there, even against a 3.3 server.What
A session fixture reads the server version from
/api/v2/version.MIN_AIRFLOW_VERSIONSgives the first Airflow version for each state store command. If the server is older, the test skips.CI on main uses a server that has these APIs, so CI never runs the skip. A new test checks that each key in
MIN_AIRFLOW_VERSIONSstill matches a command inTEST_COMMANDS. If a command gets a new name and the table does not, this test fails.I ran the suite locally before and after this change:
On main, the 3.2.2 run needs
psycopg2in the Compose connection URLs. The 3.2.2 image does not includepsycopg(#69469). I changed this only for the local run.After this merges, I plan to backport it to
airflow-ctl/v0-1-testin place of the skip from #70724.related: #57826
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 5.5) following the guidelines