Skip to content

Commit eb4826a

Browse files
authored
chore: remove workspace_actions experiment (#10030)
1 parent 3c87c4d commit eb4826a

File tree

22 files changed

+35
-130
lines changed

22 files changed

+35
-130
lines changed

cli/templatecreate.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,6 @@ func (r *RootCmd) templateCreate() *clibase.Cmd {
4747
),
4848
Handler: func(inv *clibase.Invocation) error {
4949
if failureTTL != 0 || inactivityTTL != 0 || maxTTL != 0 {
50-
// This call can be removed when workspace_actions is no longer experimental
51-
experiments, exErr := client.Experiments(inv.Context())
52-
if exErr != nil {
53-
return xerrors.Errorf("get experiments: %w", exErr)
54-
}
55-
56-
if !experiments.Enabled(codersdk.ExperimentWorkspaceActions) {
57-
return xerrors.Errorf("--failure-ttl and --inactivityTTL are experimental features. Use the workspace_actions CODER_EXPERIMENTS flag to set these configuration values.")
58-
}
59-
6050
entitlements, err := client.Entitlements(inv.Context())
6151
var sdkErr *codersdk.Error
6252
if xerrors.As(err, &sdkErr) && sdkErr.StatusCode() == http.StatusNotFound {

cli/templateedit.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,6 @@ func (r *RootCmd) templateEdit() *clibase.Cmd {
4141
),
4242
Short: "Edit the metadata of a template by name.",
4343
Handler: func(inv *clibase.Invocation) error {
44-
// This clause can be removed when workspace_actions is no longer experimental
45-
if failureTTL != 0 || inactivityTTL != 0 {
46-
experiments, exErr := client.Experiments(inv.Context())
47-
if exErr != nil {
48-
return xerrors.Errorf("get experiments: %w", exErr)
49-
}
50-
51-
if !experiments.Enabled(codersdk.ExperimentWorkspaceActions) {
52-
return xerrors.Errorf("--failure-ttl and --inactivityTTL are experimental features. Use the workspace_actions CODER_EXPERIMENTS flag to set these configuration values.")
53-
}
54-
}
55-
5644
unsetAutostopRequirementDaysOfWeek := len(autostopRequirementDaysOfWeek) == 1 && autostopRequirementDaysOfWeek[0] == "none"
5745
requiresEntitlement := (len(autostopRequirementDaysOfWeek) > 0 && !unsetAutostopRequirementDaysOfWeek) ||
5846
autostopRequirementWeeks > 0 ||

coderd/apidoc/docs.go

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codersdk/deployment.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,9 +1958,6 @@ const (
19581958
// feature is not yet complete in functionality.
19591959
ExperimentMoons Experiment = "moons"
19601960

1961-
// https://github.com/coder/coder/milestone/19
1962-
ExperimentWorkspaceActions Experiment = "workspace_actions"
1963-
19641961
// ExperimentTailnetPGCoordinator enables the PGCoord in favor of the pubsub-
19651962
// only Coordinator
19661963
ExperimentTailnetPGCoordinator Experiment = "tailnet_pg_coordinator"

docs/api/schemas.md

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/api/typesGenerated.ts

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/components/Dashboard/DashboardProvider.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,3 @@ export const useDashboard = (): DashboardProviderValue => {
110110

111111
return context;
112112
};
113-
114-
export const useIsWorkspaceActionsEnabled = (): boolean => {
115-
const { entitlements, experiments } = useDashboard();
116-
const allowAdvancedScheduling =
117-
entitlements.features["advanced_template_scheduling"].enabled;
118-
// This check can be removed when https://github.com/coder/coder/milestone/19
119-
// is merged up
120-
const allowWorkspaceActions = experiments.includes("workspace_actions");
121-
return allowWorkspaceActions && allowAdvancedScheduling;
122-
};

site/src/components/WorkspaceDeletion/DormantDeletionStat.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,11 @@ interface DormantDeletionStatProps {
1414
export const DormantDeletionStat: FC<DormantDeletionStatProps> = ({
1515
workspace,
1616
}) => {
17-
const { entitlements, experiments } = useDashboard();
17+
const { entitlements } = useDashboard();
1818
const allowAdvancedScheduling =
1919
entitlements.features["advanced_template_scheduling"].enabled;
20-
// This check can be removed when https://github.com/coder/coder/milestone/19
21-
// is merged up
22-
const allowWorkspaceActions = experiments.includes("workspace_actions");
2320

24-
if (
25-
!displayDormantDeletion(
26-
workspace,
27-
allowAdvancedScheduling,
28-
allowWorkspaceActions,
29-
)
30-
) {
21+
if (!displayDormantDeletion(workspace, allowAdvancedScheduling)) {
3122
return null;
3223
}
3324

site/src/components/WorkspaceDeletion/DormantDeletionText.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,11 @@ export const DormantDeletionText = ({
99
}: {
1010
workspace: Workspace;
1111
}): JSX.Element | null => {
12-
const { entitlements, experiments } = useDashboard();
12+
const { entitlements } = useDashboard();
1313
const allowAdvancedScheduling =
1414
entitlements.features["advanced_template_scheduling"].enabled;
15-
// This check can be removed when https://github.com/coder/coder/milestone/19
16-
// is merged up
17-
const allowWorkspaceActions = experiments.includes("workspace_actions");
1815

19-
if (
20-
!displayDormantDeletion(
21-
workspace,
22-
allowAdvancedScheduling,
23-
allowWorkspaceActions,
24-
)
25-
) {
16+
if (!displayDormantDeletion(workspace, allowAdvancedScheduling)) {
2617
return null;
2718
}
2819
return <StyledSpan role="status">Impending deletion</StyledSpan>;

0 commit comments

Comments
 (0)