helmfile/pkg/app
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
..
testdata 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
version feat: optimize version output (#412) 2022-10-08 14:26:15 +09:00
app.go Add --sequential-helmfiles flag for optional sequential processing (#2350) 2026-01-08 14:28:25 -05:00
app_apply_hooks_test.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
app_apply_nokubectx_test.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
app_apply_test.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
app_diff_test.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
app_gethelm_test.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
app_lint_test.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
app_list_test.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
app_parallel_test.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
app_sync_test.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
app_template_test.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
app_test.go Add parameter to render helmfile as go template without .gotmpl extension (#2312) 2025-12-09 14:41:47 +09:00
ask.go build(deps): bump golangci/golangci-lint-action from 6 to 7 (#1975) 2025-03-28 07:52:06 +08:00
config.go Add --sequential-helmfiles flag for optional sequential processing (#2350) 2026-01-08 14:28:25 -05:00
constants.go Remove all v0.x references (#1919) 2025-03-08 07:43:21 -06:00
constants_test.go fix lint error 2022-08-13 07:40:32 +08:00
context.go perf(app): Parallelize helmfile.d rendering and eliminate chdir race conditions (#2261) 2025-11-15 16:19:41 +08:00
context_test.go perf(app): Parallelize helmfile.d rendering and eliminate chdir race conditions (#2261) 2025-11-15 16:19:41 +08:00
dag_test.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
desired_state_file_loader.go Add parameter to render helmfile as go template without .gotmpl extension (#2312) 2025-12-09 14:41:47 +09:00
destroy_nokubectx_test.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
destroy_test.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
diff_nokubectx_test.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
diff_test.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
errors.go feat: Opt-out dep-builds and repo-updates (#463) 2019-02-04 12:07:25 +09:00
errors_test.go add unittest for error.go in pkg/app 2022-04-28 09:01:02 +08:00
formatters.go 🐛 Fix four critical issues: environment merging, kubeVersion detection, lookup() with kustomize, and Helm 4 color flags (#2276) 2025-11-21 08:32:54 +08:00
formatters_test.go cleanup: remove panic in testutil (#890) 2023-06-13 13:44:32 +08:00
init.go bump helm version to 4.0.4 (#2335) 2025-12-17 11:43:03 +08:00
init_test.go chore: improve test assertions and descriptions for file download test (#1745) 2024-10-19 20:52:01 +08:00
load_opts.go Use goccy/go-yaml for v1 / Prep bringing back go-yaml v2 for v0.x (#604) 2022-12-27 10:14:35 +09:00
load_opts_test.go add Go lint 2022-07-16 20:21:11 +08:00
print_env.go feat: add print-env command (#2279) 2025-11-28 08:46:37 +08:00
print_env_test.go feat: add print-env command (#2279) 2025-11-28 08:46:37 +08:00
run.go fix: resolve issues #2295, #2296, and #2297 (#2298) 2025-11-27 22:13:03 +08:00
snapshot_test.go Use log capturing helper in TestApply_hooks 2022-11-13 08:20:13 +00:00
two_pass_renderer.go build(deps): bump golangci/golangci-lint-action from 6 to 7 (#1975) 2025-03-28 07:52:06 +08:00
two_pass_renderer_test.go Remove all v0.x references (#1919) 2025-03-08 07:43:21 -06:00
validate_config.go add Go lint 2022-07-16 20:21:11 +08:00
validate_config_test.go add unittest for ValidateConfig 2022-04-27 07:38:22 +08:00