Skip to content

Commit e71b5b2

Browse files
committed
feat(site): remove experiment deployment_health_page
1 parent d708ac7 commit e71b5b2

File tree

11 files changed

+28
-42
lines changed

11 files changed

+28
-42
lines changed

coderd/apidoc/docs.go

+5-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

+5-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codersdk/deployment.go

+2-7
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-
20832080
// Add new experiments here!
2084-
// ExperimentExample Experiment = "example"
2081+
ExperimentExample Experiment = "example" // This isn't used for anything.
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.

docs/api/general.md

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/schemas.md

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/api/typesGenerated.ts

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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-8
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,13 @@ import VpnKeyOutlined from "@mui/icons-material/VpnKeyOutlined";
99
import MonitorHeartOutlined from "@mui/icons-material/MonitorHeartOutlined";
1010
// import Token from "@mui/icons-material/Token";
1111
import { type FC } from "react";
12-
import { useDashboard } from "components/Dashboard/DashboardProvider";
1312
import { GitIcon } from "components/Icons/GitIcon";
1413
import {
1514
Sidebar as BaseSidebar,
1615
SidebarNavItem,
1716
} from "components/Sidebar/Sidebar";
1817

1918
export const Sidebar: FC = () => {
20-
const dashboard = useDashboard();
21-
2219
return (
2320
<BaseSidebar>
2421
<SidebarNavItem href="general" icon={LaunchOutlined}>
@@ -52,11 +49,9 @@ export const Sidebar: FC = () => {
5249
<SidebarNavItem href="observability" icon={InsertChartIcon}>
5350
Observability
5451
</SidebarNavItem>
55-
{dashboard.experiments.includes("deployment_health_page") && (
56-
<SidebarNavItem href="/health" icon={MonitorHeartOutlined}>
57-
Health
58-
</SidebarNavItem>
59-
)}
52+
<SidebarNavItem href="/health" icon={MonitorHeartOutlined}>
53+
Health
54+
</SidebarNavItem>
6055
</BaseSidebar>
6156
);
6257
};

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)