Repository navigation
Conversation
stephanos
marked this pull request as ready for review
May 8, 2026 16:38
S15
previously approved these changes
May 8, 2026
S15
self-requested a review
May 8, 2026 22:42
stephanos
force-pushed
the
stephanos/sano-fix-flaky-endpoint
branch
3 times, most recently
from
May 8, 2026 23:20
ab4d940 to
65c65a9
Compare
1 of 5 tasks
stephanos
force-pushed
the
stephanos/sano-fix-flaky-endpoint
branch
2 times, most recently
from
May 8, 2026 23:29
975897c to
8ef607e
Compare
stephanos
marked this pull request as draft
May 8, 2026 23:30
stephanos
force-pushed
the
stephanos/sano-fix-flaky-endpoint
branch
6 times, most recently
from
May 8, 2026 23:37
b16743a to
00f7ea4
Compare
stephanos
force-pushed
the
stephanos/sano-fix-flaky-endpoint
branch
from
May 13, 2026 00:30
00f7ea4 to
818e3e6
Compare
stephanos
commented
May 13, 2026
| } | ||
| return true | ||
| }, 10*time.Second, 100*time.Millisecond, "endpoint should become visible") | ||
| } |
stephanos
force-pushed
the
stephanos/sano-fix-flaky-endpoint
branch
3 times, most recently
from
May 13, 2026 16:18
6535d73 to
b704a69
Compare
stephanos
commented
May 13, 2026
Contributor
Author
There was a problem hiding this comment.
Yes, it's redundant locally now but I opted to leave this in-place when in-process to not diverge the behavior from prod any more.
stephanos
force-pushed
the
stephanos/sano-fix-flaky-endpoint
branch
7 times, most recently
from
May 13, 2026 20:35
bced3f9 to
c1d9baf
Compare
stephanos
force-pushed
the
stephanos/sano-fix-flaky-endpoint
branch
4 times, most recently
from
May 13, 2026 22:38
b94441a to
d169a8b
Compare
stephanos
commented
May 13, 2026
| endpointsByName map[string]*persistencespb.NexusEndpointEntry | ||
| tableVersionChanged chan struct{} | ||
| sync.RWMutex // protects endpointEntries | ||
| endpointEntries []*persistencespb.NexusEndpointEntry // sorted by ID to support pagination during ListNexusEndpoints |
Contributor
Author
There was a problem hiding this comment.
endpointEntries could also live in the cache, but then history would need to allocate this needlessly.
stephanos
force-pushed
the
stephanos/sano-fix-flaky-endpoint
branch
2 times, most recently
from
May 13, 2026 23:51
e28b958 to
2932125
Compare
stephanos
commented
May 13, 2026
| @@ -305,51 +288,48 @@ func (m *nexusEndpointClient) loadEndpoints(ctx context.Context) error { | |||
| return nil | |||
| } | |||
|
|
|||
| // reset cached view since we will be paging from the start | |||
| m.resetCacheStateLocked() | |||
Contributor
Author
There was a problem hiding this comment.
Not clearing the cache here as it would also clear the history cache; the view on the matching side will still be consistent as this happens under a lock
stephanos
force-pushed
the
stephanos/sano-fix-flaky-endpoint
branch
from
May 13, 2026 23:54
2932125 to
bf69331
Compare
stephanos
force-pushed
the
stephanos/sano-fix-flaky-endpoint
branch
from
May 13, 2026 23:56
bf69331 to
db55bb8
Compare
stephanos
marked this pull request as ready for review
May 14, 2026 00:21
stephanos
added a commit
that referenced
this pull request
May 15, 2026
## What changed? Instead of using the cache for Nexus endpoint name lookups, always look it up via RPC when `RefreshNexusEndpointsOnRead` is set. See #10204 for an alternative approach. ## Why? During testing - such as functional server tests or SDK tests against the CLI - the Nexus endpoint is not always immediately available after creation. This creates friction as it requires extra retries and causes flakiness if not guarded against. This change eliminates that need. ## How did you test it? - [ ] built - [ ] run locally and tested manually - [ ] covered by existing tests - [x] added new unit test(s) - [ ] added new functional test(s)
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.
What changed?
Shared cache for Nexus endpoint name lookups when history/matching run in same process.
Why?
During testing - such as functional server tests or SDK tests against the CLI - the Nexus endpoint is not always immediately available after creation. This creates friction as it requires extra retries and causes flakiness if not guarded against. This change eliminates that need.
How did you test it?
Risk
Significantly more complex change than #10208