Repository navigation
Conversation
DagRun.update_state() assumed every entry in dag.deadline is a deadline_alert id, but DAG.test() builds its scheduler DAG with an in-memory serialize/deserialize round trip, which leaves the entries as encoded deadline alerts. Passing those dicts to DeadlineAlertModel.get_by_id() fails in the Uuid bind processor with 'dict' object has no attribute 'hex', so 'airflow dags test' exits non-zero for any DAG with a deadline, even though the run succeeded. Decode dict entries directly instead of looking them up in the deadline_alert table. Entries that are strings keep the existing get_by_id() path used by the scheduler. Fixes apache#73428 Co-Authored-By: Claude Code <noreply@anthropic.com>
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
airflow dags testexits non-zero for any DAG that sets adeadline, even though the run succeeded.DAG.test()builds its scheduler DAG with an in-memory serialize/deserialize round trip, which leavesdag.deadlineholding encoded deadline alerts instead ofdeadline_alertids. When the run succeeds,DagRun.update_state()passes those dicts toDeadlineAlertModel.get_by_id(), which fails in theUuidbind processor with'dict' object has no attribute 'hex'.What
Dict entries in
dag.deadlineare decoded directly instead of looked up in thedeadline_alerttable. Entries that are strings keep the existingget_by_id()path used by the scheduler.closes: #73428
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code following the guidelines