Repository navigation
Fix nil hook output callback panic - #1604
Merged
Merged
Conversation
lubronzhan
force-pushed
the
hook-output-logs
branch
from
October 5, 2026 17:28
4330205 to
53ad674
Compare
matheuscscp
reviewed
Oct 5, 2026
Member
|
@lubronzhan After #1562 (comment) I think I prefer to just fix the panic for now. Let's not wire these logs yet. Sorry for all the churn! |
Contributor
Author
Hi @matheuscscp no worries it totally make sense. I updated it |
Member
|
Please rebase (no merge commits pls), squash all commits into one, and force-push 🙏 |
This was referenced Oct 16, 2026
Default the hook output callback to io.Discard so annotated hooks can collect container logs without a nil callback panic. Add coverage for successful and interrupted streams and builds without a logger. Signed-off-by: lubronzhan <lubronzhan@gmail.com> Assisted-by: Codex/gpt-6
lubronzhan
force-pushed
the
hook-output-logs
branch
from
October 16, 2026 15:50
ca75126 to
c2163d6
Compare
Contributor
Author
|
Got it. Done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1562.
Initialize
HookOutputFuncto returnio.Discard, matching Helm's default and preventing a nil callback panic when hooks usehelm.sh/hook-output-log-policy. Hook logs are not forwarded to controller logs or events.Credit to @pujitha24 for the original fix in #1563. This PR adopts that approach following maintainer feedback, with regression coverage for successful and interrupted log streams and configuration without a logger.
Validation:
make tidy fmt vet && make test.This PR was written in part with the assistance of generative AI.