From 57eb5f0b8d44987028c0343064c3e8f4fdbe6c0e Mon Sep 17 00:00:00 2001 From: Danny Kopping Date: Fri, 16 May 2025 09:06:48 +0200 Subject: [PATCH 1/2] chore: push proto changes to v1.6 v1.5 is going out with release v2.22 Signed-off-by: Danny Kopping --- ...oder_provisioner_list_--output_json.golden | 2 +- provisionerd/proto/version.go | 10 ++++--- provisionersdk/proto/provisioner.pb.go | 28 +++++++++---------- provisionersdk/proto/provisioner.proto | 4 +-- site/e2e/provisionerGenerated.ts | 10 +++---- 5 files changed, 28 insertions(+), 26 deletions(-) diff --git a/cli/testdata/coder_provisioner_list_--output_json.golden b/cli/testdata/coder_provisioner_list_--output_json.golden index 3daeb89febcb4..e8b3637bdffa6 100644 --- a/cli/testdata/coder_provisioner_list_--output_json.golden +++ b/cli/testdata/coder_provisioner_list_--output_json.golden @@ -7,7 +7,7 @@ "last_seen_at": "====[timestamp]=====", "name": "test", "version": "v0.0.0-devel", - "api_version": "1.5", + "api_version": "1.6", "provisioners": [ "echo" ], diff --git a/provisionerd/proto/version.go b/provisionerd/proto/version.go index 64ab779f2bfc4..ed3a504ad6318 100644 --- a/provisionerd/proto/version.go +++ b/provisionerd/proto/version.go @@ -15,16 +15,18 @@ import "github.com/coder/coder/v2/apiversion" // // API v1.5: // - Add new field named `prebuilt_workspace_build_stage` enum in the Metadata message. +// - Add new field named `running_agent_auth_tokens` to provisioner job metadata +// - Add new field named `resource_replacements` in PlanComplete & CompletedJob.WorkspaceBuild. +// - Add new field named `api_key_scope` to WorkspaceAgent to support running without user data access. +// +// API v1.6: // - Add `plan` and `module_files` fields to `CompletedJob.TemplateImport`. // - Add previous parameter values to 'WorkspaceBuild' jobs. Provisioner passes // the previous values for the `terraform apply` to enforce monotonicity // in the terraform provider. -// - Add new field named `running_agent_auth_tokens` to provisioner job metadata -// - Add new field named `resource_replacements` in PlanComplete & CompletedJob.WorkspaceBuild. -// - Add new field named `api_key_scope` to WorkspaceAgent to support running without user data access. const ( CurrentMajor = 1 - CurrentMinor = 5 + CurrentMinor = 6 ) // CurrentVersion is the current provisionerd API version. diff --git a/provisionersdk/proto/provisioner.pb.go b/provisionersdk/proto/provisioner.pb.go index b29cbbfc2a9e5..a8047634f8742 100644 --- a/provisionersdk/proto/provisioner.pb.go +++ b/provisionersdk/proto/provisioner.pb.go @@ -2932,8 +2932,8 @@ type PlanComplete struct { Modules []*Module `protobuf:"bytes,7,rep,name=modules,proto3" json:"modules,omitempty"` Presets []*Preset `protobuf:"bytes,8,rep,name=presets,proto3" json:"presets,omitempty"` Plan []byte `protobuf:"bytes,9,opt,name=plan,proto3" json:"plan,omitempty"` - ModuleFiles []byte `protobuf:"bytes,10,opt,name=module_files,json=moduleFiles,proto3" json:"module_files,omitempty"` - ResourceReplacements []*ResourceReplacement `protobuf:"bytes,11,rep,name=resource_replacements,json=resourceReplacements,proto3" json:"resource_replacements,omitempty"` + ResourceReplacements []*ResourceReplacement `protobuf:"bytes,10,rep,name=resource_replacements,json=resourceReplacements,proto3" json:"resource_replacements,omitempty"` + ModuleFiles []byte `protobuf:"bytes,11,opt,name=module_files,json=moduleFiles,proto3" json:"module_files,omitempty"` } func (x *PlanComplete) Reset() { @@ -3024,16 +3024,16 @@ func (x *PlanComplete) GetPlan() []byte { return nil } -func (x *PlanComplete) GetModuleFiles() []byte { +func (x *PlanComplete) GetResourceReplacements() []*ResourceReplacement { if x != nil { - return x.ModuleFiles + return x.ResourceReplacements } return nil } -func (x *PlanComplete) GetResourceReplacements() []*ResourceReplacement { +func (x *PlanComplete) GetModuleFiles() []byte { if x != nil { - return x.ResourceReplacements + return x.ModuleFiles } return nil } @@ -4172,14 +4172,14 @@ var file_provisionersdk_proto_provisioner_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x70, 0x6c, 0x61, 0x6e, - 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x46, 0x69, - 0x6c, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, - 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, - 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x41, 0x0a, 0x0c, 0x41, 0x70, + 0x12, 0x55, 0x0a, 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x70, + 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x61, + 0x63, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x22, 0x41, 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, diff --git a/provisionersdk/proto/provisioner.proto b/provisionersdk/proto/provisioner.proto index be480c1875942..dda4a3ad6287f 100644 --- a/provisionersdk/proto/provisioner.proto +++ b/provisionersdk/proto/provisioner.proto @@ -354,8 +354,8 @@ message PlanComplete { repeated Module modules = 7; repeated Preset presets = 8; bytes plan = 9; - bytes module_files = 10; - repeated ResourceReplacement resource_replacements = 11; + repeated ResourceReplacement resource_replacements = 10; + bytes module_files = 11; } // ApplyRequest asks the provisioner to apply the changes. Apply MUST be preceded by a successful plan request/response diff --git a/site/e2e/provisionerGenerated.ts b/site/e2e/provisionerGenerated.ts index d84d87755ad94..33cdb4a6e91d3 100644 --- a/site/e2e/provisionerGenerated.ts +++ b/site/e2e/provisionerGenerated.ts @@ -379,8 +379,8 @@ export interface PlanComplete { modules: Module[]; presets: Preset[]; plan: Uint8Array; - moduleFiles: Uint8Array; resourceReplacements: ResourceReplacement[]; + moduleFiles: Uint8Array; } /** @@ -1191,11 +1191,11 @@ export const PlanComplete = { if (message.plan.length !== 0) { writer.uint32(74).bytes(message.plan); } - if (message.moduleFiles.length !== 0) { - writer.uint32(82).bytes(message.moduleFiles); - } for (const v of message.resourceReplacements) { - ResourceReplacement.encode(v!, writer.uint32(90).fork()).ldelim(); + ResourceReplacement.encode(v!, writer.uint32(82).fork()).ldelim(); + } + if (message.moduleFiles.length !== 0) { + writer.uint32(90).bytes(message.moduleFiles); } return writer; }, From d4cc0ab73e2d8b78ef99794c528746981b239850 Mon Sep 17 00:00:00 2001 From: Danny Kopping Date: Fri, 16 May 2025 10:11:08 +0200 Subject: [PATCH 2/2] chore: correction Signed-off-by: Danny Kopping --- provisionerd/proto/version.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/provisionerd/proto/version.go b/provisionerd/proto/version.go index ed3a504ad6318..012e9920e36cd 100644 --- a/provisionerd/proto/version.go +++ b/provisionerd/proto/version.go @@ -18,9 +18,10 @@ import "github.com/coder/coder/v2/apiversion" // - Add new field named `running_agent_auth_tokens` to provisioner job metadata // - Add new field named `resource_replacements` in PlanComplete & CompletedJob.WorkspaceBuild. // - Add new field named `api_key_scope` to WorkspaceAgent to support running without user data access. +// - Add `plan` field to `CompletedJob.TemplateImport`. // // API v1.6: -// - Add `plan` and `module_files` fields to `CompletedJob.TemplateImport`. +// - Add `module_files` field to `CompletedJob.TemplateImport`. // - Add previous parameter values to 'WorkspaceBuild' jobs. Provisioner passes // the previous values for the `terraform apply` to enforce monotonicity // in the terraform provider. pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy