Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: PipelineTaskRunSpec.Metadata incompatible with older webhooks #4913

Closed
wlynch opened this issue May 27, 2022 · 2 comments · Fixed by #4914
Closed

Regression: PipelineTaskRunSpec.Metadata incompatible with older webhooks #4913

wlynch opened this issue May 27, 2022 · 2 comments · Fixed by #4914
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@wlynch
Copy link
Member

wlynch commented May 27, 2022

Expected Behavior

PipelineTaskRunSpec should be safely passed to older webhooks.

Actual Behavior

    serviceaccount_test.go:163: Failed to create PipelineRun `pipeline-run-with-service-accounts-dsofxybx`: admission webhook "defaulting.webhook.pipeline.tekton.dev" denied the request: mutation failed: cannot decode incoming new object: json: unknown field "metadata"
    panic.go:661: ############################################
    panic.go:661: ### Dumping objects from arendelle-7ntt4 ###
    panic.go:661: ############################################

Steps to Reproduce the Problem

  1. Install Tekton < TEP-0106: Support Specifying Metadata per Task in Runtime #4834
  2. Create PipelineRun using client >= TEP-0106: Support Specifying Metadata per Task in Runtime #4834

Additional Info

We think we've found the root cause (shout out to @n3wscott for finding it):

Metadata PipelineTaskMetadata `json:"metadata,omitempty"`

should be:

Metadata *PipelineTaskMetadata `json:"metadata,omitempty"` 

Will send a PR!

cc @austinzhao-go in case you have any thoughts

/kind bug

@wlynch wlynch added the kind/bug Categorizes issue or PR as related to a bug. label May 27, 2022
@wlynch
Copy link
Member Author

wlynch commented May 27, 2022

/assign @wlynch

@austinzhao-go
Copy link
Contributor

thanks this catch!

applied this update in another field addition PR for TEP-0104
#4877

JeromeJu added a commit to JeromeJu/pipeline that referenced this issue Jul 7, 2023
This commit adds an upgrade test cases to test against previous server
version by adding a light-weight test checking the existing functionalities of
simple resources so as to prevent regressions introduced in the current
release. It creates a pipelineRun with a basic TaskRun and a basic
Pipeline with a Simple PipelineTask and examines the runs created are successful.

This helps prevent the regression where the client has introduced regressions towards the last release i.e. [Regression: PipelineTaskRunSpec.Metadata incompatible with older webhooks](tektoncd#4913)
JeromeJu added a commit to JeromeJu/pipeline that referenced this issue Jul 7, 2023
This commit adds an upgrade test cases to test against previous server
version by adding a light-weight test checking the existing functionalities of
simple resources so as to prevent regressions introduced in the current
release. It creates a pipelineRun with a basic TaskRun and a basic
Pipeline with a Simple PipelineTask and examines the runs created are successful.

This helps prevent the regression where the client has introduced regressions towards the last release i.e. [Regression: PipelineTaskRunSpec.Metadata incompatible with older webhooks](tektoncd#4913)
JeromeJu added a commit to JeromeJu/pipeline that referenced this issue Jul 7, 2023
This commit adds an upgrade test cases to test against previous server
version by adding a light-weight test checking the existing functionalities of
simple resources so as to prevent regressions introduced in the current
release. It creates a pipelineRun with a basic TaskRun and a basic
Pipeline with a Simple PipelineTask and examines the runs created are successful.

This helps prevent the regression where the client has introduced regressions towards the last release i.e. [Regression: PipelineTaskRunSpec.Metadata incompatible with older webhooks](tektoncd#4913)
JeromeJu added a commit to JeromeJu/pipeline that referenced this issue Jul 7, 2023
This commit adds an upgrade test cases to test against previous server
version by adding a light-weight test checking the existing functionalities of
simple resources so as to prevent regressions introduced in the current
release. It creates a pipelineRun with a basic TaskRun and a basic
Pipeline with a Simple PipelineTask and examines the runs created are successful.

This helps prevent the regression where the client has introduced regressions towards the last release i.e. [Regression: PipelineTaskRunSpec.Metadata incompatible with older webhooks](tektoncd#4913)
tekton-robot pushed a commit that referenced this issue Jul 17, 2023
This commit adds an upgrade test cases to test against previous server
version by adding a light-weight test checking the existing functionalities of
simple resources so as to prevent regressions introduced in the current
release. It creates a pipelineRun with a basic TaskRun and a basic
Pipeline with a Simple PipelineTask and examines the runs created are successful.

This helps prevent the regression where the client has introduced regressions towards the last release i.e. [Regression: PipelineTaskRunSpec.Metadata incompatible with older webhooks](#4913)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants