Skip to content

fix(kubernetes): announce pods added to registry watches - #5075

Merged
asim merged 1 commit into
micro:masterfrom
shuaiyafei:codex/kubernetes-watch-added
Nov 24, 2026
Merged

asim merged 1 commit into
micro:masterfrom
shuaiyafei:codex/kubernetes-watch-added

Conversation

@shuaiyafei

Copy link
Copy Markdown
Contributor

The Kubernetes registry watcher handles MODIFIED and DELETED but ignores ADDED. A running pod that starts matching the service label selector can therefore remain undiscovered until another modification arrives. Kubernetes emits ADDED when an object enters a selector, as shown by the API server watch conversion.

Handle ADDED through 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. Keep MODIFIED as a control and add an Unreleased note.

Verification

On unchanged 018efdc, the ADDED case fails with Next: result chan closed, while the MODIFIED control passes. Both pass with the fix.

  • go test -race -timeout 45s -count=1 ./registry/kubernetes/... ./cmd/defaults passed.
  • 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 harness passed, including mock-provider conformance.
  • git diff --check passed.

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 unchanged TestStreamedReferenceLinks failure 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 requested codex label; a maintainer can add it. Maintainer edits are enabled.

@asim
asim merged commit 65def6c into micro:master Nov 24, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants