Repository navigation
Deprecate cyclic TaskGroup dependencies #73746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dheerajturaga
merged 12 commits into
apache:main
from
dheerajturaga:deprecate-cyclic-taskgroup-dependencies
Oct 11, 2026
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
074f002
Deprecate cyclic TaskGroup dependencies
dheerajturaga 3775249
Add newsfragment for cyclic TaskGroup dependency deprecation
dheerajturaga 60032d9
Flag paths that leave and re-enter a TaskGroup as cyclic
dheerajturaga 334e1d3
Allow the DagBag's TaskGroup cycle warning import from the SDK
dheerajturaga 82e8aad
Keep mapped TaskGroups with an always-run task parseable
dheerajturaga dfb570c
Keep a TaskGroup cycle warning with the Dag that was bagged
dheerajturaga d23f5d8
Document which Dags the TaskGroup cycle check covers
dheerajturaga 2f877ec
Keep the TaskGroup cycle warning short for large Dags
dheerajturaga 6aac6fc
Import the TaskGroup cycle warning category at module level in DagBag
dheerajturaga 90902c1
Reuse the shared TaskGroup cycle component finder in the Task SDK
dheerajturaga 9680477
Stop exempting the DagBag warning category import from the SDK check
dheerajturaga 264b03d
Expect the TaskGroup cycle warning in the SDK topological sort test
dheerajturaga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| Deprecate cyclic TaskGroup dependencies | ||
|
|
||
| A Dag whose TaskGroups depend on each other in a cycle, when each TaskGroup is treated as a single unit, | ||
| now issues a ``TaskGroupCycleDeprecationWarning`` at parse time and shows a Dag warning in the UI that | ||
| names the TaskGroups and tasks involved. These Dags still parse and run, because their task dependencies | ||
| are acyclic, but Airflow 3.5 is planned to reject them at parse time. | ||
|
|
||
| A dependency into or out of any task in a TaskGroup counts as a dependency of the whole group, so a path | ||
| that leaves a TaskGroup and comes back into it is a cycle. For example, ``a >> bridge >> b``, with ``a`` | ||
| and ``b`` in the same TaskGroup and ``bridge`` outside it, makes the group depend on ``bridge`` and | ||
| ``bridge`` depend on the group, even if ``a >> b`` is also set. | ||
|
|
||
| **Migration:** | ||
|
|
||
| - Move tasks between TaskGroups, or out of them, so that each group depends on the others in one direction | ||
| only. In the example above, move ``bridge`` into the group, or move ``b`` out of it. | ||
| - To catch these Dags in CI, run your Dag tests with | ||
| ``-W error::airflow.sdk.exceptions.TaskGroupCycleDeprecationWarning``. The check runs when a Dag is | ||
| added to a ``DagBag``, so only tests that load your Dags into a ``DagBag`` and assert there are no import | ||
| errors catch them; a test that only imports a Dag file does not. | ||
|
|
||
| See "Cyclic TaskGroup dependencies" in the Dags documentation. |
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.