diff --git a/go.mod b/go.mod index 2a577f90d7..f7ac6bbc39 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,7 @@ require ( github.com/sigstore/sigstore/pkg/signature/kms/hashivault v1.8.9 github.com/spiffe/go-spiffe/v2 v2.3.0 github.com/stretchr/testify v1.9.0 - github.com/tektoncd/pipeline v0.63.0 + github.com/tektoncd/pipeline v0.64.0 github.com/tektoncd/plumbing v0.0.0-20230907180608-5625252a2de1 go.opencensus.io v0.24.0 go.uber.org/zap v1.27.0 diff --git a/go.sum b/go.sum index 2233516f90..617806b534 100644 --- a/go.sum +++ b/go.sum @@ -1276,8 +1276,8 @@ github.com/tchap/go-patricia/v2 v2.3.1 h1:6rQp39lgIYZ+MHmdEq4xzuk1t7OdC35z/xm0BG github.com/tchap/go-patricia/v2 v2.3.1/go.mod h1:VZRHKAb53DLaG+nA9EaYYiaEx6YztwDlLElMsnSHD4k= github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= -github.com/tektoncd/pipeline v0.63.0 h1:QLkhYr970jgs6vmHopXz8pcXbz5c3i0a0FX7ggGtn94= -github.com/tektoncd/pipeline v0.63.0/go.mod h1:HA7r0XJzhhcajNBcl0GErmcT5Omow1jVfLKwbVGjojY= +github.com/tektoncd/pipeline v0.64.0 h1:JXS9zz+B3lryQQ0f81AVmFC09+itQuxtVtQ1oWIgPkc= +github.com/tektoncd/pipeline v0.64.0/go.mod h1:V3cyfxxc7b3GLT2a13GX2mWA86qmxWhh4mOp4gfFQwQ= 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/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/errors/errors.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/errors/errors.go index f81dd2e5f8..fbd487bba3 100644 --- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/errors/errors.go +++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/errors/errors.go @@ -13,7 +13,12 @@ limitations under the License. package errors -import "errors" +import ( + "errors" + "strings" + + apierrors "k8s.io/apimachinery/pkg/api/errors" +) const UserErrorLabel = "[User error] " @@ -71,3 +76,10 @@ func GetErrorMessage(err error) string { } return err.Error() } + +// IsImmutableTaskRunSpecError returns true if the error is the taskrun spec is immutable +func IsImmutableTaskRunSpecError(err error) bool { + // The TaskRun may have completed and the spec field is immutable. + // validation code: https://github.com/tektoncd/pipeline/blob/v0.62.0/pkg/apis/pipeline/v1/taskrun_validation.go#L136-L138 + return apierrors.IsBadRequest(err) && strings.Contains(err.Error(), "no updates are allowed") +} diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/merge.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/merge.go index df413a5456..b916d8caeb 100644 --- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/merge.go +++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/merge.go @@ -65,7 +65,18 @@ func MergeStepsWithStepTemplate(template *StepTemplate, steps []Step) ([]Step, e amendConflictingContainerFields(&merged, s) // Pass through original step Script, for later conversion. - newStep := Step{Script: s.Script, OnError: s.OnError, Timeout: s.Timeout, StdoutConfig: s.StdoutConfig, StderrConfig: s.StderrConfig, Results: s.Results, Params: s.Params, Ref: s.Ref, When: s.When} + newStep := Step{ + Script: s.Script, + OnError: s.OnError, + Timeout: s.Timeout, + StdoutConfig: s.StdoutConfig, + StderrConfig: s.StderrConfig, + Results: s.Results, + Params: s.Params, + Ref: s.Ref, + When: s.When, + Workspaces: s.Workspaces, + } newStep.SetContainerFields(merged) steps[i] = newStep } diff --git a/vendor/modules.txt b/vendor/modules.txt index 312e1b4e7b..43ccea3674 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1898,7 +1898,7 @@ github.com/syndtr/goleveldb/leveldb/util # github.com/tdakkota/asciicheck v0.2.0 ## explicit; go 1.18 github.com/tdakkota/asciicheck -# github.com/tektoncd/pipeline v0.63.0 +# github.com/tektoncd/pipeline v0.64.0 ## explicit; go 1.22 github.com/tektoncd/pipeline/internal/artifactref github.com/tektoncd/pipeline/pkg/apis/config