Skip to content

Commit 7b0bf6d

Browse files
committed
make gen
1 parent c2a5a87 commit 7b0bf6d

File tree

11 files changed

+21
-21
lines changed

11 files changed

+21
-21
lines changed

coderd/apidoc/docs.go

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

coderd/apidoc/swagger.json

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

coderd/database/dbauthz/dbauthz.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2221,9 +2221,9 @@ func (q *querier) InsertWorkspaceBuild(ctx context.Context, arg database.InsertW
22212221
return xerrors.Errorf("get template by id: %w", err)
22222222
}
22232223

2224-
// If the template requires the promoted version we need to check if
2224+
// If the template requires the active version we need to check if
22252225
// the user is a template admin. If they aren't and are attempting
2226-
// to use a non-promoted version then we must fail the request.
2226+
// to use a non-active version then we must fail the request.
22272227
if t.RequireActiveVersion {
22282228
if arg.TemplateVersionID != t.ActiveVersionID {
22292229
if err = q.authorizeContext(ctx, rbac.ActionUpdate, t); err != nil {

coderd/schedule/template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ type TemplateScheduleOptions struct {
120120
UpdateWorkspaceDormantAt bool `json:"update_workspace_dormant_at"`
121121
// RequireActiveVersion requires that a starting a workspace uses the active
122122
// version for a template.
123-
RequireActiveVersion bool `json:"require_promoted_version"`
123+
RequireActiveVersion bool `json:"require_active_version"`
124124
}
125125

126126
// TemplateScheduleStore provides an interface for retrieving template

codersdk/templates.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type Template struct {
5353

5454
// RequireActiveVersion mandates that workspaces are built with the active
5555
// template version.
56-
RequireActiveVersion bool `json:"require_promoted_version"`
56+
RequireActiveVersion bool `json:"require_active_version"`
5757
}
5858

5959
// WeekdaysToBitmap converts a list of weekdays to a bitmap in accordance with
@@ -217,9 +217,9 @@ type UpdateTemplateMeta struct {
217217
// deleted when updating the dormant_ttl field to a new, shorter value.
218218
UpdateWorkspaceDormantAt bool `json:"update_workspace_dormant_at"`
219219
// RequireActiveVersion mandates workspaces built using this template
220-
// use the latest promoted version of the template. This option has no
220+
// use the active version of the template. This option has no
221221
// effect on template admins.
222-
RequireActiveVersion bool `json:"require_promoted_version"`
222+
RequireActiveVersion bool `json:"require_active_version"`
223223
}
224224

225225
type TemplateExample struct {

docs/api/schemas.md

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

docs/api/templates.md

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

enterprise/coderd/templates_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ func TestTemplates(t *testing.T) {
490490
require.True(t, updatedDormantWS.LastUsedAt.After(dormantWorkspace.LastUsedAt))
491491
})
492492

493-
t.Run("RequirePromotedVersion", func(t *testing.T) {
493+
t.Run("RequireActiveVersion", func(t *testing.T) {
494494
t.Parallel()
495495
client, user := coderdenttest.New(t, &coderdenttest.Options{
496496
Options: &coderdtest.Options{

enterprise/coderd/workspaces_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ func TestWorkspaceAutobuild(t *testing.T) {
737737
require.Equal(t, database.WorkspaceTransitionDelete, stats.Transitions[ws.ID])
738738
})
739739

740-
t.Run("RequirePromotedVersion", func(t *testing.T) {
740+
t.Run("RequireActiveVersion", func(t *testing.T) {
741741
t.Parallel()
742742

743743
var (

site/src/api/typesGenerated.ts

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

site/src/testHelpers/entities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ export const MockTemplate: TypesGen.Template = {
455455
time_til_dormant_autodelete_ms: 0,
456456
allow_user_autostart: true,
457457
allow_user_autostop: true,
458-
require_promoted_version: false,
458+
require_active_version: false,
459459
};
460460

461461
export const MockTemplateVersionFiles: TemplateVersionFiles = {

0 commit comments

Comments
 (0)