Skip to content

fix(chart): retain diagnostics when cleanup is skipped - #883

Merged
cpanato merged 1 commit into
helm:mainfrom
ViktorBystrov72:fix/diagnostics-without-cleanup
Nov 10, 2026
Merged

cpanato merged 1 commit into
helm:mainfrom
ViktorBystrov72:fix/diagnostics-without-cleanup

Conversation

@ViktorBystrov72

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

--skip-clean-up currently suppresses events, pod descriptions and logs because diagnostics run only inside the teardown callback. Always collect diagnostics when an install or upgrade attempt finishes, then perform teardown only when cleanup is enabled. Diagnostics still run before release or namespace deletion.

Which issue this PR fixes: Fixes #880.

Special notes for your reviewer:

The regression test covers install and upgrade success/failure, failed test hooks, skipped previous revisions, custom/generated namespaces, and both cleanup modes. It asserts the complete operation order, namespace and pod selector. The 12 skip-cleanup cases fail on unmodified main; all 24 cases pass with this fix.

Validation with Go 1.27.3 and golangci-lint 2.14.0:

go test ./... -count=1
golangci-lint run ./...
git diff --check

All passed. Kubernetes and Helm operations are faked; no live-cluster tests were run.

Print events, pod details and container logs before optional teardown in install and upgrade tests. Keep resources intact with --skip-clean-up while retaining diagnostics on successful and failed runs.

Fixes helm#880

Signed-off-by: Виктор Быстров <anatema@bk.ru>

@cpanato cpanato left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@cpanato
cpanato merged commit ddb8901 into helm:main Nov 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--skip-clean-up suppresses all pod/event/log output

2 participants