Skip to content

[v3-2-test] Fix scheduler orphaned task reset logging crash (#67822) - #67844

Merged
vatsrahul1001 merged 1 commit into
v3-2-testfrom
backport-8395c29-v3-2-test
Jun 1, 2026
Merged

vatsrahul1001 merged 1 commit into
v3-2-testfrom
backport-8395c29-v3-2-test

Conversation

@vatsrahul1001

@vatsrahul1001 vatsrahul1001 commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

Backport of #67822 to v3-2-test.

The scheduler orphaned-task adoption path loaded task instances with a narrow load_only(...) set and then called repr(ti) while building the reset log message. TaskInstance.__repr__ reads map_index and state, so detached instances with deferred columns could raise DetachedInstanceError and crash the scheduler on restart.

This backport applies the original change as-is. The only cherry-pick conflict was an adjacent, unrelated test on main (test_clear_task_instances_preserves_detail_level, from a separate un-backported PR whose get_task_span_detail_level feature does not exist on v3-2-test); it was excluded, so the delta here is exactly #67822.

related: #67813


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

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

The scheduler orphaned-task adoption path loaded task instances with a narrow load_only(...) set and then called repr(ti) while building the reset log message. TaskInstance.__repr__ reads map_index and state, so detached
instances with deferred columns could raise DetachedInstanceError and crash the scheduler on restart.
@vatsrahul1001 vatsrahul1001 added this to the Airflow 3.2.3 milestone Jun 1, 2026

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@vatsrahul1001
vatsrahul1001 merged commit 88d5fb0 into v3-2-test Jun 1, 2026
77 checks passed
@vatsrahul1001
vatsrahul1001 deleted the backport-8395c29-v3-2-test branch June 1, 2026 14:13
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.

4 participants