tektoncd / tektoncd/operator

Remove replace directives from go.mod

Open
#3,351 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

kind/cleanup
Dominant language
Go
Stars
608
Forks
263
Avg merge
1d 3h
Merged PRs (30d)
125

Description

Remove replace directives from go.mod

Once #3332 lands (OpenCensus → OpenTelemetry migration), we should be able to remove most/all replace directives from go.mod and align dependencies with tektoncd/pipeline.

Current replace directives

Replace Reason Can remove?
k8s.io/api, apimachinery, client-go, code-generator, apiextensions-apiserver, kube-openapi Pinned to old k8s versions due to knative.dev/pkg requiring k8s.io/client-go@v1.5.2 ✅ Yes, after bumping knative.dev/pkg and PAC
knative.dev/pkg Pinned to old version that still has metrics package (removed upstream) ✅ Yes, after #3332
knative.dev/eventing Transitive dependency, not directly used ✅ Yes
github.com/go-jose/go-jose/v4 Security pin v4.1.3 → v4.1.4 ✅ Likely, check if latest resolves to v4.1.4+
github.com/alibabacloud-go/cr-20160607 Fork with actual fixes ❌ Likely needs to stay

Steps

  1. Wait for #3332 to merge (bumps knative.dev/pkg, removes OpenCensus usage)
  2. Bump knative.dev/pkg to align with tektoncd/pipeline (v0.0.0-20260318013857-98d5a706d4fd)
  3. Bump openshift-pipelines/pipelines-as-code from v0.42.0 to v0.45.0 — this removes the transitive k8s.io/client-go@v1.5.2 requirement (the root cause of needing the k8s.io replaces)
  4. Bump k8s.io deps to v0.35.3 (aligned with pipeline) and remove all k8s.io replace directives
  5. Remove remaining replaces (knative.dev/eventing, knative.dev/pkg, go-jose)
  6. Run go mod tidy and regenerate vendor/codegen

Context

tektoncd/pipeline has no k8s.io or knative replaces — we should align with that.

/kind cleanup

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 with go.mod and wait for #3332 to land, then compare dependency versions with tektoncd/pipeline's go.mod. Follow the listed bumps and removals, run go mod tidy, and regenerate vendor/codegen. Done means the removable replace directives are gone, dependencies align with the specified versions, and the remaining Alibaba Cloud fork is retained if still required.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
build-system, devops
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.