Skip to content

fix(chart): continue diagnostics after individual failures - #884

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

cpanato merged 1 commit into
helm:mainfrom
ViktorBystrov72:fix/continue-collecting-diagnostics

Conversation

@ViktorBystrov72

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

A failed container-list or log request currently stops collection of otherwise available diagnostics. With --github-groups, a failed print command also returns before emitting the matching group end marker, so later CI output can be folded into the wrong group.

Continue collecting remaining pods and containers after individual failures, retain the printed error, and always finish each output group. When --print-logs is disabled, do not query container lists before describing the remaining pods.

Special notes for your reviewer:

The regression suite covers event failures, init/regular container discovery failures, individual log failures, disabled logs and successful runs, with GitHub grouping both on and off. It checks the collected operations, error output and balanced group markers. These failure paths reproduce on unmodified main.

Validation with Go 1.27.3 and golangci-lint 2.14.0:

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

All passed. Tests use a fake kubectl client; no live-cluster tests were run.

Collect the remaining pod and container diagnostics after a failed request, and close GitHub output groups even when a log command fails. Avoid querying containers when log output is disabled.

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 5ea7160 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.

2 participants