diff --git a/coderd/apidoc/docs.go b/coderd/apidoc/docs.go index 091ac4927d8a3..bb1160eaf60df 100644 --- a/coderd/apidoc/docs.go +++ b/coderd/apidoc/docs.go @@ -8826,7 +8826,6 @@ const docTemplate = `{ "codersdk.Experiment": { "type": "string", "enum": [ - "moons", "workspace_actions", "tailnet_pg_coordinator", "single_tailnet", @@ -8834,7 +8833,6 @@ const docTemplate = `{ "template_update_policies" ], "x-enum-varnames": [ - "ExperimentMoons", "ExperimentWorkspaceActions", "ExperimentTailnetPGCoordinator", "ExperimentSingleTailnet", diff --git a/coderd/apidoc/swagger.json b/coderd/apidoc/swagger.json index fd0703d4e74ea..6caa66188f710 100644 --- a/coderd/apidoc/swagger.json +++ b/coderd/apidoc/swagger.json @@ -7904,7 +7904,6 @@ "codersdk.Experiment": { "type": "string", "enum": [ - "moons", "workspace_actions", "tailnet_pg_coordinator", "single_tailnet", @@ -7912,7 +7911,6 @@ "template_update_policies" ], "x-enum-varnames": [ - "ExperimentMoons", "ExperimentWorkspaceActions", "ExperimentTailnetPGCoordinator", "ExperimentSingleTailnet", diff --git a/codersdk/deployment.go b/codersdk/deployment.go index 19d14c96b81ff..ae72f184bd9ab 100644 --- a/codersdk/deployment.go +++ b/codersdk/deployment.go @@ -2073,10 +2073,6 @@ func (c *Client) BuildInfo(ctx context.Context) (BuildInfoResponse, error) { type Experiment string const ( - // ExperimentMoons enabled the workspace proxy endpoints and CRUD. This - // feature is not yet complete in functionality. - ExperimentMoons Experiment = "moons" - // https://github.com/coder/coder/milestone/19 ExperimentWorkspaceActions Experiment = "workspace_actions" diff --git a/docs/admin/workspace-proxies.md b/docs/admin/workspace-proxies.md index e88c40831e59f..972475a3a71d3 100644 --- a/docs/admin/workspace-proxies.md +++ b/docs/admin/workspace-proxies.md @@ -1,13 +1,5 @@ # Workspace Proxies -> Workspace proxies are in an -> [experimental state](../contributing/feature-stages.md#experimental-features) -> and the behavior is subject to change. Use -> [GitHub issues](https://github.com/coder/coder) to leave feedback. This -> experiment must be specifically enabled with the `--experiments="moons"` -> option on both coderd and the workspace proxy. If you have all experiements -> enabled, you have to add moons as well. `--experiments="*,moons"` - Workspace proxies provide low-latency experiences for geo-distributed teams. Coder's networking does a best effort to make direct connections to a workspace. @@ -130,10 +122,6 @@ coder: - name: CODER_WILDCARD_ACCESS_URL value: "*." - # enables new paid features that are in alpha state - - name: CODER_EXPERIMENTS - value: "*,moons" - tls: secretNames: - kubernetes-wsproxy-secret diff --git a/docs/api/general.md b/docs/api/general.md index 65d9d4badd499..f82c4aaeb3a63 100644 --- a/docs/api/general.md +++ b/docs/api/general.md @@ -563,7 +563,7 @@ curl -X GET http://coder-server:8080/api/v2/experiments \ > 200 Response ```json -["moons"] +["workspace_actions"] ``` ### Responses @@ -600,7 +600,7 @@ curl -X GET http://coder-server:8080/api/v2/experiments/available \ > 200 Response ```json -["moons"] +["workspace_actions"] ``` ### Responses diff --git a/docs/api/schemas.md b/docs/api/schemas.md index 991f57bccbb0c..588ddc9fb990c 100644 --- a/docs/api/schemas.md +++ b/docs/api/schemas.md @@ -2865,7 +2865,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in ## codersdk.Experiment ```json -"moons" +"workspace_actions" ``` ### Properties @@ -2874,7 +2874,6 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in | Value | | -------------------------- | -| `moons` | | `workspace_actions` | | `tailnet_pg_coordinator` | | `single_tailnet` | diff --git a/enterprise/cli/workspaceproxy_test.go b/enterprise/cli/workspaceproxy_test.go index df3c955af41c7..b4642f26a9a60 100644 --- a/enterprise/cli/workspaceproxy_test.go +++ b/enterprise/cli/workspaceproxy_test.go @@ -9,7 +9,6 @@ import ( "github.com/stretchr/testify/require" "github.com/coder/coder/v2/cli/clitest" - "github.com/coder/coder/v2/coderd/coderdtest" "github.com/coder/coder/v2/codersdk" "github.com/coder/coder/v2/enterprise/coderd/coderdenttest" "github.com/coder/coder/v2/enterprise/coderd/license" @@ -23,16 +22,7 @@ func Test_ProxyCRUD(t *testing.T) { t.Run("Create", func(t *testing.T) { t.Parallel() - dv := coderdtest.DeploymentValues(t) - dv.Experiments = []string{ - string(codersdk.ExperimentMoons), - "*", - } - client, _ := coderdenttest.New(t, &coderdenttest.Options{ - Options: &coderdtest.Options{ - DeploymentValues: dv, - }, LicenseOptions: &coderdenttest.LicenseOptions{ Features: license.Features{ codersdk.FeatureWorkspaceProxy: 1, @@ -94,17 +84,7 @@ func Test_ProxyCRUD(t *testing.T) { t.Run("Delete", func(t *testing.T) { t.Parallel() - - dv := coderdtest.DeploymentValues(t) - dv.Experiments = []string{ - string(codersdk.ExperimentMoons), - "*", - } - client, _ := coderdenttest.New(t, &coderdenttest.Options{ - Options: &coderdtest.Options{ - DeploymentValues: dv, - }, LicenseOptions: &coderdenttest.LicenseOptions{ Features: license.Features{ codersdk.FeatureWorkspaceProxy: 1, diff --git a/enterprise/coderd/coderd.go b/enterprise/coderd/coderd.go index d7d2705d4b33f..2d409d9991d83 100644 --- a/enterprise/coderd/coderd.go +++ b/enterprise/coderd/coderd.go @@ -362,34 +362,33 @@ func New(ctx context.Context, options *Options) (_ *API, err error) { } api.derpMesh = derpmesh.New(options.Logger.Named("derpmesh"), api.DERPServer, meshTLSConfig) - if api.AGPL.Experiments.Enabled(codersdk.ExperimentMoons) { - // Proxy health is a moon feature. - api.ProxyHealth, err = proxyhealth.New(&proxyhealth.Options{ - Interval: options.ProxyHealthInterval, - DB: api.Database, - Logger: options.Logger.Named("proxyhealth"), - Client: api.HTTPClient, - Prometheus: api.PrometheusRegistry, - }) - if err != nil { - return nil, xerrors.Errorf("initialize proxy health: %w", err) - } - go api.ProxyHealth.Run(ctx) - // Force the initial loading of the cache. Do this in a go routine in case - // the calls to the workspace proxies hang and this takes some time. - go api.forceWorkspaceProxyHealthUpdate(ctx) - - // Use proxy health to return the healthy workspace proxy hostnames. - f := api.ProxyHealth.ProxyHosts - api.AGPL.WorkspaceProxyHostsFn.Store(&f) - - // Wire this up to healthcheck. - var fetchUpdater healthcheck.WorkspaceProxiesFetchUpdater = &workspaceProxiesFetchUpdater{ - fetchFunc: api.fetchWorkspaceProxies, - updateFunc: api.ProxyHealth.ForceUpdate, - } - api.AGPL.WorkspaceProxiesFetchUpdater.Store(&fetchUpdater) + // Moon feature init. Proxyhealh is a go routine to periodically check + // the health of all workspace proxies. + api.ProxyHealth, err = proxyhealth.New(&proxyhealth.Options{ + Interval: options.ProxyHealthInterval, + DB: api.Database, + Logger: options.Logger.Named("proxyhealth"), + Client: api.HTTPClient, + Prometheus: api.PrometheusRegistry, + }) + if err != nil { + return nil, xerrors.Errorf("initialize proxy health: %w", err) + } + go api.ProxyHealth.Run(ctx) + // Force the initial loading of the cache. Do this in a go routine in case + // the calls to the workspace proxies hang and this takes some time. + go api.forceWorkspaceProxyHealthUpdate(ctx) + + // Use proxy health to return the healthy workspace proxy hostnames. + f := api.ProxyHealth.ProxyHosts + api.AGPL.WorkspaceProxyHostsFn.Store(&f) + + // Wire this up to healthcheck. + var fetchUpdater healthcheck.WorkspaceProxiesFetchUpdater = &workspaceProxiesFetchUpdater{ + fetchFunc: api.fetchWorkspaceProxies, + updateFunc: api.ProxyHealth.ForceUpdate, } + api.AGPL.WorkspaceProxiesFetchUpdater.Store(&fetchUpdater) err = api.PrometheusRegistry.Register(&api.licenseMetricsCollector) if err != nil { diff --git a/enterprise/coderd/templates.go b/enterprise/coderd/templates.go index 4e7e0c669dfd6..00b914046b66f 100644 --- a/enterprise/coderd/templates.go +++ b/enterprise/coderd/templates.go @@ -344,12 +344,6 @@ func (api *API) templateRBACEnabledMW(next http.Handler) http.Handler { func (api *API) moonsEnabledMW(next http.Handler) http.Handler { return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { - // The experiment must be enabled. - if !api.AGPL.Experiments.Enabled(codersdk.ExperimentMoons) { - httpapi.RouteNotFound(rw) - return - } - // Entitlement must be enabled. api.entitlementsMu.RLock() proxy := api.entitlements.Features[codersdk.FeatureWorkspaceProxy].Enabled diff --git a/enterprise/coderd/workspaceproxy_test.go b/enterprise/coderd/workspaceproxy_test.go index ac29659f20f91..310e8bef96dec 100644 --- a/enterprise/coderd/workspaceproxy_test.go +++ b/enterprise/coderd/workspaceproxy_test.go @@ -36,20 +36,13 @@ func TestRegions(t *testing.T) { t.Run("OK", func(t *testing.T) { t.Parallel() - dv := coderdtest.DeploymentValues(t) - dv.Experiments = []string{ - string(codersdk.ExperimentMoons), - "*", - } - db, pubsub := dbtestutil.NewDB(t) client, _ := coderdenttest.New(t, &coderdenttest.Options{ Options: &coderdtest.Options{ - AppHostname: appHostname, - Database: db, - Pubsub: pubsub, - DeploymentValues: dv, + AppHostname: appHostname, + Database: db, + Pubsub: pubsub, }, }) @@ -79,20 +72,13 @@ func TestRegions(t *testing.T) { t.Run("WithProxies", func(t *testing.T) { t.Parallel() - dv := coderdtest.DeploymentValues(t) - dv.Experiments = []string{ - string(codersdk.ExperimentMoons), - "*", - } - db, pubsub := dbtestutil.NewDB(t) client, closer, api, _ := coderdenttest.NewWithAPI(t, &coderdenttest.Options{ Options: &coderdtest.Options{ - AppHostname: appHostname, - Database: db, - Pubsub: pubsub, - DeploymentValues: dv, + AppHostname: appHostname, + Database: db, + Pubsub: pubsub, }, LicenseOptions: &coderdenttest.LicenseOptions{ Features: license.Features{ @@ -173,17 +159,10 @@ func TestRegions(t *testing.T) { t.Run("RequireAuth", func(t *testing.T) { t.Parallel() - dv := coderdtest.DeploymentValues(t) - dv.Experiments = []string{ - string(codersdk.ExperimentMoons), - "*", - } - ctx := testutil.Context(t, testutil.WaitLong) client, _ := coderdenttest.New(t, &coderdenttest.Options{ Options: &coderdtest.Options{ - AppHostname: appHostname, - DeploymentValues: dv, + AppHostname: appHostname, }, }) @@ -200,15 +179,7 @@ func TestWorkspaceProxyCRUD(t *testing.T) { t.Run("CreateAndUpdate", func(t *testing.T) { t.Parallel() - dv := coderdtest.DeploymentValues(t) - dv.Experiments = []string{ - string(codersdk.ExperimentMoons), - "*", - } client, _ := coderdenttest.New(t, &coderdenttest.Options{ - Options: &coderdtest.Options{ - DeploymentValues: dv, - }, LicenseOptions: &coderdenttest.LicenseOptions{ Features: license.Features{ codersdk.FeatureWorkspaceProxy: 1, @@ -251,15 +222,7 @@ func TestWorkspaceProxyCRUD(t *testing.T) { t.Run("Delete", func(t *testing.T) { t.Parallel() - dv := coderdtest.DeploymentValues(t) - dv.Experiments = []string{ - string(codersdk.ExperimentMoons), - "*", - } client, _ := coderdenttest.New(t, &coderdenttest.Options{ - Options: &coderdtest.Options{ - DeploymentValues: dv, - }, LicenseOptions: &coderdenttest.LicenseOptions{ Features: license.Features{ codersdk.FeatureWorkspaceProxy: 1, @@ -287,16 +250,9 @@ func TestProxyRegisterDeregister(t *testing.T) { t.Parallel() setup := func(t *testing.T) (*codersdk.Client, database.Store) { - dv := coderdtest.DeploymentValues(t) - dv.Experiments = []string{ - string(codersdk.ExperimentMoons), - "*", - } - db, pubsub := dbtestutil.NewDB(t) client, _ := coderdenttest.New(t, &coderdenttest.Options{ Options: &coderdtest.Options{ - DeploymentValues: dv, Database: db, Pubsub: pubsub, IncludeProvisionerDaemon: true, @@ -635,16 +591,9 @@ func TestProxyRegisterDeregister(t *testing.T) { func TestIssueSignedAppToken(t *testing.T) { t.Parallel() - dv := coderdtest.DeploymentValues(t) - dv.Experiments = []string{ - string(codersdk.ExperimentMoons), - "*", - } - db, pubsub := dbtestutil.NewDB(t) client, user := coderdenttest.New(t, &coderdenttest.Options{ Options: &coderdtest.Options{ - DeploymentValues: dv, Database: db, Pubsub: pubsub, IncludeProvisionerDaemon: true, @@ -732,16 +681,9 @@ func TestIssueSignedAppToken(t *testing.T) { func TestReconnectingPTYSignedToken(t *testing.T) { t.Parallel() - dv := coderdtest.DeploymentValues(t) - dv.Experiments = []string{ - string(codersdk.ExperimentMoons), - "*", - } - db, pubsub := dbtestutil.NewDB(t) client, closer, api, user := coderdenttest.NewWithAPI(t, &coderdenttest.Options{ Options: &coderdtest.Options{ - DeploymentValues: dv, Database: db, Pubsub: pubsub, IncludeProvisionerDaemon: true, diff --git a/enterprise/coderd/workspaceproxycoordinator_test.go b/enterprise/coderd/workspaceproxycoordinator_test.go index 6e3ddd7e5526b..83bbb5c49d1fa 100644 --- a/enterprise/coderd/workspaceproxycoordinator_test.go +++ b/enterprise/coderd/workspaceproxycoordinator_test.go @@ -31,12 +31,6 @@ func Test_agentIsLegacy(t *testing.T) { t.Run("Legacy", func(t *testing.T) { t.Parallel() - dv := coderdtest.DeploymentValues(t) - dv.Experiments = []string{ - string(codersdk.ExperimentMoons), - "*", - } - var ( ctx, cancel = context.WithTimeout(context.Background(), testutil.WaitShort) db, pubsub = dbtestutil.NewDB(t) @@ -44,10 +38,9 @@ func Test_agentIsLegacy(t *testing.T) { coordinator = agpl.NewCoordinator(logger) client, _ = coderdenttest.New(t, &coderdenttest.Options{ Options: &coderdtest.Options{ - Database: db, - Pubsub: pubsub, - DeploymentValues: dv, - Coordinator: coordinator, + Database: db, + Pubsub: pubsub, + Coordinator: coordinator, }, LicenseOptions: &coderdenttest.LicenseOptions{ Features: license.Features{ @@ -98,12 +91,6 @@ func Test_agentIsLegacy(t *testing.T) { t.Run("NotLegacy", func(t *testing.T) { t.Parallel() - dv := coderdtest.DeploymentValues(t) - dv.Experiments = []string{ - string(codersdk.ExperimentMoons), - "*", - } - var ( ctx, cancel = context.WithTimeout(context.Background(), testutil.WaitShort) db, pubsub = dbtestutil.NewDB(t) @@ -111,10 +98,9 @@ func Test_agentIsLegacy(t *testing.T) { coordinator = agpl.NewCoordinator(logger) client, _ = coderdenttest.New(t, &coderdenttest.Options{ Options: &coderdtest.Options{ - Database: db, - Pubsub: pubsub, - DeploymentValues: dv, - Coordinator: coordinator, + Database: db, + Pubsub: pubsub, + Coordinator: coordinator, }, LicenseOptions: &coderdenttest.LicenseOptions{ Features: license.Features{ diff --git a/enterprise/wsproxy/wsproxy_test.go b/enterprise/wsproxy/wsproxy_test.go index 173fb3df4edff..e80d8b1cabf12 100644 --- a/enterprise/wsproxy/wsproxy_test.go +++ b/enterprise/wsproxy/wsproxy_test.go @@ -34,7 +34,6 @@ func TestDERPOnly(t *testing.T) { deploymentValues := coderdtest.DeploymentValues(t) deploymentValues.Experiments = []string{ - string(codersdk.ExperimentMoons), "*", } @@ -82,7 +81,6 @@ func TestDERP(t *testing.T) { deploymentValues := coderdtest.DeploymentValues(t) deploymentValues.Experiments = []string{ - string(codersdk.ExperimentMoons), "*", } @@ -315,7 +313,6 @@ func TestDERPEndToEnd(t *testing.T) { deploymentValues := coderdtest.DeploymentValues(t) deploymentValues.Experiments = []string{ - string(codersdk.ExperimentMoons), "*", } @@ -443,7 +440,6 @@ func TestWorkspaceProxyWorkspaceApps_Wsconncache(t *testing.T) { deploymentValues.Dangerous.AllowPathAppSharing = clibase.Bool(opts.DangerousAllowPathAppSharing) deploymentValues.Dangerous.AllowPathAppSiteOwnerAccess = clibase.Bool(opts.DangerousAllowPathAppSiteOwnerAccess) deploymentValues.Experiments = []string{ - string(codersdk.ExperimentMoons), "*", } @@ -501,7 +497,6 @@ func TestWorkspaceProxyWorkspaceApps_SingleTailnet(t *testing.T) { deploymentValues.Dangerous.AllowPathAppSharing = clibase.Bool(opts.DangerousAllowPathAppSharing) deploymentValues.Dangerous.AllowPathAppSiteOwnerAccess = clibase.Bool(opts.DangerousAllowPathAppSiteOwnerAccess) deploymentValues.Experiments = []string{ - string(codersdk.ExperimentMoons), string(codersdk.ExperimentSingleTailnet), "*", } diff --git a/site/src/api/typesGenerated.ts b/site/src/api/typesGenerated.ts index 53b3eb90672c3..d073ef2037fa8 100644 --- a/site/src/api/typesGenerated.ts +++ b/site/src/api/typesGenerated.ts @@ -1778,14 +1778,12 @@ export const Entitlements: Entitlement[] = [ // From codersdk/deployment.go export type Experiment = | "deployment_health_page" - | "moons" | "single_tailnet" | "tailnet_pg_coordinator" | "template_update_policies" | "workspace_actions"; export const Experiments: Experiment[] = [ "deployment_health_page", - "moons", "single_tailnet", "tailnet_pg_coordinator", "template_update_policies", diff --git a/site/src/components/Dashboard/Navbar/Navbar.tsx b/site/src/components/Dashboard/Navbar/Navbar.tsx index ea376cd74d6e5..3e66d60b3d556 100644 --- a/site/src/components/Dashboard/Navbar/Navbar.tsx +++ b/site/src/components/Dashboard/Navbar/Navbar.tsx @@ -34,9 +34,7 @@ export const Navbar: FC = () => { canViewDeployment={canViewDeployment} canViewAllUsers={canViewAllUsers} canViewHealth={canViewHealth} - proxyContextValue={ - dashboard.experiments.includes("moons") ? proxyContextValue : undefined - } + proxyContextValue={proxyContextValue} /> ); }; diff --git a/site/src/components/DeploySettingsLayout/Sidebar.tsx b/site/src/components/DeploySettingsLayout/Sidebar.tsx index 1566d1e27bba5..db024ee8be0c3 100644 --- a/site/src/components/DeploySettingsLayout/Sidebar.tsx +++ b/site/src/components/DeploySettingsLayout/Sidebar.tsx @@ -38,11 +38,9 @@ export const Sidebar: FC = () => { Network - {dashboard.experiments.includes("moons") && ( - - Workspace Proxies - - )} + + Workspace Proxies + Security diff --git a/site/src/components/DeploySettingsLayout/optionValue.test.ts b/site/src/components/DeploySettingsLayout/optionValue.test.ts index d1cac8de19547..73a17e4bc4950 100644 --- a/site/src/components/DeploySettingsLayout/optionValue.test.ts +++ b/site/src/components/DeploySettingsLayout/optionValue.test.ts @@ -94,13 +94,12 @@ describe("optionValue", () => { option: { ...defaultOption, name: "Experiments", - value: ["moons"], + value: [], }, additionalValues: ["single_tailnet", "deployment_health_page"], expected: { single_tailnet: false, deployment_health_page: false, - moons: true, }, }, { @@ -116,10 +115,10 @@ describe("optionValue", () => { option: { ...defaultOption, name: "Experiments", - value: ["*", "moons", "single_tailnet"], + value: ["*", "single_tailnet"], }, additionalValues: ["single_tailnet"], - expected: { moons: true, single_tailnet: true }, + expected: { single_tailnet: true }, }, { option: { diff --git a/site/src/contexts/ProxyContext.tsx b/site/src/contexts/ProxyContext.tsx index 7992cb8bafc2e..c661a1bc7c5db 100644 --- a/site/src/contexts/ProxyContext.tsx +++ b/site/src/contexts/ProxyContext.tsx @@ -1,7 +1,6 @@ import { useQuery } from "react-query"; import { getWorkspaceProxies, getWorkspaceProxyRegions } from "api/api"; import { Region, WorkspaceProxy } from "api/typesGenerated"; -import { useDashboard } from "components/Dashboard/DashboardProvider"; import { createContext, FC, @@ -85,9 +84,6 @@ export const ProxyContext = createContext( * ProxyProvider interacts with local storage to indicate the preferred workspace proxy. */ export const ProxyProvider: FC = ({ children }) => { - const dashboard = useDashboard(); - const experimentEnabled = dashboard?.experiments.includes("moons"); - // Using a useState so the caller always has the latest user saved // proxy. const [userSavedProxy, setUserSavedProxy] = useState(loadUserSelectedProxy()); @@ -176,13 +172,7 @@ export const ProxyProvider: FC = ({ children }) => { proxyLatencies, refetchProxyLatencies, userProxy: userSavedProxy, - proxy: experimentEnabled - ? proxy - : { - // If the experiment is disabled, then call 'getPreferredProxy' with the regions from - // the api call. The default behavior is to use the `primary` proxy. - ...getPreferredProxy(proxiesResp || []), - }, + proxy: proxy, proxies: proxiesResp, isLoading: proxiesLoading, isFetched: proxiesFetched, diff --git a/site/src/pages/HealthPage/HealthLayout.tsx b/site/src/pages/HealthPage/HealthLayout.tsx index 448de1665f4a3..652ba8d95c893 100644 --- a/site/src/pages/HealthPage/HealthLayout.tsx +++ b/site/src/pages/HealthPage/HealthLayout.tsx @@ -17,11 +17,9 @@ import { Suspense } from "react"; import { HealthIcon } from "./Content"; import { HealthSeverity } from "api/typesGenerated"; import NotificationsOffOutlined from "@mui/icons-material/NotificationsOffOutlined"; -import { useDashboard } from "components/Dashboard/DashboardProvider"; export function HealthLayout() { const theme = useTheme(); - const dashboard = useDashboard(); const queryClient = useQueryClient(); const { data: healthStatus } = useQuery({ ...health(), @@ -35,9 +33,7 @@ export function HealthLayout() { access_url: "Access URL", websocket: "Websocket", database: "Database", - workspace_proxy: dashboard.experiments.includes("moons") - ? "Workspace Proxy" - : undefined, + workspace_proxy: "Workspace Proxy", } as const; const visibleSections = filterVisibleSections(sections); diff --git a/site/src/pages/TerminalPage/TerminalPage.tsx b/site/src/pages/TerminalPage/TerminalPage.tsx index e15a081492741..7130abfa57219 100644 --- a/site/src/pages/TerminalPage/TerminalPage.tsx +++ b/site/src/pages/TerminalPage/TerminalPage.tsx @@ -13,7 +13,6 @@ import "xterm/css/xterm.css"; import { MONOSPACE_FONT_FAMILY } from "theme/constants"; import { pageTitle } from "utils/page"; import { useProxy } from "contexts/ProxyContext"; -import { useDashboard } from "components/Dashboard/DashboardProvider"; import type { Region } from "api/typesGenerated"; import { getLatencyColor } from "utils/latency"; import { ProxyStatusLatency } from "components/ProxyStatusLatency/ProxyStatusLatency"; @@ -67,7 +66,6 @@ const TerminalPage: FC = () => { const workspaceAgent = workspace.data ? getMatchingAgentOrFirst(workspace.data, workspaceNameParts?.[1]) : undefined; - const dashboard = useDashboard(); const selectedProxy = proxy.proxy; const latency = selectedProxy ? proxyLatencies[selectedProxy.id] : undefined; @@ -312,11 +310,9 @@ const TerminalPage: FC = () => { prevLifecycleState.current === "starting" && } {terminalState === "disconnected" && }
- {dashboard.experiments.includes("moons") && - selectedProxy && - latency && ( - - )} + {selectedProxy && latency && ( + + )}
); diff --git a/site/src/testHelpers/entities.ts b/site/src/testHelpers/entities.ts index 743dcd57b7f12..592f74baa02ce 100644 --- a/site/src/testHelpers/entities.ts +++ b/site/src/testHelpers/entities.ts @@ -2045,7 +2045,9 @@ export const MockEntitlementsWithUserLimit: TypesGen.Entitlements = { }), }; -export const MockExperiments: TypesGen.Experiment[] = ["moons"]; +export const MockExperiments: TypesGen.Experiment[] = [ + "tailnet_pg_coordinator", +]; export const MockAuditLog: TypesGen.AuditLog = { id: "fbd2116a-8961-4954-87ae-e4575bd29ce0",