Skip to content

Skip airflowctl state store tests on servers older than 3.3 - #75753

Merged
shahar1 merged 1 commit into
apache:mainfrom
Andrushika:gate-airflowctl-tests-by-server-version
Oct 27, 2026
Merged

shahar1 merged 1 commit into
apache:mainfrom
Andrushika:gate-airflowctl-tests-by-server-version

Conversation

@Andrushika

@Andrushika Andrushika commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Why

The airflowctl integration tests start Airflow with Docker Compose and run each airflowctl command against it. The DOCKER_IMAGE variable 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_VERSIONS gives 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_VERSIONS still matches a command in TEST_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:

  • 3.2.2: the 26 state store tests skip. All other results are the same as before.
  • 3.3.2: the 26 state store tests run and pass.

On main, the 3.2.2 run needs psycopg2 in the Compose connection URLs. The 3.2.2 image does not include psycopg (#69469). I changed this only for the local run.

After this merges, I plan to backport it to airflow-ctl/v0-1-test in place of the skip from #70724.

related: #57826


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: Claude Code (Opus 5.5) following the guidelines

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.
@Andrushika

Copy link
Copy Markdown
Contributor Author

Note: this should be backport to airflow-ctl/v0-1-test, and make sure we are not skipping asset state store tests on the release branch anymore.

@shahar1
shahar1 merged commit fccfbf8 into apache:main Oct 27, 2026
80 of 81 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: airflow-ctl/v0-1-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
❌ airflow-ctl/v0-1-test Commit Link

You can attempt to backport this manually by running:

cherry_picker fccfbf8 airflow-ctl/v0-1-test

This should apply the commit to the airflow-ctl/v0-1-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants