Skip to content

Commit 1cac9eb

Browse files
committed
feat(site): remove experiment deployment_health_page
1 parent 8a12ee7 commit 1cac9eb

File tree

6 files changed

+11
-28
lines changed

6 files changed

+11
-28
lines changed

codersdk/deployment.go

+3-8
Original file line numberDiff line numberDiff line change
@@ -2077,20 +2077,15 @@ func (c *Client) BuildInfo(ctx context.Context) (BuildInfoResponse, error) {
20772077
type Experiment string
20782078

20792079
const (
2080-
// Deployment health page
2081-
ExperimentDeploymentHealthPage Experiment = "deployment_health_page"
2082-
2083-
// Add new experiments here!
2084-
// ExperimentExample Experiment = "example"
2080+
// Add new experiments here!
2081+
// ExperimentExample Experiment = "example"
20852082
)
20862083

20872084
// ExperimentsAll should include all experiments that are safe for
20882085
// users to opt-in to via --experimental='*'.
20892086
// Experiments that are not ready for consumption by all users should
20902087
// not be included here and will be essentially hidden.
2091-
var ExperimentsAll = Experiments{
2092-
ExperimentDeploymentHealthPage,
2093-
}
2088+
var ExperimentsAll = Experiments{}
20942089

20952090
// Experiments is a list of experiments.
20962091
// Multiple experiments may be enabled at the same time.

site/src/components/Dashboard/DeploymentBanner/DeploymentBanner.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,14 @@ import { useQuery } from "react-query";
33
import { deploymentStats } from "api/queries/deployment";
44
import { usePermissions } from "hooks/usePermissions";
55
import { DeploymentBannerView } from "./DeploymentBannerView";
6-
import { useDashboard } from "../DashboardProvider";
76
import { health } from "api/queries/debug";
87

98
export const DeploymentBanner: FC = () => {
10-
const dashboard = useDashboard();
119
const permissions = usePermissions();
1210
const deploymentStatsQuery = useQuery(deploymentStats());
1311
const healthQuery = useQuery({
1412
...health(),
15-
enabled:
16-
dashboard.experiments.includes("deployment_health_page") &&
17-
permissions.viewDeploymentValues,
13+
enabled: permissions.viewDeploymentValues,
1814
});
1915

2016
if (!permissions.viewDeploymentValues || !deploymentStatsQuery.data) {

site/src/components/Dashboard/Navbar/Navbar.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ export const Navbar: FC = () => {
1818
const canViewDeployment = Boolean(permissions.viewDeploymentValues);
1919
const canViewAllUsers = Boolean(permissions.readAllUsers);
2020
const proxyContextValue = useProxy();
21-
const dashboard = useDashboard();
22-
const canViewHealth =
23-
canViewDeployment &&
24-
dashboard.experiments.includes("deployment_health_page");
25-
21+
const canViewHealth = canViewDeployment;
2622
return (
2723
<NavbarView
2824
user={me}

site/src/components/DeploySettingsLayout/Sidebar.tsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,9 @@ export const Sidebar: FC = () => {
5252
<SidebarNavItem href="observability" icon={InsertChartIcon}>
5353
Observability
5454
</SidebarNavItem>
55-
{dashboard.experiments.includes("deployment_health_page") && (
56-
<SidebarNavItem href="/health" icon={MonitorHeartOutlined}>
57-
Health
58-
</SidebarNavItem>
59-
)}
55+
<SidebarNavItem href="/health" icon={MonitorHeartOutlined}>
56+
Health
57+
</SidebarNavItem>
6058
</BaseSidebar>
6159
);
6260
};

site/src/pages/DeploySettingsPage/GeneralSettingsPage/GeneralSettingsPageView.stories.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const meta: Meta<typeof GeneralSettingsPageView> = {
4040
},
4141
],
4242
deploymentDAUs: MockDeploymentDAUResponse,
43-
safeExperiments: ["deployment_health_page"],
43+
safeExperiments: [],
4444
},
4545
};
4646

@@ -102,6 +102,6 @@ export const allExperimentsEnabled: Story = {
102102
hidden: false,
103103
},
104104
],
105-
safeExperiments: ["deployment_health_page"],
105+
safeExperiments: [],
106106
},
107107
};

site/src/testHelpers/entities.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -2047,9 +2047,7 @@ export const MockEntitlementsWithUserLimit: TypesGen.Entitlements = {
20472047
}),
20482048
};
20492049

2050-
export const MockExperiments: TypesGen.Experiment[] = [
2051-
"deployment_health_page",
2052-
];
2050+
export const MockExperiments: TypesGen.Experiment[] = [];
20532051

20542052
export const MockAuditLog: TypesGen.AuditLog = {
20552053
id: "fbd2116a-8961-4954-87ae-e4575bd29ce0",

0 commit comments

Comments
 (0)