Skip to content

feat: add inactivity cleanup and failure cleanup configuration fields to Template Schedule Form #7402

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 24 commits into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
744e476
added workspace actions entitlement
Kira-Pilot May 1, 2023
e6e1ec6
added workspace actions experiment
Kira-Pilot May 1, 2023
c049e9e
added new route for template enterprise meta
Kira-Pilot May 3, 2023
537ced7
removing new route; repurposing old
Kira-Pilot May 3, 2023
cd6a485
add new fields to get endpoints
Kira-Pilot May 3, 2023
6c984fa
Merge remote-tracking branch 'origin/main' into workspace-actions-tem…
Kira-Pilot May 3, 2023
57a9de7
removed workspace actions experiment
Kira-Pilot May 3, 2023
07cb07c
added logic to enterprise template store
Kira-Pilot May 3, 2023
7091fc1
added new form fields
Kira-Pilot May 3, 2023
e565225
feature flagged new fields
Kira-Pilot May 3, 2023
3d9f6f5
fix validation
Kira-Pilot May 4, 2023
abab4c8
fixed submit btn
Kira-Pilot May 4, 2023
ad37203
Merge remote-tracking branch 'origin/main' into workspace-actions-tem…
Kira-Pilot May 4, 2023
240f297
fix tests
Kira-Pilot May 4, 2023
be512ee
changed ttl defaults
Kira-Pilot May 4, 2023
8536b75
added FE tests
Kira-Pilot May 4, 2023
a05eb6c
added BE tests
Kira-Pilot May 4, 2023
0478e07
fixed lint
Kira-Pilot May 4, 2023
bba4722
adjusted comment language
Kira-Pilot May 4, 2023
c76a0f4
fixing unstaged changes check
Kira-Pilot May 4, 2023
9db6b13
fix test
Kira-Pilot May 4, 2023
a2a38f0
Merge branch 'main' into workspace-actions-template-route/kira-pilot
Kira-Pilot May 4, 2023
9fa9c5b
Update coderd/database/migrations/000122_add_template_cleanup_ttls.do…
Kira-Pilot May 5, 2023
43a2267
Update coderd/database/migrations/000122_add_template_cleanup_ttls.up…
Kira-Pilot May 5, 2023
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
Prev Previous commit
Next Next commit
removed workspace actions experiment
  • Loading branch information
Kira-Pilot committed May 3, 2023
commit 57a9de72c99788aec61d4b23be89938c2dca0de5
13 changes: 9 additions & 4 deletions coderd/apidoc/docs.go

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

11 changes: 9 additions & 2 deletions coderd/apidoc/swagger.json

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

5 changes: 0 additions & 5 deletions codersdk/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ const (
FeatureAppearance FeatureName = "appearance"
FeatureAdvancedTemplateScheduling FeatureName = "advanced_template_scheduling"
FeatureWorkspaceProxy FeatureName = "workspace_proxy"
FeatureWorkspaceActions FeatureName = "workspace_actions"
)

// FeatureNames must be kept in-sync with the Feature enum above.
Expand All @@ -62,7 +61,6 @@ var FeatureNames = []FeatureName{
FeatureAppearance,
FeatureAdvancedTemplateScheduling,
FeatureWorkspaceProxy,
FeatureWorkspaceActions,
}

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

// https://github.com/coder/coder/milestone/19
ExperimentWorkspaceActions Experiment = "workspace_actions"

// Add new experiments here!
// ExperimentExample Experiment = "example"
)
Expand Down
11 changes: 7 additions & 4 deletions docs/api/schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -2502,10 +2502,9 @@ CreateParameterRequest is a structure used to create a new parameter value for a

#### Enumerated Values

| Value |
| ------------------- |
| `moons` |
| `workspace_actions` |
| Value |
| ------- |
| `moons` |

## codersdk.Feature

