fix(pipedv1): clean up cloned repo after skip stage check - #7275
Merged
mohammedfirdouss merged 1 commit intoAug 27, 2026
Merged
Conversation
Signed-off-by: Ahmad Faraj <ahmedfrag4040@gmail.com>
Ahmad-Faraj
requested review from
Warashi,
ffjlabo and
khanhtc1202
and
a lite review from Copilot
August 26, 2026 17:14
✅ Deploy Preview for pipecd-site canceled.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a resource leak in the pipedv1 scheduler’s skip-stage evaluation by ensuring the temporary Git worktree created during determineSkipStage is always cleaned up after the check completes.
Changes:
- Add a deferred
repo.Clean()after cloning the application repo indetermineSkipStageto prevent temporary directory leaks whenskipOnconditions are evaluated.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
vanshika2720
approved these changes
Aug 26, 2026
mohammedfirdouss
enabled auto-merge (squash)
August 27, 2026 06:15
Contributor
|
Thank you for contributing to PipeCD, @Ahmad-Faraj! The changes in this pull request will be part of the upcoming 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.
What this PR does:
Same leak as #7021, on the pipedv1 side.
determineSkipStageinpkg/app/pipedv1/controller/skipstage.goclones the application repo on every skip check and never removes it, so each check with skipOn conditions leaks one temp directory until the piped restarts.Clean()is not called anywhere in that file. This adds the deferredrepo.Clean(), one line, mirroring what merged in #7021.Follows up on @khanhtc1202's request in #7021 (comment)
Which issue(s) this PR fixes:
None
Does this PR introduce a user-facing change?: