Restoring include_downstream_dags logic to clear downstream Dags#65314
Open
jroachgolf84 wants to merge 14 commits into
Open
Restoring include_downstream_dags logic to clear downstream Dags#65314jroachgolf84 wants to merge 14 commits into
include_downstream_dags logic to clear downstream Dags#65314jroachgolf84 wants to merge 14 commits into
Conversation
2 tasks
|
Hey, any updates on this? |
Collaborator
Author
|
@jason810496 - can you take a look at this one for me? |
Collaborator
Author
|
@bugraoz93 - do you mind taking a look at this one? |
kaxil
reviewed
Jun 26, 2026
| if task.logical_date != default_template: | ||
| from airflow.models.renderedtifields import RenderedTaskInstanceFields | ||
|
|
||
| rendered = RenderedTaskInstanceFields.get_templated_fields(ti, session=session) |
Member
There was a problem hiding this comment.
The custom-template path has a case that isn't handled: if the marker uses a non-default logical_date template and the RTIF row has already been pruned (num_dag_runs_to_retain_rendered_fields), rendered comes back empty and logical_date_str quietly stays as the marker run's own date from line 1214 -- so the child lookup targets the wrong DagRun. The test seeds the RTIF row, so this case isn't exercised. Either fail loudly or add a test with the row missing.
issue-61451: Restoring include_downstream_dags logicinclude_downstream_dags logic to clear downstream Dags
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.
Description
Restoring behavior to clear downstream DAGs when a Task state is cleared (if applicable).
closes: #61451
Testing
Unit-tests were added/updated to test these changes. The changes were also tested E2E.
Unit Tests
The unit-tests added/updated as part of this effort can be found in these files:
airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_task_instances.pyairflow-core/tests/unit/serialization/definitions/test_dag.pyThese tests can be executed using the commands below:
E2E Testing
The DAG below was used to test the changes int his PR. This DAG is made up of a parent and child DAG. The
ExternalTaskMarkerOperator is cleared in the parent DAG, the downstream Tasks in the child DAG are also cleared. That's showed in the video below.Video
issue-61451-include-downstream-tasks.mov