From 1ce5663bd1c5cfc8cee8deba5e44484baa802d02 Mon Sep 17 00:00:00 2001 From: Samarth Maganahalli Date: Sat, 22 Jun 2024 23:56:03 +0530 Subject: [PATCH] update error message --- go.mod | 1 + go.sum | 2 ++ pkg/reconciler/pipelinerun/pipelinerun.go | 4 ++-- pkg/reconciler/pipelinerun/pipelinerun_test.go | 2 +- vendor/modules.txt | 2 ++ 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d3eec4c37eb..3f7fe4d0bbd 100644 --- a/go.mod +++ b/go.mod @@ -115,6 +115,7 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/vault/api v1.14.0 // indirect github.com/jellydator/ttlcache/v3 v3.2.0 // indirect + github.com/jstemmer/go-junit-report v1.0.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/letsencrypt/boulder v0.0.0-20230907030200-6d76a0f91e1e // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect diff --git a/go.sum b/go.sum index 50d5dca7dff..9307b3fdaa4 100644 --- a/go.sum +++ b/go.sum @@ -759,6 +759,8 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jstemmer/go-junit-report v1.0.0 h1:8X1gzZpR+nVQLAht+L/foqOeX2l9DTZoaIPbEQHxsds= +github.com/jstemmer/go-junit-report v1.0.0/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= diff --git a/pkg/reconciler/pipelinerun/pipelinerun.go b/pkg/reconciler/pipelinerun/pipelinerun.go index 3b668f7534b..3ca088433e7 100644 --- a/pkg/reconciler/pipelinerun/pipelinerun.go +++ b/pkg/reconciler/pipelinerun/pipelinerun.go @@ -489,8 +489,8 @@ func (c *Reconciler) reconcile(ctx context.Context, pr *v1.PipelineRun, getPipel if err := resources.ValidateRequiredParametersProvided(&pipelineSpec.Params, &pr.Spec.Params); err != nil { // This Run has failed, so we need to mark it as failed and stop reconciling it pr.Status.MarkFailed(v1.PipelineRunReasonParameterMissing.String(), - "PipelineRun %s parameters is missing some parameters required by Pipeline %s's parameters: %s", - pr.Namespace, pr.Name, err) + "PipelineRun %s/%s is missing some parameters required by Pipeline %s: %s", + pr.Namespace, pr.Name, pipelineMeta.Name, err) return controller.NewPermanentError(err) } diff --git a/pkg/reconciler/pipelinerun/pipelinerun_test.go b/pkg/reconciler/pipelinerun/pipelinerun_test.go index e7d4784c35e..9a1a69e5bb2 100644 --- a/pkg/reconciler/pipelinerun/pipelinerun_test.go +++ b/pkg/reconciler/pipelinerun/pipelinerun_test.go @@ -975,7 +975,7 @@ spec: permanentError: true, wantEvents: []string{ "Normal Started", - "Warning Failed [User error] PipelineRun foo parameters is missing some parameters required by Pipeline pipelinerun-missing-params's parameters: pipelineRun missing parameters: [some-param]", + "Warning Failed [User error] PipelineRun foo/pipelinerun-missing-params is missing some parameters required by Pipeline pipelinerun-missing-params: pipelineRun missing parameters: [some-param]", }, }, { name: "invalid-pipeline-with-invalid-dag-graph", diff --git a/vendor/modules.txt b/vendor/modules.txt index 499373b6e5f..a54391853d0 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -747,6 +747,8 @@ github.com/josharian/intern # github.com/json-iterator/go v1.1.12 ## explicit; go 1.12 github.com/json-iterator/go +# github.com/jstemmer/go-junit-report v1.0.0 +## explicit; go 1.2 # github.com/kelseyhightower/envconfig v1.4.0 ## explicit github.com/kelseyhightower/envconfig