chore: push proto changes to v1.6 (#17874)

`v1.5` is going out with release `v2.22`

I had to reorder `module_files` and `resource_replacements` because of
this.

---------

Signed-off-by: Danny Kopping <dannykopping@gmail.com>
This commit is contained in:
Danny Kopping
2025-05-16 11:27:41 +02:00
committed by GitHub
parent c7917ea9e5
commit cf98268031
5 changed files with 30 additions and 27 deletions

View File

@ -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"
],

View File

@ -15,16 +15,19 @@ import "github.com/coder/coder/v2/apiversion"
//
// API v1.5:
// - Add new field named `prebuilt_workspace_build_stage` enum in the Metadata message.
// - 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.
// - Add `plan` field to `CompletedJob.TemplateImport`.
//
// API v1.6:
// - 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.
const (
CurrentMajor = 1
CurrentMinor = 5
CurrentMinor = 6
)
// CurrentVersion is the current provisionerd API version.

View File

@ -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,

View File

@ -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

View File

@ -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;
},