Skip to content

chore(deps): pin gen-crd-api-reference-docs via replace directive#1145

Merged
manusa merged 1 commit into
containers:mainfrom
marcnuri-forks:chore/replace-gen-crd-api-reference-docs
May 11, 2026
Merged

chore(deps): pin gen-crd-api-reference-docs via replace directive#1145
manusa merged 1 commit into
containers:mainfrom
marcnuri-forks:chore/replace-gen-crd-api-reference-docs

Conversation

@manusa

@manusa manusa commented May 11, 2026

Copy link
Copy Markdown
Member

Summary

tektoncd/pipeline v1.12.0 transitively requires gen-crd-api-reference-docs@v0.3.1-0.20260316152250-6bbddc29119c. The commit exists on GitHub but is not reachable from any branch, tag, or PR ref in the upstream ahmetb/gen-crd-api-reference-docs repo, so both proxy.golang.org and GOPROXY=direct return 404.

This breaks go list -m all and IDE module indexing (GoLand/IntelliJ flag the entire project as broken). go build and go test were unaffected because nothing in this repo imports the package — it's only used for docs generation in upstream tekton.

Fix

Add a replace directive pinning gen-crd-api-reference-docs to the tagged v0.3.0 so module resolution succeeds. The package isn't compiled into our binary, so the specific version doesn't matter — only that it resolves.

The root cause is tracked upstream at tektoncd/pipeline#9997. The replace can be removed once tekton ships a patched release.

Reproduction

go list -m all
# go: github.com/ahmetb/gen-crd-api-reference-docs@v0.3.1-0.20260316152250-6bbddc29119c:
#   invalid version: unknown revision 6bbddc29119c

After this change, go list -m all succeeds and IDE indexing completes cleanly.

Test plan

  • make tidy succeeds
  • go list -m all resolves cleanly
  • go build ./... succeeds
  • IntelliJ project indexing completes without errors

tektoncd/pipeline v1.12.0 transitively requires
gen-crd-api-reference-docs@v0.3.1-0.20260316152250-6bbddc29119c. The
referenced commit exists on GitHub but is not reachable from any
branch, tag, or PR ref in the upstream repo, so proxy.golang.org and
GOPROXY=direct both 404. This breaks `go list -m all` and IDE module
indexing (GoLand/IntelliJ flag the whole project as broken), even
though `go build` and `go test` are unaffected because nothing in
this repo imports the package.

Pin the dependency to the tagged v0.3.0 via a `replace` directive so
module resolution succeeds. The tool is only used for docs generation
upstream and is never compiled into our binary. Tracked upstream at
tektoncd/pipeline#9997 — the workaround can be removed once tekton
ships a patched release.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Marc Nuri <marc@marcnuri.com>
@manusa manusa added this to the 0.1.0 milestone May 11, 2026
@manusa
manusa marked this pull request as ready for review May 11, 2026 09:25
@manusa
manusa requested a review from matzew May 11, 2026 09:25
@manusa

manusa commented May 11, 2026

Copy link
Copy Markdown
Member Author

Merging since upstream it was confirmed that this needed fixing.

@manusa
manusa merged commit 133f381 into containers:main May 11, 2026
11 checks passed
manusa added a commit to marcnuri-forks/kubernetes-mcp-server that referenced this pull request Jun 29, 2026
The replace directive added in containers#1145 worked around tektoncd/pipeline
pinning gen-crd-api-reference-docs to an unreachable commit. But Go
rejects `go install <module>/...@latest` (and `go get`) for any module
whose go.mod contains replace or exclude directives, so installing the
server from source was broken even though `make build` of a clone was
fine.

tektoncd/pipeline v1.13.1 now requires a fetchable version of that
dependency (fixed upstream in tektoncd/pipeline#9999), so the
workaround is obsolete. Remove it and add a regression test that fails
if a replace or exclude directive is reintroduced into go.mod.

Fixes containers#1231

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Marc Nuri <marc@marcnuri.com>
matzew pushed a commit that referenced this pull request Jun 29, 2026
The replace directive added in #1145 worked around tektoncd/pipeline
pinning gen-crd-api-reference-docs to an unreachable commit. But Go
rejects `go install <module>/...@latest` (and `go get`) for any module
whose go.mod contains replace or exclude directives, so installing the
server from source was broken even though `make build` of a clone was
fine.

tektoncd/pipeline v1.13.1 now requires a fetchable version of that
dependency (fixed upstream in tektoncd/pipeline#9999), so the
workaround is obsolete. Remove it and add a regression test that fails
if a replace or exclude directive is reintroduced into go.mod.

Fixes #1231

Signed-off-by: Marc Nuri <marc@marcnuri.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant