You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update the dependency guide for the pin cleanup
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
Copy file name to clipboardExpand all lines: docs/dependency-updates.md
+7-9Lines changed: 7 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,8 +107,9 @@ under `tests/e2e/scenarios/`, and small modules under `tools/`. Points to know:
107
107
- The root module holds the `vendor/` tree and any `replace` directives.
108
108
-`hack/go.mod` uses a Go `tool` directive block to pin the lint/codegen tooling.
109
109
-`tests/e2e/go.mod` carries a `replace` pointing at the repo root, so it tracks local changes.
110
-
- Some of the small `tools/` modules have **no `replace` back to the root**, so they resolve the
111
-
published `k8s.io/kops` from the module proxy and do not see local changes.
110
+
- The small modules under `tools/` that import `k8s.io/kops` also carry a `replace` to the root. If
111
+
you add a module that imports the root, give it one too, or it will silently compile against the
112
+
last published release instead of this tree.
112
113
113
114
### Recipe
114
115
@@ -203,15 +204,15 @@ Versions pinned as literals instead, each needing a hand edit:
203
204
204
205
| File | Pin |
205
206
|---|---|
206
-
|`Makefile`|`CODEGEN_VERSION` (see [Go modules](#go-modules)) and the `ko` version in the `KO` variable|
207
+
|`Makefile`|`CODEGEN_VERSION` (see [Go modules](#go-modules)) and `KO_VERSION`, which the `hack/` and `discovery/` scripts read back out of the Makefile rather than repeating|
207
208
|`hack/verify-shellcheck.sh`|`SHELLCHECK_VERSION`**and**`SHELLCHECK_IMAGE`, which carries both a tag and a digest — a comment in the file says to keep them in sync, and all three values change together |
208
209
|`hack/verify-terraform.sh`|`TF_TAG`|
209
-
|`hack/{verify,update}-gofumpt.sh`| a `go install mvdan.cc/gofumpt@<version>` line in each |
210
210
|`clusterapi/gen.go`| a `go run sigs.k8s.io/controller-tools/cmd/controller-gen@<version>` line |
211
211
|`images/mkdocs/requirements.txt`| the mkdocs Python packages — see [Miscellaneous](#miscellaneous-surfaces)|
212
212
213
-
Some tool invocations use `@latest` and are therefore not reproducible. Treat these as known debt:
214
-
do not "bump" them, and do not convert them to pins as a side effect of an unrelated change.
213
+
Do not introduce `@latest` in a `go run` or `go install` invocation — it makes the build
214
+
irreproducible and lets an upstream release break the repo with no local commit. Pin the version, or
215
+
better, run the tool out of the `hack` module so there is one pin.
215
216
216
217
## GitHub Actions
217
218
@@ -583,9 +584,6 @@ Each Prow check is its own job invoking a single make target (`pull-kops-verify-
583
584
`make verify-gomod`, and so on); `pull-kops-verify-generated` runs `make verify-generate`, which
584
585
resolves to just `verify-crds`. `make ci` is the closest single local approximation to the union.
585
586
586
-
One gap: `hack/verify-gofumpt.sh` is wired into no `make` target and is run by no job in either
0 commit comments