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

Allow PipelineTaskRunSpec.Metadata to be optional. #4914

Merged
merged 1 commit into from
May 27, 2022

Conversation

wlynch
Copy link
Member

@wlynch wlynch commented May 27, 2022

Changes

Previously, this was using a non-pointer value, which means that the
field was not actually optional and was being included in client
requests. If this request was sent to an older server, this would break
during unmarshalling because the field doesn't exist yet for older
servers.

This changes the type to use a pointer so it will actually be omitted in
newer clients if it is not set.

Co-authored-by: Scott Nichols n3wscott@chainguard.dev
Signed-off-by: Billy Lynch billy@chainguard.dev

/kind bug
Fixes #4913

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs included if any changes are user facing
  • Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been filled in
    (if there are no user facing changes, use release note "NONE")

Release Notes

NONE

Previously, this was using a non-pointer value, which means that the
field was not actually optional and was being included in client
requests. If this request was sent to an older server, this would break
during unmarshalling because the field doesn't exist yet for older
servers.

This changes the type to use a pointer so it will actually be omitted in
newer clients if it is not set.

Co-authored-by: Scott Nichols <n3wscott@chainguard.dev>
Signed-off-by: Billy Lynch <billy@chainguard.dev>
@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. labels May 27, 2022
@wlynch
Copy link
Member Author

wlynch commented May 27, 2022

/assign @austinzhao-go

@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 27, 2022
@tekton-robot
Copy link
Collaborator

@wlynch: GitHub didn't allow me to assign the following users: austinzhao-go.

Note that only tektoncd members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @austinzhao-go

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@wlynch
Copy link
Member Author

wlynch commented May 27, 2022

/cc @austinzhao-go

@tekton-robot
Copy link
Collaborator

@wlynch: GitHub didn't allow me to request PR reviews from the following users: austinzhao-go.

Note that only tektoncd members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @austinzhao-go

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/pipelinerun/pipelinerun.go 86.4% 86.4% 0.0

@wlynch
Copy link
Member Author

wlynch commented May 27, 2022

/cc @jerop who reviewed #4834

@wlynch
Copy link
Member Author

wlynch commented May 27, 2022

/cc @jerop

@tekton-robot tekton-robot requested a review from jerop May 27, 2022 18:02
Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the quick fix @wlynch!

cc other reviewer of #4834 @lbernick

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerop

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 27, 2022
@lbernick
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 27, 2022
@wlynch
Copy link
Member Author

wlynch commented May 27, 2022

/test pull-tekton-pipeline-integration-tests

@wlynch
Copy link
Member Author

wlynch commented May 27, 2022

/test pull-tekton-pipeline-alpha-integration-tests pull-tekton-pipeline-integration-tests

@tekton-robot tekton-robot merged commit 6c5b84b into tektoncd:main May 27, 2022
@austinzhao-go
Copy link
Contributor

Hi @wlynch, just realized this fix! (I totally missed the cc email, sry...)

thank you for helping correct this and I got the reason here.
(also thanks @lbernick for referring this changes, as also required for TEP-0104 impl work
#4877)

JeromeJu added a commit to JeromeJu/pipeline that referenced this pull request Nov 30, 2022
JeromeJu added a commit to JeromeJu/pipeline that referenced this pull request Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression: PipelineTaskRunSpec.Metadata incompatible with older webhooks
5 participants