Add missing --timeout flag to helmfile sync command with documentation#2148
Merged
Conversation
- Add Timeout field to SyncOptions struct in pkg/config/sync.go - Add --timeout flag to sync command in cmd/sync.go - Add Timeout field to SyncOpts struct in pkg/state/state.go - Modify timeoutFlags() function to prioritize CLI timeout over release and default configs - Add test case to verify CLI timeout overrides other timeout settings - Follow same pattern as existing --wait and --wait-for-jobs flags Co-authored-by: yxxhero <[email protected]>
Copilot
AI
changed the title
[WIP] helmfile sync --timeout <timeout_value> returns "unknown flag: --timeout" despite being documented as supported
Add missing --timeout flag to helmfile sync command
Aug 23, 2025
Member
|
@copilot please fix lint issues. |
Member
|
@copilot please update the docs. |
Co-authored-by: yxxhero <[email protected]>
Contributor
Author
Co-authored-by: yxxhero <[email protected]>
Contributor
Author
Updated the documentation to include the new |
Copilot
AI
changed the title
Add missing --timeout flag to helmfile sync command
Add missing --timeout flag to helmfile sync command with documentation
Aug 23, 2025
xiaomudk
approved these changes
Aug 27, 2025
KATechDev
pushed a commit
to KATechDev/helmfile
that referenced
this pull request
Oct 1, 2025
helmfile#2148) * Initial plan * Implement --timeout flag for helmfile sync command - Add Timeout field to SyncOptions struct in pkg/config/sync.go - Add --timeout flag to sync command in cmd/sync.go - Add Timeout field to SyncOpts struct in pkg/state/state.go - Modify timeoutFlags() function to prioritize CLI timeout over release and default configs - Add test case to verify CLI timeout overrides other timeout settings - Follow same pattern as existing --wait and --wait-for-jobs flags Co-authored-by: yxxhero <[email protected]> * Fix lint issues: format test struct fields properly Co-authored-by: yxxhero <[email protected]> * Update docs: Add --timeout flag documentation for helmfile sync command Co-authored-by: yxxhero <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: yxxhero <[email protected]>
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.
The
helmfile synccommand was missing the--timeoutflag despite timeout functionality being documented and available in the configuration. Users attempting to usehelmfile sync --timeout 900would encounter an "unknown flag: --timeout" error.This PR implements the missing CLI flag and adds comprehensive documentation:
Changes Made
--timeoutflag to sync command: The flag accepts an integer value representing seconds and validates input properlyTimeoutfield to bothSyncOptionsandSyncOptsstructstimeoutFlags()function to prioritize CLI timeout over release-specific and default timeoutsDocumentation Updates
The sync command documentation now includes:
--timeout,--wait,--wait-for-jobs)Behavior
The timeout flag follows the established priority order:
helmfile sync --timeout 900(highest priority)timeout: 600in release specificationhelmDefaults.timeout: 300(lowest priority)Example Usage
The implementation maintains full backward compatibility and follows existing code patterns. Input validation ensures invalid values like
--timeout abcare properly rejected with clear error messages.Fixes #1543.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.