Skip to content

Fix deadline serialization, repr, and prune edge cases - #70421

Merged
o-nikolas merged 8 commits into
apache:mainfrom
aws-mwaa:feature/deadline-robustness-followup
Aug 17, 2026
Merged

Fix deadline serialization, repr, and prune edge cases#70421
o-nikolas merged 8 commits into
apache:mainfrom
aws-mwaa:feature/deadline-robustness-followup

Conversation

@seanghaeli

@seanghaeli seanghaeli commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Split out of #68919 per review. Edge-case fixes in the deadline model and serialization paths:

  • Deserialization routes by __class_path ahead of reference_type (custom references can share a builtin's class name), and a reference with no importable __class_path raises a clear error instead of a KeyError.
  • __repr__ on Deadline and DeadlineAlert never raises (guards the dagrun relationship post-cascade-delete and the dict-shaped interval).
  • prune_deadlines excludes missed deadlines so a missed deadline's queued callback is not cascade-deleted.

Split out of apache#68919 per review: decoder __class_path routing, clear
error for missing __class_path, repr guards for severed dagrun and
dict-shaped interval, and prune guard for missed deadlines.
@seanghaeli seanghaeli changed the title Harden deadline serialization, repr, and prune paths Fix deadline serialization, repr, and prune edge cases Jul 24, 2026
@seanghaeli
seanghaeli marked this pull request as ready for review July 25, 2026 00:14
@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jul 28, 2026
@seanghaeli
seanghaeli force-pushed the feature/deadline-robustness-followup branch from 09a9f50 to 385914d Compare July 28, 2026 22:32
Comment thread airflow-core/src/airflow/serialization/definitions/deadline.py
Comment thread airflow-core/tests/unit/models/test_prune_deadlines.py Outdated
Comment thread airflow-core/tests/unit/models/test_prune_deadlines.py Outdated
Comment thread airflow-core/tests/unit/models/test_prune_deadlines.py Outdated
Comment thread airflow-core/tests/unit/models/test_prune_deadlines.py Outdated
Comment thread airflow-core/tests/unit/models/test_deadline_alert.py Outdated
Comment thread airflow-core/src/airflow/models/deadline_alert.py
@ferruzzi ferruzzi added the backport-to-v3-3-test Backport to v3-3-test label Aug 13, 2026
@o-nikolas
o-nikolas merged commit f03b3bb into apache:main Aug 17, 2026
77 checks passed
@o-nikolas
o-nikolas deleted the feature/deadline-robustness-followup branch August 17, 2026 16:56
@github-actions github-actions Bot added this to the Airflow 3.3.2 milestone Aug 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.3.2 based on: backport label targeting v3-3-test
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-test

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
v3-3-test PR Link

potiuk pushed a commit that referenced this pull request Aug 17, 2026
…70421)

Split out of #68919 per review: decoder __class_path routing, clear
error for missing __class_path, repr guards for severed dagrun and
dict-shaped interval, and prune guard for missed deadlines.
(cherry picked from commit f03b3bb)

Co-authored-by: Sean Ghaeli <58916776+seanghaeli@users.noreply.github.com>
potiuk pushed a commit that referenced this pull request Aug 17, 2026
…70421) (#71726)

Split out of #68919 per review: decoder __class_path routing, clear
error for missing __class_path, repr guards for severed dagrun and
dict-shaped interval, and prune guard for missed deadlines.
(cherry picked from commit f03b3bb)

Co-authored-by: Sean Ghaeli <58916776+seanghaeli@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:DAG-processing area:deadline-alerts AIP-86 (former AIP-57) backport-to-v3-3-test Backport to v3-3-test ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants