fix: lower GetPodClique NotFound log to V(1) during expected cascade-delete#636
Open
sridhar-3009 wants to merge 1 commit into
Open
fix: lower GetPodClique NotFound log to V(1) during expected cascade-delete#636sridhar-3009 wants to merge 1 commit into
sridhar-3009 wants to merge 1 commit into
Conversation
…delete During a normal PodCliqueSet cascade-delete, the PodClique controller receives reconcile requests for already-deleted PodCliques. The helper was logging each at info level, producing one log line per deleted PodClique at scale — significant noise with no actionable signal. Change: when ignoreNotFound=true (the caller has signalled the NotFound is expected), log at V(1) instead of Info. Unexpected missing PodCliques — where ignoreNotFound=false — are still propagated as errors so the owning reconciler can surface them. Add TestGetPodClique_IgnoreNotFoundFalse to cover the error-propagation path (ignoreNotFound=false on a missing object must not silently swallow the error). Closes ai-dynamo#622
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.
Problem
Resolves #622.
During normal
PodCliqueSetcascade-delete, thePodCliquecontroller receives reconcile requests for already-deletedPodCliquesand logs atinfolevel:{"level":"info","msg":"PodClique not found","objectKey":{"name":"...","namespace":"default"}}At scale this produces one log line per deleted PodClique — pure noise with no actionable signal.
Fix
GetPodCliquealready accepts anignoreNotFound boolparameter to signal that the caller considers NotFound expected. Change the log level in that branch fromInfotoV(1)(verbose/debug). The log message is updated to clarify it is during cascade-delete.Unexpected missing PodCliques (
ignoreNotFound=false) still propagate as errors throughReconcileWithErrors, preserving visibility.Tests
Added
TestGetPodClique_IgnoreNotFoundFalseto cover the error-propagation path —ignoreNotFound=falseon a missing object must return an error result, not silently succeed.Before / After
Before: Every deleted PodClique during a cascade emits one
infolog.After: Those logs appear only at
V(1)(hidden unless verbose logging is enabled). Unexpected missing PodCliques still surface as errors.