tektoncd / tektoncd/chains

Prefer a domain-qualified finalizer name to avoid accidental conflicts with other finalizer writers (chains.tekton.dev)

Open
#1,218 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
277
Forks
164
Avg merge
2d 3h
Merged PRs (30d)
61

Description

https://tekton-releases.appspot.com/build/tekton-prow/pr-logs/pull/tektoncd_chains/1148/pull-tekton-chains-integration-tests/1807738097719316480/

    {"level":"warn","ts":"2024-07-01T11:51:34.769Z","logger":"watcher","caller":"logging/warning_handler.go:32","msg":"API Warning: metadata.finalizers: \"chains.tekton.dev\": prefer a domain-qualified finalizer name to avoid accidental conflicts with other finalizer writers","commit":"2f98765-dirty"}

https://github.com/tektoncd/chains/blob/cd9106b8d3af008f62ecb5b1a050fa19b079d1c8/pkg/reconciler/taskrun/controller.go#L89

The theoretical fix for this is:

- FinalizerName:     "chains.tekton.dev", 
+ FinalizerName:     "chains.tekton.dev/finalizer", 

But, in practice, if your objects are long lived, you will want to include migration code so that old finalizer values are accepted/handled.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in pkg/reconciler/taskrun/controller.go around line 89 and inspect how the finalizer is added and handled. Update the finalizer name to the domain-qualified value, account for existing objects using the old value, and verify the API warning no longer occurs in the integration test output.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.