Repository navigation
Conversation
chandler-solo
added a commit
that referenced
this pull request
Sep 17, 2026
Signed-off-by: David L. Chandler <david.chandler@solo.io>
Contributor
|
#592 does all of this and more. I took the observability piece from here. |
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
In ADS mode, cache responses are intentionally suppressed when
request.resource_namesare not a superset of snapshot resources.Before this change, suppressed responses could incorrectly drop the watch in two paths:
CreateWatch()immediate-response path:SetSnapshot()watch replay path:respond(...)was called.This creates a recurring out-of-sync condition where a client can stop receiving expected updates until another request lifecycle event occurs.
Fix
1) Make
respond(...)return whether it actually sent a responserespond(...)now returnsbool.falsewhen ADS name mismatch suppresses the response.trueonly when a response is published to the watch channel.2) Preserve watches when a response was suppressed
SetSnapshot(), delete a watch only ifrespond(...) == true.CreateWatch(), if immediate response is suppressed, fall back to adding an open watch.This ensures watches are retained and can be satisfied by later snapshots.
3) Add observability for intentional suppressions
xds/suppressed_responses.type(xDS type URL)reason(ads_name_mismatch)This lets operators distinguish expected suppressions from delivery failures.
Verification
New unit test
Added:
retains ADS watches when immediate response is suppressed by resource-name mismatchinpkg/api/v1/control-plane/cache/cache_test.goTest flow:
v1with endpointsa,b.a, with stale version.1.v2stilla,b; verify still no response and watch remains.v3with onlya; verify response is sent, versionv3, 1 resource, and watch count becomes0.Solo-kit test runs
go test ./pkg/api/v1/control-plane/cache -count=1go test ./pkg/api/v1/control-plane/... -count=1Cross-repo verification in gloo
Using a temporary
go.modreplace inglooto point to this local branch ofsolo-kit:go test ./projects/gloo/pkg/xds ./projects/gloo/pkg/syncer/... -count=1go run /tmp/verify_ads_watch_repro.goResult: targeted
gloosuites passed and repro harness reported:PASS: ADS watch-retention fix works via gloo dependency graphNotes
This change intentionally favors correctness/liveness by retaining suppressed watches instead of dropping them. Existing cancellation and watch lifecycle behavior remains in place; the new suppression metric provides visibility if suppressions accumulate.