CSPL-4357: Secrets logs#1711
Merged
Igor-splunk merged 3 commits intofeature/slog-as-default-loggerfrom Feb 26, 2026
Merged
Conversation
kasiakoziol
reviewed
Feb 20, 2026
|
|
||
| // Sanity checks | ||
| if secret.Data == nil { | ||
| logger.WarnContext(ctx, "Secret has nil data. Update secret with required data", |
Collaborator
There was a problem hiding this comment.
Do we want to stick to WarnContext or ErrorContext?
Collaborator
Author
There was a problem hiding this comment.
Both are used intetnionally. Its not an unexpected error, user can go ahead and create the secret, its recoverable hence warn instead of error.
kasiakoziol
reviewed
Feb 20, 2026
| @@ -96,6 +120,10 @@ func GetSecretFromPod(ctx context.Context, c splcommon.ControllerClient, PodName | |||
| namespacedName = types.NamespacedName{Namespace: namespace, Name: secretName} | |||
| err = c.Get(ctx, namespacedName, ¤tSecret) | |||
| if err != nil { | |||
Collaborator
There was a problem hiding this comment.
Would be good to refactor this, not specifically as a part of this PR to differentiate SecretNotFoundError from other errors that could occur here.
kasiakoziol
reviewed
Feb 20, 2026
| namespacedName := types.NamespacedName{Namespace: namespace, Name: name} | ||
| err := c.Get(ctx, namespacedName, &namespaceScopedSecret) | ||
| if err != nil { | ||
| // Didn't find it |
Collaborator
There was a problem hiding this comment.
Same here, 404 is probably not the only things that could happen here
kasiakoziol
approved these changes
Feb 26, 2026
29397cc
into
feature/slog-as-default-logger
12 of 14 checks passed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
What does this PR have in it?
Key Changes
Highlight the updates in specific files
Testing and Verification
How did you test these changes? What automated tests are added?
Related Issues
Jira tickets, GitHub issues, Support tickets...
PR Checklist