fix: pass --timeout flag through to helm for sync and apply#2495
Merged
yxxhero merged 5 commits intohelmfile:mainfrom Mar 21, 2026
Merged
fix: pass --timeout flag through to helm for sync and apply#2495yxxhero merged 5 commits intohelmfile:mainfrom
yxxhero merged 5 commits intohelmfile:mainfrom
Conversation
Signed-off-by: Hristiyan Ivanov <hristiyan.d.ivanov@gmail.com>
Signed-off-by: Hristiyan Ivanov <hristiyan.d.ivanov@gmail.com>
Signed-off-by: Hristiyan Ivanov <hristiyan.d.ivanov@gmail.com>
6efea00 to
6fa9408
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes and extends CLI timeout handling so --timeout is actually propagated into the Helm upgrade/install calls for both helmfile sync and helmfile apply.
Changes:
- Plumbs
Timeoutfrom the app config providers intostate.SyncOptsfor both theapplyandsyncexecution paths. - Adds
--timeoutflag support tohelmfile apply(matching existinghelmfile syncflag behavior). - Adds a sync-focused regression test verifying
--timeoutbecomeshelm --timeout <Ns>.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/config/apply.go | Adds Timeout to apply options and exposes it via ApplyImpl.Timeout(). |
| pkg/app/config.go | Extends ApplyConfigProvider and SyncConfigProvider with Timeout() int. |
| pkg/app/app.go | Passes c.Timeout() into state.SyncOpts in both apply and sync flows. |
| cmd/apply.go | Introduces --timeout flag for helmfile apply. |
| pkg/app/app_test.go | Updates the apply test config stub to satisfy the new Timeout() interface method. |
| pkg/app/app_sync_test.go | Adds regression coverage ensuring sync propagates timeout into Helm flags. |
Signed-off-by: Hristiyan Ivanov <hristiyan.d.ivanov@gmail.com>
Signed-off-by: Hristiyan Ivanov <hristiyan.d.ivanov@gmail.com>
yxxhero
approved these changes
Mar 21, 2026
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.
Summary
--timeoutflag forhelmfile syncwhich was defined but not passed to helm--timeoutflag forhelmfile applywhich was missingProblem
The
--timeoutflag forhelmfile syncwas added in #2148 but never passed through to the actual helm commands. The flag was parsed and stored, but silently ignored becauseSyncOpts.Timeoutwas never populated when building the options.For
helmfile applythe--timeoutflag didn't exist at all.