Skip to content

TaskRuns stuck on deletion after Chains update #1755

Description

@Liu-ko

Summary

TaskRuns started with Chains v0.24.0 are stuck unable to be deleted after update to Chains v0.27.x. Since Chains v0.27.0 started to use service-side-apply method to manipulate finalizers and chains.tekton.dev was applied using patch-merge method, the operator cannot remove it. As a result, old pre-update started TaskRuns cannot get deleted without human intervention.

Expected Behavior

TaskRuns started on earlier releases of Chains controller than v0.27.x should get deleted successfully when requested.

Actual Behavior

TaskRuns starter on Chains v0.24.0 are stuck and cannot be deleted due to presence of the old chains.tekton.dev finalizer after the update to Chains v0.27.x

Steps to Reproduce the Problem

  1. Deploy Chains v0.24.0
  2. Start a TaskRun . Check that the TaskRun gets chains.tekton.dev finalizer in its metadata added.
  3. Deploy Chains v0.27.x
  4. Wait a little and describe the TaskRun. Check that a new finalizer chains.tekton.dev/taskrun is added to the metadata. At this point, there should be 2 finalizers listed on the TaskRun: chains.tekton.dev and chains.tekton.dev/taskrun
  5. Run kubectl delete tr <name> to delete the TaskRun. Witness that the deletion is stuck.
  6. Describe the stuck TaskRun. It will have only chains.tekton.dev finalizer listed, since the newer one will get removed.

Additional Info

  • Kubernetes version:
Client Version: v1.35.6
Kustomize Version: v5.7.1
Server Version: v1.28.0
  • Tekton Pipeline version:
    version: v1.12.0

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions