tektoncd / cli

A CLI for interacting with Tekton!
Apache License 2.0
431 stars 250 forks source link

Failing to to `tkn start` with recent `tkn` release and old(er) pipeline version #2388

Closed vdemeester closed 2 months ago

vdemeester commented 3 months ago

tkn version is 0.38, pipeline version is 0.61.x (so, relatively recent). This would also happen with the older LTS, such as 0.59.x, …

Expected Behavior

tkn start working and starting the task.

Actual Behavior

tkn start fails with the following.

Error: admission webhook "webhook.pipeline.tekton.dev" denied the request: mutation failed: cannot decode incoming new object: json: unknown field "artifacts"

Steps to Reproduce the Problem

  1. Install pipelnie v0.61.x or older and tkn 0.38
  2. Define a Task
  3. Do a tkn start

Additional Info

This boils down to the definition in pipeline, see https://github.com/tektoncd/pipeline/blob/main/pkg/apis/pipeline/v1/taskrun_types.go#L300L303. When it gets created by tkn, it most likely is an empty arrays instead of being nil, and… it is not recognized on older version of tektoncd/pipeline.

This could be a "backward" incompatibility from tektoncd/pipeline. cc @tektoncd/cli-maintainers @tektoncd/core-maintainers