8000 feat: set default workspace proxy based on latency by Emyrk · Pull Request #17812 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: set default workspace proxy based on latency #17812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
May 30, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
unit test
  • Loading branch information
Emyrk committed May 13, 2025
commit 5427b6144b74842f8f608729bbf0a48afc96f9be
6 changes: 3 additions & 3 deletions site/src/contexts/ProxyContext.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import type * as ProxyLatency from "./useProxyLatency";
// here and not inside a unit test.
jest.mock("contexts/useProxyLatency", () => ({
useProxyLatency: () => {
return { proxyLatencies: hardCodedLatencies, refetch: jest.fn() };
return { proxyLatencies: hardCodedLatencies, refetch: jest.fn(), loaded: true };
},
}));

Expand Down Expand Up @@ -261,11 +261,11 @@ describe("ProxyContextSelection", () => {
expUserProxyID: MockHealthyWildWorkspaceProxy.id,
},
],
// Latency behavior is disabled, so the primary should be selected.
// First page load defers to the proxy by latency
[
"regions_default_low_latency",
{
expProxyID: MockPrimaryWorkspaceProxy.id,
expProxyID: MockHealthyWildWorkspaceProxy.id,
regions: MockWorkspaceProxies,
storageProxy: undefined,
latencies: {
Expand Down
0