helmfile/pkg/app
yxxhero 420cc3ba9c
fix: add trackFailOnError option to control kubedog exit code (#2576)
* fix: add trackFailOnError option to control kubedog exit code behavior

When kubedog release tracking fails (e.g. pod ImagePullBackOff), helmfile
exits with code 0 instead of a non-zero exit code. Add a trackFailOnError
configuration option (default: false) that when set to true, propagates
kubedog tracking failures to the exit code.

The option is available as:
- Per-release YAML: trackFailOnError: true
- CLI flag: --track-fail-on-error (sync and apply commands)

Extract trackReleaseIfEnabled helper to consolidate kubedog tracking logic
from two duplicated call sites into a single maintainable method.

Fixes #2507

Signed-off-by: yxxhero <aiopsclub@163.com>

* fix: add //go:build ignore to server.go to fix go test CI failure

The test/integration/test-cases/issue-2103/input/server.go is a
package main helper binary used by the issue-2103 integration test.
When go test -coverprofile runs on this package, it fails with
"go: no such tool covdata" in the CI environment.

Adding //go:build ignore excludes the file from go list ./... (and
therefore from PKGS in the Makefile), while still allowing the
integration test to build it explicitly via file path:
  go build -o server ./path/to/server.go

Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/8a7000af-72b7-48f8-8a82-24813b5df341

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

* fix: update TestGenerateID expected hashes after adding TrackFailOnError field

Adding TrackFailOnError *bool to ReleaseSpec changed the spew
serialization of the struct, which changed the FNV-32a hash values
produced by generateValuesID. Update temp_test.go with the new
expected hash strings.

Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/caa86cd9-73d1-4894-b745-fd70c0811fd6

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

---------

Signed-off-by: yxxhero <aiopsclub@163.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-05-04 14:20:03 +08:00
..
testdata fix: pass --timeout flag through to helm for sync and apply (#2495) 2026-03-22 07:34:33 +08:00
version
app.go fix: add trackFailOnError option to control kubedog exit code (#2576) 2026-05-04 14:20:03 +08: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: pass --timeout flag through to helm for sync and apply (#2495) 2026-03-22 07:34:33 +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: helmfile list now reflects version from helmfile.lock (#2486) 2026-03-19 14:25:03 +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_sequential_test.go fix: use absolute baseDir in sequential helmfiles for correct values path resolution (#2425) 2026-02-26 07:47:39 +08:00
app_sync_test.go fix: pass --timeout flag through to helm for sync and apply (#2495) 2026-03-22 07:34:33 +08:00
app_template_test.go fix: pass --kube-context to helm template when using jsonPatches (#2363) 2026-01-16 20:32:33 +08:00
app_test.go fix: add trackFailOnError option to control kubedog exit code (#2576) 2026-05-04 14:20:03 +08:00
app_unittest_test.go feat: add `helmfile unittest` command for helm-unittest integration (#2400) 2026-02-16 09:45:10 +08:00
ask.go build(deps): bump golangci/golangci-lint-action from 6 to 7 (#1975) 2025-03-28 07:52:06 +08:00
cleanup_hooks_error_test.go fix: cleanup hooks not receiving error signal (#2475) 2026-03-21 14:29:32 +08:00
config.go fix: add trackFailOnError option to control kubedog exit code (#2576) 2026-05-04 14:20:03 +08:00
constants.go Remove all v0.x references (#1919) 2025-03-08 07:43:21 -06:00
constants_test.go
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
create.go feat: add 'create' subcommand to scaffold helmfile deployment projects (#2574) 2026-05-03 19:03:11 +08:00
create_test.go feat: add 'create' subcommand to scaffold helmfile deployment projects (#2574) 2026-05-03 19:03:11 +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 fix: helmDefaults.postRendererArgs not passed to helm commands (#2510) 2026-04-16 11:08:15 +08: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
errors_test.go
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 Fix helmfile init failing to update outdated helm plugins with Helm v4 (#2554) 2026-04-25 11:04:23 +08:00
init_test.go Fix helmfile init failing to update outdated helm plugins with Helm v4 (#2554) 2026-04-25 11:04:23 +08:00
load_opts.go fix: update state values files handling to replace arrays instead of merging (#2537) 2026-04-13 19:46:15 +08:00
load_opts_test.go fix: update state values files handling to replace arrays instead of merging (#2537) 2026-04-13 19:46:15 +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 feat: add --write-output flag to helmfile fetch for air-gapped environments (#2572) 2026-05-03 18:32:30 +08:00
snapshot_test.go
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
validate_config_test.go