Remove replace directives from go.mod
Nobody has claimed this yet.
- 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
- Wait for #3332 to merge (bumps
knative.dev/pkg, removes OpenCensus usage) - Bump
knative.dev/pkgto align withtektoncd/pipeline(v0.0.0-20260318013857-98d5a706d4fd) - Bump
openshift-pipelines/pipelines-as-codefromv0.42.0tov0.45.0— this removes the transitivek8s.io/client-go@v1.5.2requirement (the root cause of needing the k8s.io replaces) - Bump k8s.io deps to
v0.35.3(aligned with pipeline) and remove all k8s.io replace directives - Remove remaining replaces (
knative.dev/eventing,knative.dev/pkg,go-jose) - Run
go mod tidyand regenerate vendor/codegen
Context
tektoncd/pipeline has no k8s.io or knative replaces — we should align with that.
/kind cleanup
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 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