Expand Down Expand Up @@ -3866,8 +3865,10 @@ Parameter represents a set value for the scope.
"default_ttl_ms": 0,
"description": "string",
"display_name": "string",
"failure_ttl_ms": 0,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"inactivity_ttl_ms": 0,
"max_ttl_ms": 0,
"name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
Expand All @@ -3892,8 +3893,10 @@ Parameter represents a set value for the scope.
| `default_ttl_ms` | integer | false | | |
| `description` | string | false | | |
| `display_name` | string | false | | |
| `failure_ttl_ms` | integer | false | | Failure ttl ms and InactivityTTLMillis are enterprise-only. Their values are used if your license is entitled to use the workspace actions feature |
| `icon` | string | false | | |
| `id` | string | false | | |
| `inactivity_ttl_ms` | integer | false | | |
| `max_ttl_ms` | integer | false | | Max ttl ms is an enterprise feature. It's value is only used if your license is entitled to use the advanced template scheduling feature. |
| `name` | string | false | | |
| `organization_id` | string | false | | |
Expand Down
12 changes: 12 additions & 0 deletions docs/api/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templat
"default_ttl_ms": 0,
"description": "string",
"display_name": "string",
"failure_ttl_ms": 0,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"inactivity_ttl_ms": 0,
"max_ttl_ms": 0,
"name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
Expand Down Expand Up @@ -86,8 +88,10 @@ Status Code **200**
| `» default_ttl_ms` | integer | false | | |
| `» description` | string | false | | |
| `» display_name` | string | false | | |
| `» failure_ttl_ms` | integer | false | | Failure ttl ms and InactivityTTLMillis are enterprise-only. Their values are used if your license is entitled to use the workspace actions feature |
| `» icon` | string | false | | |
| `» id` | string(uuid) | false | | |
| `» inactivity_ttl_ms` | integer | false | | |
| `» max_ttl_ms` | integer | false | | Max ttl ms is an enterprise feature. It's value is only used if your license is entitled to use the advanced template scheduling feature. |
| `» name` | string | false | | |
| `» organization_id` | string(uuid) | false | | |
Expand Down Expand Up @@ -176,8 +180,10 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/templa
"default_ttl_ms": 0,
"description": "string",
"display_name": "string",
"failure_ttl_ms": 0,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"inactivity_ttl_ms": 0,
"max_ttl_ms": 0,
"name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
Expand Down Expand Up @@ -301,8 +307,10 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templat
"default_ttl_ms": 0,
"description": "string",
"display_name": "string",
"failure_ttl_ms": 0,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"inactivity_ttl_ms": 0,
"max_ttl_ms": 0,
"name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
Expand Down Expand Up @@ -628,8 +636,10 @@ curl -X GET http://coder-server:8080/api/v2/templates/{template} \
"default_ttl_ms": 0,
"description": "string",
"display_name": "string",
"failure_ttl_ms": 0,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"inactivity_ttl_ms": 0,
"max_ttl_ms": 0,
"name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
Expand Down Expand Up @@ -736,8 +746,10 @@ curl -X PATCH http://coder-server:8080/api/v2/templates/{template} \
"default_ttl_ms": 0,
"description": "string",
"display_name": "string",
"failure_ttl_ms": 0,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"inactivity_ttl_ms": 0,
"max_ttl_ms": 0,
"name": "string",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
Expand Down
1 change: 0 additions & 1 deletion enterprise/coderd/coderd.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ func (api *API) updateEntitlements(ctx context.Context) error {
codersdk.FeatureExternalProvisionerDaemons: true,
codersdk.FeatureAdvancedTemplateScheduling: true,
codersdk.FeatureWorkspaceProxy: true,
codersdk.FeatureWorkspaceActions: true,
})
if err != nil {
return err
Expand Down
1 change: 0 additions & 1 deletion enterprise/coderd/coderd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ func TestEntitlements(t *testing.T) {
codersdk.FeatureExternalProvisionerDaemons: 1,
codersdk.FeatureAdvancedTemplateScheduling: 1,
codersdk.FeatureWorkspaceProxy: 1,
codersdk.FeatureWorkspaceActions: 1,
},
GraceAt: time.Now().Add(59 * 24 * time.Hour),
})
Expand Down
6 changes: 2 additions & 4 deletions site/src/api/typesGenerated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1365,8 +1365,8 @@ export const Entitlements: Entitlement[] = [
]

// From codersdk/deployment.go
export type Experiment = "moons" | "workspace_actions"
export const Experiments: Experiment[] = ["moons", "workspace_actions"]
export type Experiment = "moons"
export const Experiments: Experiment[] = ["moons"]

// From codersdk/deployment.go
export type FeatureName =
Expand All @@ -1380,7 +1380,6 @@ export type FeatureName =
| "scim"
| "template_rbac"
| "user_limit"
| "workspace_actions"
| "workspace_proxy"
export const FeatureNames: FeatureName[] = [
"advanced_template_scheduling",
Expand All @@ -1393,7 +1392,6 @@ export const FeatureNames: FeatureName[] = [
"scim",
"template_rbac",
"user_limit",
"workspace_actions",
"workspace_proxy",
]

Expand Down