Skip to content

Add path to taskrun finalizer name#1391

Merged
tekton-robot merged 1 commit intotektoncd:mainfrom
enarha:taskrun-finalizer-name
Jul 1, 2025
Merged

Add path to taskrun finalizer name#1391
tekton-robot merged 1 commit intotektoncd:mainfrom
enarha:taskrun-finalizer-name

Conversation

@enarha
Copy link
Contributor

@enarha enarha commented Jun 30, 2025

Fixes the following warning:
"API Warning: metadata.finalizers: "chains.tekton.dev": prefer a domain-qualified finalizer name including a path (/) to avoid accidental conflicts with other finalizer writers".

Changes

Submitter Checklist

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

  • Has Docs included if any changes are user facing
  • Has 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 updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Finalizer name for TaskRuns now contains a path to avoid API warnings, "chains.tekton.dev/taskrun".

/kind misc

Fixes the following warning:
"prefer a domain-qualified finalizer name including a path (/) to avoid
accidental conflicts with other finalizer writers".
@tekton-robot tekton-robot added the kind/misc Categorizes issue or PR as a miscellaneuous one. label Jun 30, 2025
@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 30, 2025
Copy link
Contributor

@lcarva lcarva 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 30, 2025
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lcarva

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

The pull request process is described here

Details 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 Jun 30, 2025
@vdemeester
Copy link
Member

/retest

@tekton-robot tekton-robot merged commit 40b47b9 into tektoncd:main Jul 1, 2025
23 of 24 checks passed
@enarha enarha deleted the taskrun-finalizer-name branch July 1, 2025 10:34
@khrm
Copy link
Contributor

khrm commented Jul 1, 2025

@lcarva @vdemeester Isn't this a breaking change?

@enarha
Copy link
Contributor Author

enarha commented Jul 1, 2025

@lcarva @vdemeester Isn't this a breaking change?

If you believe that there are other controllers or clients managing or using that finalizer, that will be a breaking change for them. I find this quite unlikely though. The finalizer name is also not part of the CR specification, so another reason to not consider that a breaking change. That's IMO.

@khrm
Copy link
Contributor

khrm commented Jul 1, 2025

If we deploy the latest chains controller, it could leave the older finalizer. Won't that cause an issue? User would need to manually delete the old finalizers. @enarha

@enarha
Copy link
Contributor Author

enarha commented Jul 1, 2025

If we deploy the latest chains controller, it could leave the older finalizer. Won't that cause an issue? User would need to manually delete the old finalizers. @enarha

Yes, you are right. During upgrade, existing finalizers won't be removed by the new controller instance. The user will have to remove them manually. Another option is we add some extra code, which only removes the old finalizer if found.

@enarha
Copy link
Contributor Author

enarha commented Jul 1, 2025

If we deploy the latest chains controller, it could leave the older finalizer. Won't that cause an issue? User would need to manually delete the old finalizers. @enarha

Yes, you are right. During upgrade, existing finalizers won't be removed by the new controller instance. The user will have to remove them manually. Another option is we add some extra code, which only removes the old finalizer if found.

I created #1394 to address this issue. I need some more testing and I'll remove the WIP once done.

@enarha
Copy link
Contributor Author

enarha commented Jul 1, 2025

If we deploy the latest chains controller, it could leave the older finalizer. Won't that cause an issue? User would need to manually delete the old finalizers. @enarha

Yes, you are right. During upgrade, existing finalizers won't be removed by the new controller instance. The user will have to remove them manually. Another option is we add some extra code, which only removes the old finalizer if found.

I created #1394 to address this issue. I need some more testing and I'll remove the WIP once done.

#1394 is ready for review. @khrm @vdemeester @lcarva PTAL.

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/misc Categorizes issue or PR as a miscellaneuous one. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants