Skip to content

Drop k8s third_party deps now that HEAD is updated - #1480

Merged
Benjamin Elder (BenTheElder) merged 10 commits into
agent-substrate:mainfrom
thockin:dv_update_to_head
Sep 5, 2026
Merged

Drop k8s third_party deps now that HEAD is updated#1480
Benjamin Elder (BenTheElder) merged 10 commits into
agent-substrate:mainfrom
thockin:dv_update_to_head

Conversation

@thockin

@thockin Tim Hockin (thockin) commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

The changes we need are live on HEAD of the k8s published repos. It was a bit of a journey, since Go fought me all the way.


Drop our third_party fork of k8s deps in tools

The changes we need are released now (sort of - on HEAD anyway).

Bump k8s.io/streaming to v0.37.0 (not rc) in tools


Bump codegen deps to HEAD in tools

GOPROXY=direct go get \
    k8s.io/apimachinery@master \
    k8s.io/code-generator@master

This pins them to HEAD of master.  Go is terrible here: The HEAD is not
actually tagged, so Go just uses the next "reachable" tag which is
v0.36.0-alpha.  The datestamp is correct, though.

Drop our third_party fork of k8s deps in root

The changes we need are released now (sort of - on HEAD anyway).

Bump k8s deps to v0.37.0 (not rc) in root


Bump apimachinery dep in root to HEAD in root

GOPROXY=direct go mod edit -replace k8s.io/apimachinery=k8s.io/apimachinery@master
GOPROXY=direct go mod tidy
GOPROXY=direct go mod vendor
GOPROXY=direct go mod tidy

This approach (-replace) is needed because Go is horrible here.

The master branch of k8s.io/apimachinery is not tagged, per se, but
there is an OLDER tag which is "reachable" from HEAD.  So go helpfully
decides to use that (v0.36.0-alpha.2).  If we just `go get ... @master`
it works for that dep (pinned to the right date) but then it looks at
transitive deps.  Because the tag seems to be 0.36 (older), it
recalculates all the OTHER dependencies and downgrades a whole tangle of
things to versions that match 0.36, but we are ACTUALLY on 0.37+.

This was the only approach that I (and Gemini) could find.  Blech.

Run updated codegens


Use DV's new maxBytes capability for []byte

Removes 1 custom.

The changes we need are released now (sort of - on HEAD anyway).
GOPROXY=direct go get \
    k8s.io/apimachinery@master \
    k8s.io/code-generator@master

This pins them to HEAD of master.  Go is terrible here: The HEAD is not
actually tagged, so Go just uses the next "reachable" tag which is
v0.36.0-alpha.  The datestamp is correct, though.
The changes we need are released now (sort of - on HEAD anyway).
GOPROXY=direct go mod edit -replace k8s.io/apimachinery=k8s.io/apimachinery@master
GOPROXY=direct go mod tidy
GOPROXY=direct go mod vendor
GOPROXY=direct go mod tidy

This approach (-replace) is needed because Go is horrible here.

The master branch of k8s.io/apimachinery is not tagged, per se, but
there is an OLDER tag which is "reachable" from HEAD.  So go helpfully
decides to use that (v0.36.0-alpha.2).  If we just `go get ... @master`
it works for that dep (pinned to the right date) but then it looks at
transitive deps.  Because the tag seems to be 0.36 (older), it
recalculates all the OTHER dependencies and downgrades a whole tangle of
things to versions that match 0.36, but we are ACTUALLY on 0.37+.

This was the only approach that I (and Gemini) could find.  Blech.
@BenTheElder

Copy link
Copy Markdown
Collaborator

I think you need to regenerate the license folder / manually fix it, to drop the dead third_party licenses

k8s.io/apimachinery v0.37.0-rc.0 // indirect
k8s.io/code-generator v0.37.0-rc.0 // indirect
k8s.io/apimachinery v0.36.0-alpha.2.0.20260904054801-5a60cf1c6b81 // indirect
k8s.io/code-generator v0.30.0-alpha.3.0.20260904060942-0cddac4383e4 // indirect

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's weird, we should have at least v0.37.0-alpha ?? I wonder if the generators are failing to sync. not super important at the moment but ...

we can check with Davanum Srinivas (@dims) later

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The datestamps are right but we don't tag on main and git's notion of "reachable" is not human-oriented

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,15 @@
ISC License

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to start enforcing a license allowlist at some point

I double checked, ISC is on the list (also I assume k8s is already using it anyhow, but k8s also has some exceptions I think)

https://github.com/cncf/foundation/blob/main/policies-guidance/allowed-third-party-license-policy.md

@thockin

Copy link
Copy Markdown
Collaborator Author

green

@BenTheElder
Benjamin Elder (BenTheElder) merged commit 2fcfa64 into agent-substrate:main Sep 5, 2026
11 of 13 checks passed
Max Smythe (maxsmythe) pushed a commit that referenced this pull request Sep 5, 2026
`main` is red since #1480 merged: its regenerated
`cmd/ateapi/internal/controlapi/zz_generated.validation.go` was produced
by a stale generator build and references `deepEqualImpl_`, which
doesn't exist — `cmd/ateapi` (and everything importing `controlapi`)
fails to compile, and every open PR inherits the failure through CI's
merge-with-main (see #1512's `run-tests` for an example, and `main`'s
own post-merge `pr-workflow` runs for #1480/#1499).

Fix is a pure regeneration: `hack/update/codegen.sh` on current `main`
changes exactly one line, `deepEqualImpl_` → `ateDeepEqual` (the helper
the current generator actually emits). After it, `go build
./cmd/ateapi/...` succeeds and `go test
./cmd/ateapi/internal/controlapi/` passes.

No hand-written changes — the diff is generator output only.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.

3 participants