Skip to content

Commit 2e9310b

Browse files
authored
chore: add workspace actions entitlement and experiment (coder#7361)
* added workspace actions entitlement * added workspace actions experiment
1 parent 5961cf9 commit 2e9310b

File tree

7 files changed

+21
-9
lines changed

7 files changed

+21
-9
lines changed

coderd/apidoc/docs.go

Lines changed: 4 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: 2 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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ const (
4646
FeatureAppearance FeatureName = "appearance"
4747
FeatureAdvancedTemplateScheduling FeatureName = "advanced_template_scheduling"
4848
FeatureWorkspaceProxy FeatureName = "workspace_proxy"
49+
FeatureWorkspaceActions FeatureName = "workspace_actions"
4950
)
5051

5152
// FeatureNames must be kept in-sync with the Feature enum above.
@@ -61,6 +62,7 @@ var FeatureNames = []FeatureName{
6162
FeatureAppearance,
6263
FeatureAdvancedTemplateScheduling,
6364
FeatureWorkspaceProxy,
65+
FeatureWorkspaceActions,
6466
}
6567

6668
// Humanize returns the feature name in a human-readable format.
@@ -1668,6 +1670,9 @@ const (
16681670
// feature is not yet complete in functionality.
16691671
ExperimentMoons Experiment = "moons"
16701672

1673+
// https://github.com/coder/coder/milestone/19
1674+
ExperimentWorkspaceActions Experiment = "workspace_actions"
1675+
16711676
// Add new experiments here!
16721677
// ExperimentExample Experiment = "example"
16731678
)

docs/api/schemas.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2502,9 +2502,10 @@ CreateParameterRequest is a structure used to create a new parameter value for a
25022502

25032503
#### Enumerated Values
25042504

2505-
| Value |
2506-
| ------- |
2507-
| `moons` |
2505+
| Value |
2506+
| ------------------- |
2507+
| `moons` |
2508+
| `workspace_actions` |
25082509

25092510
## codersdk.Feature
25102511

enterprise/coderd/coderd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ func (api *API) updateEntitlements(ctx context.Context) error {
326326
codersdk.FeatureExternalProvisionerDaemons: true,
327327
codersdk.FeatureAdvancedTemplateScheduling: true,
328328
codersdk.FeatureWorkspaceProxy: true,
329+
codersdk.FeatureWorkspaceActions: true,
329330
})
330331
if err != nil {
331332
return err

enterprise/coderd/coderd_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ func TestEntitlements(t *testing.T) {
5454
codersdk.FeatureExternalProvisionerDaemons: 1,
5555
codersdk.FeatureAdvancedTemplateScheduling: 1,
5656
codersdk.FeatureWorkspaceProxy: 1,
57+
codersdk.FeatureWorkspaceActions: 1,
5758
},
5859
GraceAt: time.Now().Add(59 * 24 * time.Hour),
5960
})

site/src/api/typesGenerated.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,8 +1361,8 @@ export const Entitlements: Entitlement[] = [
13611361
]
13621362

13631363
// From codersdk/deployment.go
1364-
export type Experiment = "moons"
1365-
export const Experiments: Experiment[] = ["moons"]
1364+
export type Experiment = "moons" | "workspace_actions"
1365+
export const Experiments: Experiment[] = ["moons", "workspace_actions"]
13661366

13671367
// From codersdk/deployment.go
13681368
export type FeatureName =
@@ -1376,6 +1376,7 @@ export type FeatureName =
13761376
| "scim"
13771377
| "template_rbac"
13781378
| "user_limit"
1379+
| "workspace_actions"
13791380
| "workspace_proxy"
13801381
export const FeatureNames: FeatureName[] = [
13811382
"advanced_template_scheduling",
@@ -1388,6 +1389,7 @@ export const FeatureNames: FeatureName[] = [
13881389
"scim",
13891390
"template_rbac",
13901391
"user_limit",
1392+
"workspace_actions",
13911393
"workspace_proxy",
13921394
]
13931395

0 commit comments

Comments
 (0)