Skip to content

docs: add third-party dependency update guide for agents - #18749

Open
rifelpet wants to merge 7 commits into
kubernetes:masterfrom
rifelpet:dep-updates-agents
Open

docs: add third-party dependency update guide for agents#18749
rifelpet wants to merge 7 commits into
kubernetes:masterfrom
rifelpet:dep-updates-agents

Conversation

@rifelpet

Copy link
Copy Markdown
Member

What this PR does / why we need it:

Adds docs/dependency-updates.md, a reference for updating the third-party dependencies kOps pins, aimed at automated agents, plus a pointer to it from AGENTS.md (mirroring how docs/e2e-failure-troubleshooting.md is wired up).

kOps pins third-party versions across a lot of unrelated places, and most of them have coupled files that must change in the same PR. Dependabot covers only the github-actions ecosystem, so everything else is a manual change. This documents each surface: the file holding the version, the files coupled to it, the regeneration command, and the verification command.

Two mechanisms are documented up front because nearly every recipe ends in one of them:

  • pkg/assets/assetdata/ — a version bumped without a matching hash entry compiles fine and fails at kops update cluster time.
  • hack/update-expected.sh — golden-file regeneration, including that it never deletes stale goldens and that a diff touching only the addon manifest means it wasn't actually run.

It also captures the commit/PR conventions these changes follow (the bump/regeneration commit split, cherry-pick expectations) and the failure modes that have cost past dependency PRs — for example that AWS load balancer controller, CSI, and Karpenter bumps usually need a matching pkg/model/iam/iam_builder.go change.

References are deliberately generic — no line numbers or specific version strings — so the document does not go stale as pins move.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Draft, opened for feedback on scope and placement before polishing.

Docs-only; no code or generated output changes.

The content was derived from reading the current pinning surfaces and the last 12 months of merged dependency PRs. A couple of pre-existing inconsistencies turned up while writing it (diverged pins of the same tool across scripts, a few stale docs). Those are deliberately left out of this guide, which describes only the steady state, and are worth handling separately.

Assisted by Claude Opus.

@kubernetes-prow

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubernetes-prow kubernetes-prow Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 25, 2026
@kubernetes-prow
kubernetes-prow Bot requested review from hakman and olemarkus August 25, 2026 18:27
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign rifelpet for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 25, 2026
@rifelpet

Copy link
Copy Markdown
Member Author

/hold for feedback

cc @hakman

@kubernetes-prow kubernetes-prow Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 25, 2026
Adds docs/dependency-updates.md, a reference for updating the third-party
dependencies kOps pins, aimed at automated agents.

Covers each pinning surface — Go modules and toolchain, build/lint tooling,
GitHub Actions, addon manifests, node components, etcd, Kubernetes version
support, OS images, and e2e scenario charts — naming for each the file that
holds the version, the files coupled to it, the regeneration command, and the
verification command.

Two mechanisms are documented up front because nearly every recipe ends in one
of them: pkg/assets/assetdata/, where a version bumped without a matching hash
fails at "kops update cluster" time rather than at compile time, and
hack/update-expected.sh for golden-file regeneration.

Also documents the commit and PR conventions these changes follow, and the
failure modes that have cost past dependency PRs.

References are kept generic — no line numbers or specific versions — so the
document stays accurate as pins move.
There is no pull-kops-verify job running `make verify`. Each Prow check is its
own job invoking a single make target, and pull-kops-verify-generated resolves
to just verify-crds.

The GitHub Actions quick-ci job and the Prow presubmits are complementary
rather than overlapping, so describe which verify targets each one actually
covers. Verified against test-infra/config/jobs/kubernetes/kops.
The guide said these header comments are frequently stale and told the reader
to fix the header to match the image tag. That is backwards.

The header records which upstream revision the manifest body was derived from.
Bumping a vendored addon is supposed to mean re-deriving the body from the new
release and moving the header with it, so the two staying in agreement is the
invariant. When they disagree the manifest has drifted and may be missing
upstream changes that shipped with the newer image.

Editing the header to match the image would assert a re-derivation that never
happened and destroy the only record of what the body corresponds to. Say to
re-derive instead, and warn against the shortcut.
The cleanup PRs changed several of the things this guide described:

- the gofumpt scripts were removed, so both mentions go
- the ko version is now single-sourced in the Makefile rather than repeated in
  two scripts
- the @latest invocations are pinned, so the "known debt, leave them alone"
  note becomes "do not introduce one"
- the tools module that imports k8s.io/kops now has a replace to the root
@rifelpet
rifelpet force-pushed the dep-updates-agents branch from cb2e7e5 to 9938852 Compare August 26, 2026 20:22
docs/contributing/vendoring.md described running make gomod and committing
vendor/, go.mod and go.sum together, and keeping the dependency PR separate
from feature work. All of that is in the Go modules section of the new
dependency guide, which additionally covers the nested modules, the k8s.io
staging set, the code-generator pin, and the verification commands.

Rather than maintain two descriptions of the same workflow, drop the older
one and its nav entry.
The old checklist was written for dep and Gopkg.toml, told the reader to
update the default Docker version, and pointed at kube-up scripts for the CNI
version and admission plugins. Most of its headings had no body.

Replace it with the recipe the recent commits actually follow. The key point
the old doc missed is that adding a minor is not one change: there is no
allowlist of Kubernetes versions, so support arrives as several independent
pull requests landing as each upstream artifact appears, while dropping the
oldest minor is one large sweep.

Point the dependency guide's Kubernetes section here rather than summarising
the same procedure twice, and drop its claim that adding a minor is only a
channel change.
The convention still holds; it does not need stating in the document.
@rifelpet
rifelpet marked this pull request as ready for review August 27, 2026 10:42
@kubernetes-prow kubernetes-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 27, 2026
@kubernetes-prow
kubernetes-prow Bot requested a review from zetaab August 27, 2026 10:45
@kubernetes-prow

Copy link
Copy Markdown
Contributor

@rifelpet: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kops-e2e-k8s-gce-ipalias 5eb2bb8 link true /test pull-kops-e2e-k8s-gce-ipalias

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant