You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
agent: callers are told a snapshot build failed when the snapshot was installed and is being served #1620
Since #1608generateSnapshot does its bookkeeping for a snapshot whose SetSnapshot returned an error (the snapshot is installed; only answering an open watch failed), but it still returns that error. AddPod, and through it the CNI server, RemoveCluster and the other callers therefore report failure for state that is installed and served: a CNI ADD can fail and be retried although the pod's listeners are published.
Decide per caller whether "installed, one watch not answered" is an error at all (the proxy will get the resources on its next request), and return a distinguishable value so the CNI path does not fail a pod start for it.
PR #1625 fixes the cause that could be reached and leaves the caller side.
Done there:SetSnapshot is no longer called under the caller's context, so a caller whose context has already ended (a CNI ADD whose RPC was abandoned) no longer leaves watches unanswered or gets an error for an installed snapshot. A build that could not hand a response to an open watch within its bound (5 s) returns cache.ErrWatchNotAnswered, wrapped by every mutator, so a caller can tell it with errors.Is.
Left:agent/internal/cni/server/pod.go still turns every SnapshotCache.AddPod error into codes.Internal. If the bound expires, the pod's snapshot is installed and served, and the ADD is still reported failed and retried. The CNI caller should treat errors.Is(err, cache.ErrWatchNotAnswered) as installed (the build has already logged snapshot installed, but an open watch was not answered from it at WARN). The other callers outside the cache package that return a build's error (takeover.go, the cluster and secret setters' callers) are worth the same look.
The bound is not expected to expire: #1619 shows no stream of the pinned go-control-plane can refuse a response.
Activity
bpalermo commentedon Oct 10, 2026
PR #1625 fixes the cause that could be reached and leaves the caller side.
Done there:
SetSnapshotis no longer called under the caller's context, so a caller whose context has already ended (a CNI ADD whose RPC was abandoned) no longer leaves watches unanswered or gets an error for an installed snapshot. A build that could not hand a response to an open watch within its bound (5 s) returnscache.ErrWatchNotAnswered, wrapped by every mutator, so a caller can tell it witherrors.Is.Left:
agent/internal/cni/server/pod.gostill turns everySnapshotCache.AddPoderror intocodes.Internal. If the bound expires, the pod's snapshot is installed and served, and the ADD is still reported failed and retried. The CNI caller should treaterrors.Is(err, cache.ErrWatchNotAnswered)as installed (the build has already loggedsnapshot installed, but an open watch was not answered from itat WARN). The other callers outside the cache package that return a build's error (takeover.go, the cluster and secret setters' callers) are worth the same look.The bound is not expected to expire: #1619 shows no stream of the pinned go-control-plane can refuse a response.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
fix(agent, observability): a caller's ended context no longer leaves …