Skip to content

Strongly consistent Nexus endpoints lookup via dynamic config#10208

Closed
stephanos wants to merge 1 commit into
mainfrom
stephanos/sano-flaky-endpoint-2
Closed

Strongly consistent Nexus endpoints lookup via dynamic config#10208
stephanos wants to merge 1 commit into
mainfrom
stephanos/sano-flaky-endpoint-2

Conversation

@stephanos
Copy link
Copy Markdown
Contributor

@stephanos stephanos commented May 8, 2026

What changed?

Instead of using the cache for Nexus endpoint name lookups, always look it up via RPC when RefreshNexusEndpointsOnReadForTest 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
  • added new unit test(s)
  • added new functional test(s)

@stephanos stephanos force-pushed the stephanos/sano-flaky-endpoint-2 branch 2 times, most recently from a3edc65 to 6b82326 Compare May 8, 2026 23:11
@stephanos stephanos changed the title Stephanos/sano flaky endpoint 2 New RefreshNexusEndpointsOnRead dc May 8, 2026
@stephanos stephanos force-pushed the stephanos/sano-flaky-endpoint-2 branch 2 times, most recently from fe97fdc to 619ca31 Compare May 8, 2026 23:15
1*time.Second,
`RefreshNexusEndpointsMinWait is the minimum wait time between background long poll requests to update Nexus endpoints.`,
)
RefreshNexusEndpointsOnReadForTest = NewGlobalBoolSetting(
Copy link
Copy Markdown
Contributor Author

@stephanos stephanos May 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided on ForTest suffix to make it very clear this is not for prod.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's not for prod, maybe it could be a test hook instead of dynamic config?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the uses cases is the embedded server inside the CLI, though.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it may not be for prod but end users will want to set this in the dev server

@stephanos stephanos changed the title New RefreshNexusEndpointsOnRead dc New RefreshNexusEndpointsOnReadForTest dc May 8, 2026
@stephanos stephanos changed the title New RefreshNexusEndpointsOnReadForTest dc Strongly consistent Nexus endpoints via dynamic config May 8, 2026
@stephanos stephanos force-pushed the stephanos/sano-flaky-endpoint-2 branch from 619ca31 to 3146afa Compare May 8, 2026 23:20
@stephanos stephanos force-pushed the stephanos/sano-flaky-endpoint-2 branch from 3146afa to ace3ca5 Compare May 8, 2026 23:25
@stephanos stephanos changed the title Strongly consistent Nexus endpoints via dynamic config Strongly consistent Nexus endpoints lookup via dynamic config May 8, 2026
@stephanos stephanos closed this May 13, 2026
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.

3 participants