Repository navigation
Skip notifications for canceled reconciliations - #974
Open
shubhamcommits wants to merge 1 commit into
Open
shubhamcommits wants to merge 1 commit into
shubhamcommits wants to merge 1 commit into
Conversation
Avoid emitting failure notifications when the reconciliation context is canceled during controller shutdown. Capture the original reconciliation context for deferred notifications so canceling a scan timeout context does not suppress normal events. Preserve notifications for registry failures and exceeded deadlines, and cover the context handling with notification and registry regression tests. Signed-off-by: Shubham Singh <development.shubhamsingh@gmail.com> Assisted-by: Codex/GPT-6
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 #491 using the notification suppression approach discussed in the issue.
Skip notification events and their paired event logs when the reconciliation context is canceled. Capture the original context for deferred ImageRepository notifications: the scan timeout context is canceled before that defer runs, so checking it would also suppress ordinary events. Registry errors and exceeded deadlines still produce notifications.
Add context tests, including cancellation with a custom cause, and a real HTTP registry regression covering successful scans, registry errors, scan timeouts, and cancellation during an in-flight request.
Validation:
make tidy fmt vet && make testpasses, including envtest and the API module.One initial full-suite run hit the existing readiness test's six-second deadline; the subsequent full gate passed without changing that test or the patch. Live delivery through notification-controller was not exercised.
AI assistance
Codex/GPT-6 assisted with implementation, regression tests, validation harnesses, commit messages, and the PR description.