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

Remove deprecated TaskRun.Status.ResourceResults.ResourceRef field #4977

Merged

Conversation

abayer
Copy link
Contributor

@abayer abayer commented Jun 14, 2022

Changes

See #2694.

The TaskRun.Status.ResourceResults.ResourceRef field was only ever used for its own Name field, and as part of #2694, a new field, TaskRun.Status.ResourceResults.ResourceName was added to replace ...ResourceRef.Name with a more semantically appropriate field. This change finishes the work by removing the deprecated TaskRun.Status.ResourceResults.ResourceRef.

This has been scheduled for removal since April 2021.

/kind cleanup

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

Removes deprecated `TaskRun.Status.ResourceResults.ResourceRef` field; use `TaskRun.Status.ResourceResults.ResourceName` instead.

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Jun 14, 2022
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 14, 2022
@abayer
Copy link
Contributor Author

abayer commented Jun 14, 2022

cc @lbernick

@abayer abayer force-pushed the remove-resourceresults-resourceref branch from 053579a to 380f821 Compare June 14, 2022 17:23
@abayer
Copy link
Contributor Author

abayer commented Jun 14, 2022

Copy link
Member

@lbernick lbernick left a comment

Choose a reason for hiding this comment

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

Thanks Andrew! Could you add a bit more context to the commit message and PR description (from the linked issue), stating that ResourceRef and ResourceName contain the same info but "resourceRef" doesn't make semantic sense? Also, you have a typo in the PR name (should be "deprecated")

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 15, 2022
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.

@abayer this was deprecated a long time ago and is overdue for removal, but wondering if we should send out an email to tekton-dev@ and tekton-users@ about the removal in the next release just in case someone is still using it and needs to migrate off it before the next release?

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerop, lbernick

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

@abayer
Copy link
Contributor Author

abayer commented Jun 15, 2022

@lbernick Will do!

And @jerop, yup, an email will be needed.

@abayer abayer force-pushed the remove-resourceresults-resourceref branch from 380f821 to c518155 Compare June 15, 2022 16:38
@abayer abayer changed the title Remove deprected TaskRun.Status.ResourceResults.ResourceRef field Remove deprecated TaskRun.Status.ResourceResults.ResourceRef field Jun 15, 2022
See tektoncd#2694.

The `TaskRun.Status.ResourceResults.ResourceRef` field was only ever used for its own `Name` field, and as part of tektoncd#2694, a new field, `TaskRun.Status.ResourceResults.ResourceName` was added to replace `...ResourceRef.Name` with a more semantically appropriate field. This change finishes the work by removing the deprecated `TaskRun.Status.ResourceResults.ResourceRef`.

This has been scheduled for removal since April 2021.

Signed-off-by: Andrew Bayer <[email protected]>
@abayer abayer force-pushed the remove-resourceresults-resourceref branch from c518155 to 7fc46ee Compare June 15, 2022 16:40
@abayer
Copy link
Contributor Author

abayer commented Jun 15, 2022

@lbernick Done, I hope. =)

@abayer
Copy link
Contributor Author

abayer commented Jun 15, 2022

/retest

@abayer
Copy link
Contributor Author

abayer commented Jun 15, 2022

@lbernick @jerop Ok, should be good and ready for an lgtm, hopefully!

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.

🎉

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 15, 2022
@tekton-robot tekton-robot merged commit fcbeb45 into tektoncd:main Jun 15, 2022
@afrittoli
Copy link
Member

It looks like, even if not used, resourceRef was set in the status, and now the webhook does not allow deleting resources with a resourceRef:

    request-pr-docs-reviewer-wjfgm-clone-repo:
      pipelineTaskName: clone-repo
      status:
        completionTime: "2022-07-04T08:57:17Z"
        conditions:
        - lastTransitionTime: "2022-07-04T08:57:17Z"
          message: All Steps have completed executing
          reason: Succeeded
          status: "True"
          type: Succeeded
        podName: request-pr-docs-reviewer-wjfgm-clone-repo-pod
        resourcesResult:
        - key: url
          resourceRef: {}
          value: https://github.com/tektoncd/pipeline

and

$ tkn pr delete request-pr-docs-reviewer-wjfgm -n tekton-ci
Are you sure you want to delete PipelineRun(s) "request-pr-docs-reviewer-wjfgm" (y/n): y
Error: failed to delete PipelineRun "request-pr-docs-reviewer-wjfgm": admission webhook "validation.webhook.pipeline.tekton.dev" denied the request: decoding request failed: cannot decode incoming old object: json: unknown field "resourceRef"

I filed #5317 to track the issue

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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants