From 4fff8399eaefe2daa404347eee6805e4c1c73266 Mon Sep 17 00:00:00 2001 From: Katrina Verey Date: Thu, 2 Feb 2023 11:07:54 -0500 Subject: [PATCH 1/8] Update releasing instructions --- README.md | 2 +- cmd/gorepomod/internal/edit/editor.go | 2 + releasing/README.md | 92 +++++++++++---------------- 3 files changed, 41 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index bcd439bf6..935e73cd4 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ This tool is sponsored by [sig-cli] ([KEP]). ## kubectl integration -To find the kustomize version embedded in recently version of kubectl, run `kubectl version`: +To find the kustomize version embedded in recent versions of kubectl, run `kubectl version`: ```sh > kubectl version --short --client diff --git a/cmd/gorepomod/internal/edit/editor.go b/cmd/gorepomod/internal/edit/editor.go index f39238288..5e42e9434 100644 --- a/cmd/gorepomod/internal/edit/editor.go +++ b/cmd/gorepomod/internal/edit/editor.go @@ -57,6 +57,8 @@ func (e *Editor) Tidy() error { func (e *Editor) Pin(target misc.LaModule, oldV, newV semver.SemVer) error { err := e.run( "edit", + "-dropreplace="+target.ImportPath(), + "-dropreplace="+target.ImportPath()+"@"+oldV.String(), "-require="+target.ImportPath()+"@"+newV.String(), ) if err != nil { diff --git a/releasing/README.md b/releasing/README.md index b79309b58..fd74db393 100644 --- a/releasing/README.md +++ b/releasing/README.md @@ -73,6 +73,9 @@ We use the `release-blocker` tag to track issues that need to be solved before t It is also a good idea to scan any [untriaged issues](https://github.com/kubernetes-sigs/kustomize/issues?q=is%3Aissue+is%3Aopen+label%3Aneeds-triage) for potential blockers we haven't labelled yet before proceeding. ### Consider fetching new OpenAPI data + +Ideally, Kustomize's embedded openapi data would cover a wide range of Kubernetes releases. But today, we only embed a specific version. This means updating that version can be disruptive to people who still use older Kubernetes versions and depend on API versions that were removed in later releases. However, by remaining out of date, we will not support GVKs introduced in more recent releases. So far, we have leaned in favour of the older versions, because some removed GVs are for very popular APIs. This should be constaintly reevaluated until a better solution is in place. See issue https://github.com/kubernetes-sigs/kustomize/issues/5016. + The Kubernetes OpenAPI data changes no more frequently than once per quarter. You can check the current builtin versions that kustomize is using with the following command. @@ -105,10 +108,7 @@ source releasing/helpers.sh #### Authenticate to github using [gh](https://github.com/cli/cli) (version [1.8.1](https://github.com/cli/cli/releases/tag/v1.8.1) or higher). ``` -# Use your own token -GITHUB_TOKEN=deadbeefdeadbeef - -echo $GITHUB_TOKEN | gh auth login --scopes repo --with-token +gh auth login ``` ## Release `kyaml` @@ -174,20 +174,9 @@ createBranch pinToKyaml "Update kyaml to $versionKyaml" createPr ``` -Run local tests while GH runs tests in the cloud: -``` -testKustomizeRepo -``` +Review the resulting PR and get a collaborator to LGTM. Wait for CI to pass. -Wait for tests to pass, then merge the PR: -``` -gh pr status -``` -``` -gh pr merge -m -``` - -Get back on master and do paranoia test: +Once the PR merges, get back on master and do paranoia test: ``` refreshMaster && testKustomizeRepo @@ -238,20 +227,9 @@ createBranch pinToCmdConfig "Update cmd/config to $versionCmdConfig" && createPr ``` -Run local tests while GH runs tests in the cloud: -``` -testKustomizeRepo -``` +Review the resulting PR and get a collaborator to LGTM. Wait for CI to pass. -Wait for tests to pass, then merge the PR: -``` -gh pr status # rinse, repeat -``` -``` -gh pr merge -m -``` - -Get back on master and do paranoia test: +Once the PR merges, get back on master and do paranoia test: ``` refreshMaster && testKustomizeRepo @@ -287,6 +265,14 @@ Undraft the release on the [kustomize repo release page]: ## Release the kustomize CLI +#### For major releases: increment the module version + +Update `module sigs.k8s.io/kustomize/kustomize/vX` in `kustomize/go.mod` to the version you're about to release, and then update all the `require` statements across the module to match. + +Search for uses of the version number across the codebase and update them as needed. + +Example: https://github.com/kubernetes-sigs/kustomize/pull/5021 + #### Pin to the new API ``` @@ -299,20 +285,9 @@ createBranch pinToApi "Update api to $versionApi" && createPr ``` -Run local tests while GH runs tests in the cloud: -``` -testKustomizeRepo -``` +Review the resulting PR and get a collaborator to LGTM. Wait for CI to pass. -Wait for tests to pass, then merge the PR: -``` -gh pr status # rinse, repeat -``` -``` -gh pr merge -m -``` - -Get back on master and do paranoia test: +Once the PR merges, get back on master and do paranoia test: ``` refreshMaster && testKustomizeRepo @@ -351,29 +326,38 @@ Undraft the release on the [kustomize repo release page]: * Visit the [release page] and edit the release notes as desired. -## Update example test target +## Return the repo to development mode + +Go back into development mode, where all modules depend on in-repo code: + +``` +gorepomod unpin api --doIt && +gorepomod unpin cmd/config --doIt && +gorepomod unpin kyaml --doIt +``` [Makefile]: https://github.com/kubernetes-sigs/kustomize/blob/master/Makefile Edit the `prow-presubmit-target` in the [Makefile] -to test examples against your new release. +to test examples against your new release. For example: ``` -sed -i "" "s/LATEST_V4_RELEASE=.*/LATEST_V4_RELEASE=v4.3.0/" Makefile +sed -i "" "s/LATEST_V5_RELEASE=.*/LATEST_V5_RELEASE=v4.3.0/" Makefile ``` + +Create the PR: ``` -createBranch updateProwExamplesTarget "Test examples against latest release" && +createBranch unpinEverything "Back to development mode; unpin the modules" && createPr ``` -Wait for tests to pass, then merge the PR: -``` -gh pr status # rinse, repeat -``` -``` -gh pr merge -m -``` +Review the resulting PR and get a collaborator to LGTM. Wait for CI to pass. +Once the PR merges, get back on master and do paranoia test: +``` +refreshMaster && +testKustomizeRepo +``` ## Publish Official Docker Image From 8b51c295a1e87fedf43c712adaf81678eaa15409 Mon Sep 17 00:00:00 2001 From: Katrina Verey Date: Thu, 2 Feb 2023 11:33:46 -0500 Subject: [PATCH 2/8] Allow gorepomod to update plugin mod files --- cmd/gorepomod/internal/arguments/args.go | 1 - cmd/gorepomod/internal/repo/dotgitdata.go | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/gorepomod/internal/arguments/args.go b/cmd/gorepomod/internal/arguments/args.go index 43548c6ee..2051bb855 100644 --- a/cmd/gorepomod/internal/arguments/args.go +++ b/cmd/gorepomod/internal/arguments/args.go @@ -36,7 +36,6 @@ var ( "docs", "examples", "hack", - "plugin", "releasing", "site", } diff --git a/cmd/gorepomod/internal/repo/dotgitdata.go b/cmd/gorepomod/internal/repo/dotgitdata.go index 2127ae2d8..157753964 100644 --- a/cmd/gorepomod/internal/repo/dotgitdata.go +++ b/cmd/gorepomod/internal/repo/dotgitdata.go @@ -45,8 +45,9 @@ func (dg *DotGitData) AbsPath() string { // NewDotGitDataFromPath wants the incoming path to hold dotGit // E.g. -// ~/gopath/src/sigs.k8s.io/kustomize -// ~/gopath/src/github.com/monopole/gorepomod +// +// ~/gopath/src/sigs.k8s.io/kustomize +// ~/gopath/src/github.com/monopole/gorepomod func NewDotGitDataFromPath(path string) (*DotGitData, error) { if !utils.DirExists(filepath.Join(path, dotGitFileName)) { return nil, fmt.Errorf( @@ -126,7 +127,7 @@ func (dg *DotGitData) checkModules(modules []*protoModule) error { } } else { // Do the relative path and short name make sense? - if !strings.HasSuffix(pm.PathToGoMod(), string(shortName)) { + if !strings.HasPrefix(string(shortName), "plugin/") && !strings.HasSuffix(pm.PathToGoMod(), string(shortName)) { return fmt.Errorf( "in %q, the module name %q doesn't match the file's pathToGoMod %q", file, shortName, pm.PathToGoMod()) From 9a1a203b52c4872e3b76454830b4e2f094c287d8 Mon Sep 17 00:00:00 2001 From: Katrina Verey Date: Thu, 2 Feb 2023 12:28:37 -0500 Subject: [PATCH 3/8] Update example targets --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 591773813..b88496412 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # # Makefile for kustomize CLI and API. -LATEST_V4_RELEASE=v4.5.7 +LATEST_RELEASE=v5.0.0 SHELL := /usr/bin/env bash GOOS = $(shell go env GOOS) @@ -101,7 +101,7 @@ verify-kustomize-repo: \ build-non-plugin-all \ test-go-mod \ test-examples-kustomize-against-HEAD \ - test-examples-kustomize-against-v4-release + test-examples-kustomize-against-latest-release # The following target referenced by a file in # https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/kustomize @@ -112,7 +112,7 @@ prow-presubmit-check: \ test-go-mod \ build-non-plugin-all \ test-examples-kustomize-against-HEAD \ - test-examples-kustomize-against-v4-release + test-examples-kustomize-against-latest-release .PHONY: license license: $(MYGOBIN)/addlicense @@ -170,8 +170,8 @@ test-examples-kustomize-against-HEAD: $(MYGOBIN)/kustomize $(MYGOBIN)/mdrip ./hack/testExamplesAgainstKustomize.sh HEAD .PHONY: -test-examples-kustomize-against-v4-release: $(MYGOBIN)/mdrip - ./hack/testExamplesAgainstKustomize.sh v4@$(LATEST_V4_RELEASE) +test-examples-kustomize-against-latest-release: $(MYGOBIN)/mdrip + ./hack/testExamplesAgainstKustomize.sh v5@$(LATEST_RELEASE) # --- Cleanup targets --- From 03669a180458d0604f31a3ea5b96acadd8bc68a4 Mon Sep 17 00:00:00 2001 From: Katrina Verey Date: Thu, 2 Feb 2023 14:15:40 -0500 Subject: [PATCH 4/8] Improve error message and fix typo in iampolicygenerator module name --- cmd/gorepomod/internal/edit/editor.go | 2 +- plugin/builtin/iampolicygenerator/go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/gorepomod/internal/edit/editor.go b/cmd/gorepomod/internal/edit/editor.go index 5e42e9434..0db343565 100644 --- a/cmd/gorepomod/internal/edit/editor.go +++ b/cmd/gorepomod/internal/edit/editor.go @@ -34,7 +34,7 @@ func (e *Editor) run(args ...string) error { if e.doIt { out, err := c.CombinedOutput() if err != nil { - return fmt.Errorf("%s out=%q", err.Error(), out) + return fmt.Errorf("failed to run go mod command in %s: %s (stdout=%q)", e.module.ShortName(), err.Error(), out) } } else { fmt.Printf("in %-60s; %s\n", c.Dir, c.String()) diff --git a/plugin/builtin/iampolicygenerator/go.mod b/plugin/builtin/iampolicygenerator/go.mod index 97d703ce5..cef44267a 100644 --- a/plugin/builtin/iampolicygenerator/go.mod +++ b/plugin/builtin/iampolicygenerator/go.mod @@ -1,4 +1,4 @@ -module sigs.k8s.io/kustomize/plugin/builtin/iampolicypgenerator +module sigs.k8s.io/kustomize/plugin/builtin/iampolicygenerator go 1.19 From e6c16a6ddc379834b91d18428ae85bc31ce08a87 Mon Sep 17 00:00:00 2001 From: Katrina Verey Date: Thu, 2 Feb 2023 14:20:13 -0500 Subject: [PATCH 5/8] Restore previous test-go-mod and commit changes --- Makefile | 2 +- plugin/builtin/patchjson6902transformer/go.sum | 4 ++-- plugin/builtin/patchtransformer/go.sum | 4 ++-- plugin/builtin/prefixtransformer/go.sum | 4 ++-- plugin/builtin/replicacounttransformer/go.sum | 4 ++-- plugin/builtin/suffixtransformer/go.sum | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index b88496412..0e2e6a2c2 100644 --- a/Makefile +++ b/Makefile @@ -153,7 +153,7 @@ functions-examples-all: done test-go-mod: - ./hack/for-each-module.sh "\$$KUSTOMIZE_ROOT/hack/with-unpinned-kust-dev.sh 'go mod tidy -v'" + ./hack/for-each-module.sh "go mod tidy -v" .PHONY: verify-kustomize-e2e: $(MYGOBIN)/mdrip $(MYGOBIN)/kind diff --git a/plugin/builtin/patchjson6902transformer/go.sum b/plugin/builtin/patchjson6902transformer/go.sum index 4044c1cb9..4b7ae6fd0 100644 --- a/plugin/builtin/patchjson6902transformer/go.sum +++ b/plugin/builtin/patchjson6902transformer/go.sum @@ -670,8 +670,8 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/kustomize/api v0.11.5 h1:vLDp++YAX7iy2y2CVPJNy9pk9CY8XaUKgHkjbVtnWag= sigs.k8s.io/kustomize/api v0.11.5/go.mod h1:2UDpxS6AonWXow2ZbySd4AjUxmdXLeTlvGBC46uSiq8= sigs.k8s.io/kustomize/kyaml v0.13.7/go.mod h1:6K+IUOuir3Y7nucPRAjw9yth04KSWBnP5pqUTGwj/qU= -sigs.k8s.io/kustomize/kyaml v0.13.9 h1:Qz53EAaFFANyNgyOEJbT/yoIHygK40/ZcvU3rgry2Tk= -sigs.k8s.io/kustomize/kyaml v0.13.9/go.mod h1:QsRbD0/KcU+wdk0/L0fIp2KLnohkVzs6fQ85/nOXac4= +sigs.k8s.io/kustomize/kyaml v0.14.0 h1:uzH0MzMtYypHW09LbMDk8k/lT/LSsUuCoZIuEGhIBNE= +sigs.k8s.io/kustomize/kyaml v0.14.0/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu6uHwonSF4= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/plugin/builtin/patchtransformer/go.sum b/plugin/builtin/patchtransformer/go.sum index 4044c1cb9..4b7ae6fd0 100644 --- a/plugin/builtin/patchtransformer/go.sum +++ b/plugin/builtin/patchtransformer/go.sum @@ -670,8 +670,8 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/kustomize/api v0.11.5 h1:vLDp++YAX7iy2y2CVPJNy9pk9CY8XaUKgHkjbVtnWag= sigs.k8s.io/kustomize/api v0.11.5/go.mod h1:2UDpxS6AonWXow2ZbySd4AjUxmdXLeTlvGBC46uSiq8= sigs.k8s.io/kustomize/kyaml v0.13.7/go.mod h1:6K+IUOuir3Y7nucPRAjw9yth04KSWBnP5pqUTGwj/qU= -sigs.k8s.io/kustomize/kyaml v0.13.9 h1:Qz53EAaFFANyNgyOEJbT/yoIHygK40/ZcvU3rgry2Tk= -sigs.k8s.io/kustomize/kyaml v0.13.9/go.mod h1:QsRbD0/KcU+wdk0/L0fIp2KLnohkVzs6fQ85/nOXac4= +sigs.k8s.io/kustomize/kyaml v0.14.0 h1:uzH0MzMtYypHW09LbMDk8k/lT/LSsUuCoZIuEGhIBNE= +sigs.k8s.io/kustomize/kyaml v0.14.0/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu6uHwonSF4= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/plugin/builtin/prefixtransformer/go.sum b/plugin/builtin/prefixtransformer/go.sum index 4044c1cb9..4b7ae6fd0 100644 --- a/plugin/builtin/prefixtransformer/go.sum +++ b/plugin/builtin/prefixtransformer/go.sum @@ -670,8 +670,8 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/kustomize/api v0.11.5 h1:vLDp++YAX7iy2y2CVPJNy9pk9CY8XaUKgHkjbVtnWag= sigs.k8s.io/kustomize/api v0.11.5/go.mod h1:2UDpxS6AonWXow2ZbySd4AjUxmdXLeTlvGBC46uSiq8= sigs.k8s.io/kustomize/kyaml v0.13.7/go.mod h1:6K+IUOuir3Y7nucPRAjw9yth04KSWBnP5pqUTGwj/qU= -sigs.k8s.io/kustomize/kyaml v0.13.9 h1:Qz53EAaFFANyNgyOEJbT/yoIHygK40/ZcvU3rgry2Tk= -sigs.k8s.io/kustomize/kyaml v0.13.9/go.mod h1:QsRbD0/KcU+wdk0/L0fIp2KLnohkVzs6fQ85/nOXac4= +sigs.k8s.io/kustomize/kyaml v0.14.0 h1:uzH0MzMtYypHW09LbMDk8k/lT/LSsUuCoZIuEGhIBNE= +sigs.k8s.io/kustomize/kyaml v0.14.0/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu6uHwonSF4= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/plugin/builtin/replicacounttransformer/go.sum b/plugin/builtin/replicacounttransformer/go.sum index 4044c1cb9..4b7ae6fd0 100644 --- a/plugin/builtin/replicacounttransformer/go.sum +++ b/plugin/builtin/replicacounttransformer/go.sum @@ -670,8 +670,8 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/kustomize/api v0.11.5 h1:vLDp++YAX7iy2y2CVPJNy9pk9CY8XaUKgHkjbVtnWag= sigs.k8s.io/kustomize/api v0.11.5/go.mod h1:2UDpxS6AonWXow2ZbySd4AjUxmdXLeTlvGBC46uSiq8= sigs.k8s.io/kustomize/kyaml v0.13.7/go.mod h1:6K+IUOuir3Y7nucPRAjw9yth04KSWBnP5pqUTGwj/qU= -sigs.k8s.io/kustomize/kyaml v0.13.9 h1:Qz53EAaFFANyNgyOEJbT/yoIHygK40/ZcvU3rgry2Tk= -sigs.k8s.io/kustomize/kyaml v0.13.9/go.mod h1:QsRbD0/KcU+wdk0/L0fIp2KLnohkVzs6fQ85/nOXac4= +sigs.k8s.io/kustomize/kyaml v0.14.0 h1:uzH0MzMtYypHW09LbMDk8k/lT/LSsUuCoZIuEGhIBNE= +sigs.k8s.io/kustomize/kyaml v0.14.0/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu6uHwonSF4= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= diff --git a/plugin/builtin/suffixtransformer/go.sum b/plugin/builtin/suffixtransformer/go.sum index 4044c1cb9..4b7ae6fd0 100644 --- a/plugin/builtin/suffixtransformer/go.sum +++ b/plugin/builtin/suffixtransformer/go.sum @@ -670,8 +670,8 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/kustomize/api v0.11.5 h1:vLDp++YAX7iy2y2CVPJNy9pk9CY8XaUKgHkjbVtnWag= sigs.k8s.io/kustomize/api v0.11.5/go.mod h1:2UDpxS6AonWXow2ZbySd4AjUxmdXLeTlvGBC46uSiq8= sigs.k8s.io/kustomize/kyaml v0.13.7/go.mod h1:6K+IUOuir3Y7nucPRAjw9yth04KSWBnP5pqUTGwj/qU= -sigs.k8s.io/kustomize/kyaml v0.13.9 h1:Qz53EAaFFANyNgyOEJbT/yoIHygK40/ZcvU3rgry2Tk= -sigs.k8s.io/kustomize/kyaml v0.13.9/go.mod h1:QsRbD0/KcU+wdk0/L0fIp2KLnohkVzs6fQ85/nOXac4= +sigs.k8s.io/kustomize/kyaml v0.14.0 h1:uzH0MzMtYypHW09LbMDk8k/lT/LSsUuCoZIuEGhIBNE= +sigs.k8s.io/kustomize/kyaml v0.14.0/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu6uHwonSF4= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= From 9c116e9031c8709aa354f2d91da7bf246870a66b Mon Sep 17 00:00:00 2001 From: Katrina Verey Date: Thu, 2 Feb 2023 14:23:23 -0500 Subject: [PATCH 6/8] Bespoke mod edits no longer needed if gorepomod pins all modules --- releasing/README.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/releasing/README.md b/releasing/README.md index fd74db393..d88bcf157 100644 --- a/releasing/README.md +++ b/releasing/README.md @@ -158,12 +158,7 @@ Undraft the release on the [kustomize repo release page]: #### Pin to the most recent kyaml ``` -gorepomod pin kyaml --doIt && -go mod edit -require=sigs.k8s.io/kustomize/kyaml@$versionKyaml plugin/builtin/prefixtransformer/go.mod && -go mod edit -require=sigs.k8s.io/kustomize/kyaml@$versionKyaml plugin/builtin/suffixtransformer/go.mod && -go mod edit -require=sigs.k8s.io/kustomize/kyaml@$versionKyaml plugin/builtin/replicacounttransformer/go.mod && -go mod edit -require=sigs.k8s.io/kustomize/kyaml@$versionKyaml plugin/builtin/patchtransformer/go.mod && -go mod edit -require=sigs.k8s.io/kustomize/kyaml@$versionKyaml plugin/builtin/patchjson6902transformer/go.mod +gorepomod pin kyaml --doIt ``` Create the PR: From 57d858388761fb6cf079cd8dd275470aff834c6c Mon Sep 17 00:00:00 2001 From: Katrina Verey Date: Thu, 2 Feb 2023 14:25:20 -0500 Subject: [PATCH 7/8] Fix lint errors --- cmd/gorepomod/internal/edit/editor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/gorepomod/internal/edit/editor.go b/cmd/gorepomod/internal/edit/editor.go index 0db343565..f0685d709 100644 --- a/cmd/gorepomod/internal/edit/editor.go +++ b/cmd/gorepomod/internal/edit/editor.go @@ -34,7 +34,7 @@ func (e *Editor) run(args ...string) error { if e.doIt { out, err := c.CombinedOutput() if err != nil { - return fmt.Errorf("failed to run go mod command in %s: %s (stdout=%q)", e.module.ShortName(), err.Error(), out) + return fmt.Errorf("failed to run go mod command in %s: %w (stdout=%q)", e.module.ShortName(), err, out) } } else { fmt.Printf("in %-60s; %s\n", c.Dir, c.String()) From 63c37b178037be1452b0f39459eace8726c556be Mon Sep 17 00:00:00 2001 From: Katrina Verey Date: Mon, 6 Feb 2023 16:49:19 -0500 Subject: [PATCH 8/8] Update releasing/README.md Co-authored-by: Cailyn --- releasing/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releasing/README.md b/releasing/README.md index d88bcf157..d3fd95f90 100644 --- a/releasing/README.md +++ b/releasing/README.md @@ -74,7 +74,7 @@ It is also a good idea to scan any [untriaged issues](https://github.com/kuberne ### Consider fetching new OpenAPI data -Ideally, Kustomize's embedded openapi data would cover a wide range of Kubernetes releases. But today, we only embed a specific version. This means updating that version can be disruptive to people who still use older Kubernetes versions and depend on API versions that were removed in later releases. However, by remaining out of date, we will not support GVKs introduced in more recent releases. So far, we have leaned in favour of the older versions, because some removed GVs are for very popular APIs. This should be constaintly reevaluated until a better solution is in place. See issue https://github.com/kubernetes-sigs/kustomize/issues/5016. +Ideally, Kustomize's embedded openapi data would cover a wide range of Kubernetes releases. But today, we only embed a specific version. This means updating that version can be disruptive to people who still use older Kubernetes versions and depend on API versions that were removed in later releases. However, by remaining out of date, we will not support GVKs introduced in more recent releases. So far, we have leaned in favour of the older versions, because some removed GVs are for very popular APIs. This should be constantly reevaluated until a better solution is in place. See issue https://github.com/kubernetes-sigs/kustomize/issues/5016. The Kubernetes OpenAPI data changes no more frequently than once per quarter. You can check the current builtin versions that kustomize is using with the