-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Reject cyclic TaskGroup dependencies during Dag parsing #73087
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
Open
dheerajturaga
wants to merge
3
commits into
apache:main
Choose a base branch
from
dheerajturaga:reject-cyclic-taskgroup-dependencies
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
0d27df7
Reject cyclic TaskGroup dependencies during Dag parsing
dheerajturaga b3c467d
Clarify which TaskGroup edges trigger cycle rejection and add newsfra…
dheerajturaga f0677f6
Name faulty tasks/TaskGroups in cycle errors, document bridged cycles
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,19 @@ | ||
| Cyclic TaskGroup dependencies now fail Dag parsing instead of failing later in Grid or Graph | ||
|
|
||
| Dag parsing now rejects TaskGroups whose dependencies form a cycle when each group is treated as a single | ||
| unit -- for example, a task in ``group1`` upstream of ``group2``'s root task while a task in ``group2`` is | ||
| upstream of ``group1``'s root task. Task-level dependencies can be acyclic while this group-level | ||
| projection still cycles, and downstream consumers such as Grid and Graph need an unambiguous group | ||
| ordering. The same root-task rule can also close a cycle on a single group: a task with no upstream task | ||
| inside its own group counts as a root of that group even when an external task provides its only upstream, | ||
| so routing between two such tasks through an outside task closes a cycle on the group itself. | ||
|
|
||
| Before this change, a Dag with cyclic TaskGroup dependencies could parse and run its tasks normally. #69933 | ||
| fixed the group-level topological sort used by Grid and Graph to actually detect group-to-group and | ||
| cross-group edges -- it previously ignored them and rendered an arbitrary, incorrect order instead of | ||
| failing. That made a pre-existing cycle in a Dag's TaskGroups surface as an unhandled error from the Grid | ||
| and Graph API endpoints rather than a rendering quirk. This change moves that failure to Dag parsing time | ||
| instead, where it raises an import error naming the offending TaskGroup and the specific task/TaskGroup ids | ||
| involved in the cycle, rather than a 500 response from the UI. | ||
|
|
||
| Dags that previously parsed with cyclic TaskGroup dependencies must be restructured to remove the cycle. |
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
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.