Use //go:fix inline for deprecated storage backends and migrate off deprecated pipeline APIs
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 277
- Forks
- 164
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 61
Description
Description
Go 1.26 introduced //go:fix inline — a directive that allows go fix and IDEs to automatically rewrite call sites of deprecated functions, type aliases, and variables to their modern replacements. See the Go blog post for details.
There are two sides to this for tektoncd/chains:
-
As a consumer: Once tektoncd/pipeline adds
//go:fix inlineannotations to its deprecated APIs, chains can rungo fix ./...to auto-migrate (e.g. v1beta1 type aliases, deprecated resolution APIs). -
As a library: chains has its own deprecated types that could benefit from annotation.
Prerequisite
Bump go.mod to Go 1.26 (currently at 1.25.5).
Opportunities
Deprecated Storage Backends
The following storage backends are deprecated in favor of Storer:
pkg/chains/storage/tekton/tekton.go—Backendstruct (deprecated, useStorerinstead)pkg/chains/storage/gcs/gcs.go—Backendstructpkg/chains/storage/oci/legacy.go—Backendstruct
If there are constructor functions like NewStorageBackend() that simply wrap the new API, those can be annotated with //go:fix inline:
// Deprecated: use NewStorer instead.
//
//go:fix inline
func NewStorageBackend(ps versioned.Interface) *Backend {
return &Backend{pipelineclientset: ps}
}
Consuming pipeline's annotations
Once tektoncd/pipeline annotates its deprecated APIs (tektoncd/pipeline#9560), running go fix ./... in chains will automatically migrate:
v1beta1.ArrayOrString→v1beta1.ParamValue- Deprecated resolution package imports
- Other deprecated type aliases and wrapper functions
References
- //go:fix inline and the source-level inliner
- Using go fix to modernize Go code
- Related: tektoncd/pipeline#9560
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with go.mod and the deprecated Backend definitions in pkg/chains/storage/tekton/tekton.go, pkg/chains/storage/gcs/gcs.go, and pkg/chains/storage/oci/legacy.go. Check tektoncd/pipeline#9560 before running go fix ./... to identify migrations enabled by the dependency. Done means Go 1.26 is required and the applicable deprecated storage APIs and pipeline usages are migrated or annotated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100