From f2242a16792f1a4a2a33e3fb0add3b1ab42f93c0 Mon Sep 17 00:00:00 2001 From: Piyush Garg Date: Tue, 3 Sep 2024 22:08:29 +0530 Subject: [PATCH] Bump tektoncd/pipeline to v0.62.3 This will bump tektoncd/pipeline to v0.62.3 to make client compatible with old pipeline versions Fix #2388 --- go.mod | 2 +- go.sum | 4 +- ...cuteCommand-Dry_Run_with_--param_-f.golden | 1 - ...nd-Dry_Run_with_--timeout_specified.golden | 1 - ...am-defaults_and_no_specified_params.golden | 1 - ...param-defaults_and_specified_params.golden | 1 - ...tart_ExecuteCommand-Dry_Run_with_-f.golden | 1 - ...uteCommand-Dry_Run_with_PodTemplate.golden | 1 - ...y_Run_with_only_--dry-run_specified.golden | 1 - ...uteCommand-Dry_Run_with_output=json.golden | 3 +- ...Command-Dry_Run_with_output=json_-f.golden | 3 +- .../pkg/apis/pipeline/v1/artifact_types.go | 77 ++++++++++--------- .../pkg/apis/pipeline/v1/openapi_generated.go | 2 - .../pkg/apis/pipeline/v1/swagger.json | 2 - .../pkg/apis/pipeline/v1/taskrun_types.go | 2 +- .../apis/pipeline/v1/zz_generated.deepcopy.go | 6 +- vendor/modules.txt | 2 +- 17 files changed, 52 insertions(+), 58 deletions(-) diff --git a/go.mod b/go.mod index 3d58f130d2..f412f66c96 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/tektoncd/chains v0.22.0 github.com/tektoncd/hub v1.18.0 - github.com/tektoncd/pipeline v0.62.2 + github.com/tektoncd/pipeline v0.62.3 github.com/tektoncd/plumbing v0.0.0-20230907180608-5625252a2de1 github.com/tektoncd/triggers v0.29.0 github.com/theupdateframework/go-tuf v0.7.0 diff --git a/go.sum b/go.sum index d792bcf6d1..8ace3a35b0 100644 --- a/go.sum +++ b/go.sum @@ -1286,8 +1286,8 @@ github.com/tektoncd/chains v0.22.0 h1:9rgm+skfKpmIAh0CpHSPT6i2R2kmH815YF5iVnvNEM github.com/tektoncd/chains v0.22.0/go.mod h1:5FsO4gIKUIlJ4ohmmMXep0GPMWN1oEwRLXiETmU7XhY= github.com/tektoncd/hub v1.18.0 h1:q9EN0gBKYyHsa9SnyT0LbFP47IG8nH7g1oqzKlObAww= github.com/tektoncd/hub v1.18.0/go.mod h1:pPiMmCE7ORjL+S+ZYkqRGgaaUpRIkdzSFvv/numhO54= -github.com/tektoncd/pipeline v0.62.2 h1:TnTPSbx19wMsqx5N/xWJ3TEpxNj2SoeFmz7Mb6POj4Q= -github.com/tektoncd/pipeline v0.62.2/go.mod h1:cYPH4n3X8t39arNMhgyU7swyv3hVeWToz1yYDRzTLT8= +github.com/tektoncd/pipeline v0.62.3 h1:hR6UKjwzChW+MNG41yjfTKiVW9xet8jbJS59tsIY7bc= +github.com/tektoncd/pipeline v0.62.3/go.mod h1:cYPH4n3X8t39arNMhgyU7swyv3hVeWToz1yYDRzTLT8= github.com/tektoncd/plumbing v0.0.0-20230907180608-5625252a2de1 h1:9paprRIBXQgcvdhGq3wKiSspXP0JIFSY52ru3sIMjKM= github.com/tektoncd/plumbing v0.0.0-20230907180608-5625252a2de1/go.mod h1:7eWs1XNkmReggow7ggRbRyRuHi7646B8b2XipCZ3VOw= github.com/tektoncd/triggers v0.29.0 h1:piRTJT1Sjq3xmGnR50V54oG0NlsszKETLxdCGhgSNQQ= diff --git a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--param_-f.golden b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--param_-f.golden index f26239efa9..3616d612c7 100644 --- a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--param_-f.golden +++ b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--param_-f.golden @@ -32,5 +32,4 @@ spec: - emptyDir: {} name: temporary status: - artifacts: {} podName: "" diff --git a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--timeout_specified.golden b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--timeout_specified.golden index ce201dbbd9..7b7ebd18cc 100644 --- a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--timeout_specified.golden +++ b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--timeout_specified.golden @@ -15,5 +15,4 @@ spec: name: task-1 timeout: 1s status: - artifacts: {} podName: "" diff --git a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--use-param-defaults_and_no_specified_params.golden b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--use-param-defaults_and_no_specified_params.golden index 1574fbec90..ad3cf971af 100644 --- a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--use-param-defaults_and_no_specified_params.golden +++ b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--use-param-defaults_and_no_specified_params.golden @@ -9,5 +9,4 @@ spec: taskRef: name: task-1 status: - artifacts: {} podName: "" diff --git a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--use-param-defaults_and_specified_params.golden b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--use-param-defaults_and_specified_params.golden index 93ef8f76a6..348d61d5a5 100644 --- a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--use-param-defaults_and_specified_params.golden +++ b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_--use-param-defaults_and_specified_params.golden @@ -12,5 +12,4 @@ spec: taskRef: name: task-1 status: - artifacts: {} podName: "" diff --git a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_-f.golden b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_-f.golden index f26239efa9..3616d612c7 100644 --- a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_-f.golden +++ b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_-f.golden @@ -32,5 +32,4 @@ spec: - emptyDir: {} name: temporary status: - artifacts: {} podName: "" diff --git a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_PodTemplate.golden b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_PodTemplate.golden index 1dfec3e025..ccd944f724 100644 --- a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_PodTemplate.golden +++ b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_PodTemplate.golden @@ -19,5 +19,4 @@ spec: taskRef: name: task-1 status: - artifacts: {} podName: "" diff --git a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_only_--dry-run_specified.golden b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_only_--dry-run_specified.golden index e288a9a37d..1f56b9c482 100644 --- a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_only_--dry-run_specified.golden +++ b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_only_--dry-run_specified.golden @@ -14,5 +14,4 @@ spec: taskRef: name: task-1 status: - artifacts: {} podName: "" diff --git a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_output=json.golden b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_output=json.golden index 389e97b50a..85eef91b7c 100644 --- a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_output=json.golden +++ b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_output=json.golden @@ -23,7 +23,6 @@ } }, "status": { - "podName": "", - "artifacts": {} + "podName": "" } } diff --git a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_output=json_-f.golden b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_output=json_-f.golden index 00a2d9006f..cc05dca2aa 100644 --- a/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_output=json_-f.golden +++ b/pkg/cmd/task/testdata/TestTaskStart_ExecuteCommand-Dry_Run_with_output=json_-f.golden @@ -54,7 +54,6 @@ ] }, "status": { - "podName": "", - "artifacts": {} + "podName": "" } } diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/artifact_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/artifact_types.go index 21a0d8fc2f..6281c3e1e4 100644 --- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/artifact_types.go +++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/artifact_types.go @@ -52,29 +52,30 @@ type Artifacts struct { Outputs []Artifact `json:"outputs,omitempty"` } -func (a *Artifacts) Merge(another Artifacts) { +func (a *Artifacts) Merge(another *Artifacts) { inputMap := make(map[string][]ArtifactValue) var newInputs []Artifact for _, v := range a.Inputs { inputMap[v.Name] = v.Values } - - for _, v := range another.Inputs { - _, ok := inputMap[v.Name] - if !ok { - inputMap[v.Name] = []ArtifactValue{} - } - for _, vv := range v.Values { - exists := false - for _, av := range inputMap[v.Name] { - if cmp.Equal(vv, av) { - exists = true - break - } + if another != nil { + for _, v := range another.Inputs { + _, ok := inputMap[v.Name] + if !ok { + inputMap[v.Name] = []ArtifactValue{} } - if !exists { - inputMap[v.Name] = append(inputMap[v.Name], vv) + for _, vv := range v.Values { + exists := false + for _, av := range inputMap[v.Name] { + if cmp.Equal(vv, av) { + exists = true + break + } + } + if !exists { + inputMap[v.Name] = append(inputMap[v.Name], vv) + } } } } @@ -92,31 +93,33 @@ func (a *Artifacts) Merge(another Artifacts) { outputMap[v.Name] = v } - for _, v := range another.Outputs { - _, ok := outputMap[v.Name] - if !ok { - outputMap[v.Name] = Artifact{Name: v.Name, Values: []ArtifactValue{}, BuildOutput: v.BuildOutput} - } - // only update buildOutput to true. - // Do not convert to false if it was true before. - if v.BuildOutput { - art := outputMap[v.Name] - art.BuildOutput = v.BuildOutput - outputMap[v.Name] = art - } - for _, vv := range v.Values { - exists := false - for _, av := range outputMap[v.Name].Values { - if cmp.Equal(vv, av) { - exists = true - break - } + if another != nil { + for _, v := range another.Outputs { + _, ok := outputMap[v.Name] + if !ok { + outputMap[v.Name] = Artifact{Name: v.Name, Values: []ArtifactValue{}, BuildOutput: v.BuildOutput} } - if !exists { + // only update buildOutput to true. + // Do not convert to false if it was true before. + if v.BuildOutput { art := outputMap[v.Name] - art.Values = append(art.Values, vv) + art.BuildOutput = v.BuildOutput outputMap[v.Name] = art } + for _, vv := range v.Values { + exists := false + for _, av := range outputMap[v.Name].Values { + if cmp.Equal(vv, av) { + exists = true + break + } + } + if !exists { + art := outputMap[v.Name] + art.Values = append(art.Values, vv) + outputMap[v.Name] = art + } + } } } diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/openapi_generated.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/openapi_generated.go index 42bf6748b1..e2af39e178 100644 --- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/openapi_generated.go +++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/openapi_generated.go @@ -4214,7 +4214,6 @@ func schema_pkg_apis_pipeline_v1_TaskRunStatus(ref common.ReferenceCallback) com }, SchemaProps: spec.SchemaProps{ Description: "Artifacts are the list of artifacts written out by the task's containers", - Default: map[string]interface{}{}, Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.Artifacts"), }, }, @@ -4366,7 +4365,6 @@ func schema_pkg_apis_pipeline_v1_TaskRunStatusFields(ref common.ReferenceCallbac }, SchemaProps: spec.SchemaProps{ Description: "Artifacts are the list of artifacts written out by the task's containers", - Default: map[string]interface{}{}, Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.Artifacts"), }, }, diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/swagger.json b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/swagger.json index 584220d0b8..24715f858f 100644 --- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/swagger.json +++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/swagger.json @@ -2125,7 +2125,6 @@ }, "artifacts": { "description": "Artifacts are the list of artifacts written out by the task's containers", - "default": {}, "$ref": "#/definitions/v1.Artifacts", "x-kubernetes-list-type": "atomic" }, @@ -2220,7 +2219,6 @@ "properties": { "artifacts": { "description": "Artifacts are the list of artifacts written out by the task's containers", - "default": {}, "$ref": "#/definitions/v1.Artifacts", "x-kubernetes-list-type": "atomic" }, diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskrun_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskrun_types.go index ea6e517649..fb12b28c2f 100644 --- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskrun_types.go +++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskrun_types.go @@ -282,7 +282,7 @@ type TaskRunStatusFields struct { // Artifacts are the list of artifacts written out by the task's containers // +optional // +listType=atomic - Artifacts Artifacts `json:"artifacts,omitempty"` + Artifacts *Artifacts `json:"artifacts,omitempty"` // The list has one entry per sidecar in the manifest. Each entry is // represents the imageid of the corresponding sidecar. diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/zz_generated.deepcopy.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/zz_generated.deepcopy.go index 12dbe03bf8..c7e68b5c2b 100644 --- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/zz_generated.deepcopy.go @@ -1934,7 +1934,11 @@ func (in *TaskRunStatusFields) DeepCopyInto(out *TaskRunStatusFields) { (*in)[i].DeepCopyInto(&(*out)[i]) } } - in.Artifacts.DeepCopyInto(&out.Artifacts) + if in.Artifacts != nil { + in, out := &in.Artifacts, &out.Artifacts + *out = new(Artifacts) + (*in).DeepCopyInto(*out) + } if in.Sidecars != nil { in, out := &in.Sidecars, &out.Sidecars *out = make([]SidecarState, len(*in)) diff --git a/vendor/modules.txt b/vendor/modules.txt index 3d98136fc3..56f86b4a77 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1420,7 +1420,7 @@ github.com/tektoncd/hub/api/v1/gen/http/catalog/client github.com/tektoncd/hub/api/v1/gen/http/resource/client github.com/tektoncd/hub/api/v1/gen/resource github.com/tektoncd/hub/api/v1/gen/resource/views -# github.com/tektoncd/pipeline v0.62.2 +# github.com/tektoncd/pipeline v0.62.3 ## explicit; go 1.22 github.com/tektoncd/pipeline/internal/artifactref github.com/tektoncd/pipeline/pkg/apis/config