Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 232fc7c

Browse files
committed
chore: rename prebuild references to "prebuilt workspace"
Signed-off-by: Danny Kopping <[email protected]>
1 parent d0f00ce commit 232fc7c

File tree

8 files changed

+201
-200
lines changed

8 files changed

+201
-200
lines changed

coderd/provisionerdserver/provisionerdserver.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ func (s *server) acquireProtoJob(ctx context.Context, job database.ProvisionerJo
646646
WorkspaceOwnerLoginType: string(owner.LoginType),
647647
WorkspaceOwnerRbacRoles: ownerRbacRoles,
648648
IsPrebuild: input.IsPrebuild,
649-
IsPrebuildClaim: input.IsPrebuildClaim,
649+
IsPrebuiltWorkspaceClaim: input.IsPrebuiltWorkspaceClaim,
650650
},
651651
LogLevel: input.LogLevel,
652652
},
@@ -2472,11 +2472,11 @@ type TemplateVersionImportJob struct {
24722472

24732473
// WorkspaceProvisionJob is the payload for the "workspace_provision" job type.
24742474
type WorkspaceProvisionJob struct {
2475-
WorkspaceBuildID uuid.UUID `json:"workspace_build_id"`
2476-
DryRun bool `json:"dry_run"`
2477-
IsPrebuild bool `json:"is_prebuild,omitempty"`
2478-
IsPrebuildClaim bool `json:"is_prebuild_claim,omitempty"`
2479-
LogLevel string `json:"log_level,omitempty"`
2475+
WorkspaceBuildID uuid.UUID `json:"workspace_build_id"`
2476+
DryRun bool `json:"dry_run"`
2477+
IsPrebuild bool `json:"is_prebuild,omitempty"`
2478+
IsPrebuiltWorkspaceClaim bool `json:"is_prebuilt_workspace_claim,omitempty"`
2479+
LogLevel string `json:"log_level,omitempty"`
24802480
}
24812481

24822482
// TemplateVersionDryRunJob is the payload for the "template_version_dry_run" job type.

coderd/workspaces.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ func createWorkspace(
713713
builder = builder.TemplateVersionPresetID(req.TemplateVersionPresetID)
714714
}
715715
if claimedWorkspace != nil {
716-
builder = builder.MarkPrebuildClaim()
716+
builder = builder.MarkPrebuiltWorkspaceClaim()
717717
}
718718

719719
if req.EnableDynamicParameters && api.Experiments.Enabled(codersdk.ExperimentDynamicParameters) {

coderd/wsbuilder/wsbuilder.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ type Builder struct {
7676
parameterValues *[]string
7777
templateVersionPresetParameterValues []database.TemplateVersionPresetParameter
7878

79-
prebuild, prebuildClaim bool
79+
prebuild, prebuiltWorkspaceClaim bool
8080

8181
verifyNoLegacyParametersOnce bool
8282
}
@@ -180,10 +180,10 @@ func (b Builder) MarkPrebuild() Builder {
180180
return b
181181
}
182182

183-
// MarkPrebuildClaim indicates that a prebuilt workspace is being claimed.
184-
func (b Builder) MarkPrebuildClaim() Builder {
183+
// MarkPrebuiltWorkspaceClaim indicates that a prebuilt workspace is being claimed.
184+
func (b Builder) MarkPrebuiltWorkspaceClaim() Builder {
185185
// nolint: revive
186-
b.prebuildClaim = true
186+
b.prebuiltWorkspaceClaim = true
187187
return b
188188
}
189189

@@ -323,10 +323,10 @@ func (b *Builder) buildTx(authFunc func(action policy.Action, object rbac.Object
323323

324324
workspaceBuildID := uuid.New()
325325
input, err := json.Marshal(provisionerdserver.WorkspaceProvisionJob{
326-
WorkspaceBuildID: workspaceBuildID,
327-
LogLevel: b.logLevel,
328-
IsPrebuild: b.prebuild,
329-
IsPrebuildClaim: b.prebuildClaim,
326+
WorkspaceBuildID: workspaceBuildID,
327+
LogLevel: b.logLevel,
328+
IsPrebuild: b.prebuild,
329+
IsPrebuiltWorkspaceClaim: b.prebuiltWorkspaceClaim,
330330
})
331331
if err != nil {
332332
return nil, nil, nil, BuildError{

provisioner/terraform/provision.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ func provisionEnv(
273273
if metadata.GetIsPrebuild() {
274274
env = append(env, provider.IsPrebuildEnvironmentVariable()+"=true")
275275
}
276-
if metadata.GetIsPrebuildClaim() {
276+
if metadata.GetIsPrebuiltWorkspaceClaim() {
277277
env = append(env, provider.IsPrebuildClaimEnvironmentVariable()+"=true")
278278
}
279279

provisioner/terraform/provision_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -995,8 +995,8 @@ func TestProvision(t *testing.T) {
995995
},
996996
Request: &proto.PlanRequest{
997997
Metadata: &proto.Metadata{
998-
IsPrebuild: true,
999-
IsPrebuildClaim: false,
998+
IsPrebuild: true,
999+
IsPrebuiltWorkspaceClaim: false,
10001000
},
10011001
},
10021002
Response: &proto.PlanComplete{
@@ -1034,8 +1034,8 @@ func TestProvision(t *testing.T) {
10341034
},
10351035
Request: &proto.PlanRequest{
10361036
Metadata: &proto.Metadata{
1037-
IsPrebuild: false,
1038-
IsPrebuildClaim: true,
1037+
IsPrebuild: false,
1038+
IsPrebuiltWorkspaceClaim: true,
10391039
},
10401040
},
10411041
Response: &proto.PlanComplete{

provisionersdk/proto/provisioner.pb.go

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

provisionersdk/proto/provisioner.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ message Metadata {
295295
repeated Role workspace_owner_rbac_roles = 19;
296296
bool is_prebuild = 20; // Indicates that a prebuilt workspace is being built.
297297
string running_workspace_agent_token = 21; // Preserves the running agent token of a prebuilt workspace so it can reinitialize.
298-
bool is_prebuild_claim = 22; // Indicates that a prebuilt workspace is being claimed.
298+
bool is_prebuilt_workspace_claim = 22; // Indicates that a prebuilt workspace is being claimed.
299299
}
300300

301301
// Config represents execution configuration shared by all subsequent requests in the Session

site/e2e/provisionerGenerated.ts

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

0 commit comments

Comments
 (0)