Skip to content

feat(site): remove experiment deployment_health_page #11572

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 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 5 additions & 2 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions codersdk/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -2076,20 +2076,15 @@ func (c *Client) BuildInfo(ctx context.Context) (BuildInfoResponse, error) {
type Experiment string

const (
// Deployment health page
ExperimentDeploymentHealthPage Experiment = "deployment_health_page"

// Add new experiments here!
// ExperimentExample Experiment = "example"
ExperimentExample Experiment = "example" // This isn't used for anything.
)

// ExperimentsAll should include all experiments that are safe for
// users to opt-in to via --experimental='*'.
// Experiments that are not ready for consumption by all users should
// not be included here and will be essentially hidden.
var ExperimentsAll = Experiments{
ExperimentDeploymentHealthPage,
}
var ExperimentsAll = Experiments{}

// Experiments is a list of experiments.
// Multiple experiments may be enabled at the same time.
Expand Down
4 changes: 2 additions & 2 deletions docs/api/general.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions docs/api/schemas.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions site/src/api/typesGenerated.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@ import { useQuery } from "react-query";
import { deploymentStats } from "api/queries/deployment";
import { usePermissions } from "hooks/usePermissions";
import { DeploymentBannerView } from "./DeploymentBannerView";
import { useDashboard } from "../DashboardProvider";
import { health } from "api/queries/debug";

export const DeploymentBanner: FC = () => {
const dashboard = useDashboard();
const permissions = usePermissions();
const deploymentStatsQuery = useQuery(deploymentStats());
const healthQuery = useQuery({
...health(),
enabled:
dashboard.experiments.includes("deployment_health_page") &&
permissions.viewDeploymentValues,
enabled: permissions.viewDeploymentValues,
});

if (!permissions.viewDeploymentValues || !deploymentStatsQuery.data) {
Expand Down
6 changes: 1 addition & 5 deletions site/src/components/Dashboard/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ export const Navbar: FC = () => {
const canViewDeployment = Boolean(permissions.viewDeploymentValues);
const canViewAllUsers = Boolean(permissions.readAllUsers);
const proxyContextValue = useProxy();
const dashboard = useDashboard();
const canViewHealth =
canViewDeployment &&
dashboard.experiments.includes("deployment_health_page");

const canViewHealth = canViewDeployment;
return (
<NavbarView
user={me}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const meta: Meta<typeof GeneralSettingsPageView> = {
},
],
deploymentDAUs: MockDeploymentDAUResponse,
safeExperiments: ["deployment_health_page"],
safeExperiments: [],
},
};

Expand Down Expand Up @@ -102,6 +102,6 @@ export const allExperimentsEnabled: Story = {
hidden: false,
},
],
safeExperiments: ["deployment_health_page"],
safeExperiments: [],
},
};
11 changes: 3 additions & 8 deletions site/src/pages/DeploySettingsPage/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@ import VpnKeyOutlined from "@mui/icons-material/VpnKeyOutlined";
import MonitorHeartOutlined from "@mui/icons-material/MonitorHeartOutlined";
// import Token from "@mui/icons-material/Token";
import { type FC } from "react";
import { useDashboard } from "components/Dashboard/DashboardProvider";
import { GitIcon } from "components/Icons/GitIcon";
import {
Sidebar as BaseSidebar,
SidebarNavItem,
} from "components/Sidebar/Sidebar";

export const Sidebar: FC = () => {
const dashboard = useDashboard();

return (
<BaseSidebar>
<SidebarNavItem href="general" icon={LaunchOutlined}>
Expand Down Expand Up @@ -52,11 +49,9 @@ export const Sidebar: FC = () => {
<SidebarNavItem href="observability" icon={InsertChartIcon}>
Observability
</SidebarNavItem>
{dashboard.experiments.includes("deployment_health_page") && (
<SidebarNavItem href="/health" icon={MonitorHeartOutlined}>
Health
</SidebarNavItem>
)}
<SidebarNavItem href="/health" icon={MonitorHeartOutlined}>
Health
</SidebarNavItem>
</BaseSidebar>
);
};
4 changes: 1 addition & 3 deletions site/src/testHelpers/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2047,9 +2047,7 @@ export const MockEntitlementsWithUserLimit: TypesGen.Entitlements = {
}),
};

export const MockExperiments: TypesGen.Experiment[] = [
"deployment_health_page",
];
export const MockExperiments: TypesGen.Experiment[] = [];

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