Repository navigation
fix(kubernetes): announce pods added to registry watches - #5075
Merged
Merged
Conversation
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.
The Kubernetes registry watcher handles
MODIFIEDandDELETEDbut ignoresADDED. A running pod that starts matching the service label selector can therefore remain undiscovered until another modification arrives. Kubernetes emitsADDEDwhen an object enters a selector, as shown by the API server watch conversion.Handle
ADDEDthrough the existing pod/cache update path. Add a public Registry.Watch/Next HTTP-stream regression covering an initially empty list followed by a matching running pod. KeepMODIFIEDas a control and add an Unreleased note.Verification
On unchanged
018efdc, the ADDED case fails withNext: result chan closed, while the MODIFIED control passes. Both pass with the fix.go test -race -timeout 45s -count=1 ./registry/kubernetes/... ./cmd/defaultspassed.go build ./...passed.golangci-lint run ./...passed with 0 issues (v2.14.0).TERM=dumb go test -json -timeout 120s ./...passed: 109 packages, 36 existing skipped test nodes, 73 packages without tests.TERM=dumb make harnesspassed, including mock-provider conformance.git diff --checkpassed.Go 1.26.11 was used, matching
go.mod. The regression uses a loopback HTTP API fixture, not a live Kubernetes cluster. The existing renderer tests use plain terminal mode; the unchangedTestStreamedReferenceLinksfailure without that mode is also documented in #5073. No live cluster or authenticated model inference was validated.AI assistance
Prepared, tested, and self-reviewed with OpenAI Codex (GPT-6, autonomous) for @shuaiyafei. The
codex/branch follows AGENTS.md. This external account cannot apply the requestedcodexlabel; a maintainer can add it. Maintainer edits are enabled.