helmfile/cmd
Copilot 5b7cbe54e9
Add --sequential-helmfiles flag for optional sequential processing (#2350)
* Initial plan

* Fix helmfile.d parallel processing to respect alphabetical order

Changed multiple helmfile.d file processing from parallel to sequential
to match the documented behavior. Files are now processed in alphabetical
order as stated in the documentation, ensuring predictable deployment order.

This fixes issues where deployments would break because parallel processing
did not respect the intended ordering (e.g., databases before applications).

- Modified visitStatesWithContext to process files sequentially
- Removed unused processStateFileParallel function
- Updated test snapshots to reflect deterministic ordering

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>

* Add --sequential-helmfiles flag for opt-in sequential processing

Based on feedback, added a flag to control processing mode instead of
forcing sequential behavior. Parallel processing is now the default for
performance, with an opt-in --sequential-helmfiles flag for when order matters.

Changes:
- Added SequentialHelmfiles field to GlobalOptions and App
- Added --sequential-helmfiles CLI flag
- Modified visitStatesWithContext to check flag and choose parallel vs sequential
- Updated documentation to clarify parallel is default, sequential is opt-in
- Restored original parallel processing as default behavior

This gives users control over the behavior based on their needs.

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>

* Add documentation and improve code readability

- Added documentation to processStateFileParallel function
- Extracted shouldProcessInParallel variable for clarity
- All tests pass, security scan clean

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>

* Fix lint issue: remove trailing whitespace

Removed trailing whitespace from line 983 in pkg/app/app.go to fix
formatting lint error.

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
2026-01-08 14:28:25 -05:00
..
apply.go Issue-1883 fix (#2058) 2025-11-19 07:45:56 +08:00
build.go Optimize cmd pkg (#384) 2022-10-05 11:02:24 +09:00
cache.go Merge branch 'main' into update_golang_lint 2022-08-14 12:21:10 +09:00
deps.go fix --debug flag 2022-10-25 08:24:23 +08:00
destroy.go Create DeleteWait and DeleteTimeout parameters for Destroy (#1177) 2023-12-05 08:38:37 +08:00
diff.go Issue-1883 fix (#2058) 2025-11-19 07:45:56 +08:00
fetch.go feat: add/expose cli flags (#771) 2023-04-02 14:53:52 +08:00
init.go Add subcommand init for checks and installs helmfile deps (#389) 2022-11-03 14:51:30 +08:00
lint.go feat: add/expose cli flags (#771) 2023-04-02 14:53:52 +08:00
list.go Optimize cmd pkg (#384) 2022-10-05 11:02:24 +09:00
print_env.go feat: add print-env command (#2279) 2025-11-28 08:46:37 +08:00
repos.go fix: repos command help message (#698) 2023-02-15 07:23:50 +08:00
root.go Add --sequential-helmfiles flag for optional sequential processing (#2350) 2026-01-08 14:28:25 -05:00
show-dag.go Update DAG with dependencies (#1477) 2024-04-27 07:37:28 +08:00
status.go fix --debug flag 2022-10-25 08:24:23 +08:00
sync.go Issue-1883 fix (#2058) 2025-11-19 07:45:56 +08:00
template.go Issue-1883 fix (#2058) 2025-11-19 07:45:56 +08:00
test.go feat: add/expose cli flags (#771) 2023-04-02 14:53:52 +08:00
write-values.go feat: add/expose cli flags (#771) 2023-04-02 14:53:52 +08:00