Prevent exponential compile time for reconverging workflows - #7950
Merged
Merged
Conversation
Signed-off-by: 1fanwang <1fannnw@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7950 +/- ##
=======================================
Coverage 57.28% 57.28%
=======================================
Files 931 931
Lines 58311 58313 +2
=======================================
+ Hits 33403 33405 +2
- Misses 21849 21851 +2
+ Partials 3059 3057 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: 1fanwang <1fannnw@gmail.com>
kumare3
approved these changes
Sep 2, 2026
pingsutw
approved these changes
Sep 2, 2026
|
I literally just ran into the issue, thank you for fixing it! Can't wait for the next v1 release :) |
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 are the changes needed?
Reconverging acyclic workflows can take exponentially longer to compile because cycle detection revisits checked descendants.
Before, each reconvergence multiplied the remaining traversal. After, each node is expanded once.
What changes were proposed in this pull request?
The traversal checks the active stack first, then skips completed nodes. Back edges still report cycles. A regression test counts expansions.
How was this patch tested?
The regression fails against the exact parent and passes at this PR's head.
Raw logs
Parent implementation with the regression test applied:
This patch:
At
69e00fb, the race run reports 82.0% compiler package coverage and 100% coverage forutils.go.codecov/projectandcodecov/patchboth pass.The unrelated sandbox job failed during
go mod downloadfromproxy.golang.org(stream ID 433; INTERNAL_ERROR; received from peer).Labels
Setup process
N/A.
Screenshots
N/A.
Check all the applicable boxes