Skip to content

Allow downgrading past the TI ownership migration when data is present. - #74407

Open
ashb wants to merge 2 commits into
apache:mainfrom
astronomer:worktree-migration0142-downgrade
Open

ashb wants to merge 2 commits into
apache:mainfrom
astronomer:worktree-migration0142-downgrade

Conversation

@ashb

@ashb ashb commented Oct 7, 2026

Copy link
Copy Markdown
Member

The downgrade refused whenever XCom_v2 or rendered field data had rows, or
any task retried since the upgrade, so a rollback after any real use of 3.4
was impossible.

This fixes it, as long as the data can be downgraded non-destructively
"as if 3.3 wrote it". This means you might loose data that 3.3 wouldn't
have kept for archived tries.

Document the cost and caveats in the 3.4.0 release notes.


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

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@ashb
ashb requested a review from ephraimbuddy as a code owner October 7, 2026 14:18
@boring-cyborg boring-cyborg Bot added the area:db-migrations PRs with DB migration label Oct 7, 2026
@ashb
ashb requested a review from vatsrahul1001 October 7, 2026 14:18
Comment thread RELEASE_NOTES.rst

.. towncrier release notes start

Airflow 3.4.0 (unreleased)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@vatsrahul1001 Of especial note for you here:

When we use towncrier to generate the release notes it will create a new 3.4.0 header. Please sort out the duplicate headers and put this note "somewhere appropriate near the top"

Comment thread RELEASE_NOTES.rst Outdated
ashb added 2 commits October 8, 2026 15:41
The downgrade refused whenever XCom_v2 or rendered field data had rows, or
any task retried since the upgrade, so a rollback after any real use of 3.4
was impossible.

This fixes it, as long as the data can be downgraded non-destructively
"as if 3.3 wrote it". This means you might loose data that 3.3 wouldn't
have kept for archived tries.

Document the cost and caveats in the 3.4.0 release notes.
Clearing a mapped task's upstream archives its map_index -1 placeholder and
inserts a new current one. When that placeholder is later promoted to index 0
or deleted, its archived attempts were left without a current attempt, which
made the 3.4 downgrade refuse in ordinary use. Delete them at expansion, and
only for a placeholder that was retried so the common path adds no query.

Also bind the downgrade's owner insert for a task first run after the upgrade,
check that refused downgrades leave the schema untouched, make the expansion
query-count pin exact, and shorten the release note.
@ashb
ashb force-pushed the worktree-migration0142-downgrade branch from e71c0b3 to ad93457 Compare October 8, 2026 14:42
@ashb
ashb requested a review from XD-DENG as a code owner October 8, 2026 14:42
@ashb
ashb requested a review from kaxil October 8, 2026 14:48

This branch has not been deployed

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

Labels

area:db-migrations PRs with DB migration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants