From 00fdec0a17d1aa1ec5b8a551ea0761bac6f73dbf Mon Sep 17 00:00:00 2001 From: Guillermo Gaston Date: Tue, 5 Dec 2023 16:09:28 +0000 Subject: [PATCH] Fix kubeadm bootstrap prefix in release notes --- hack/tools/release/notes/main.go | 2 +- .../release/notes/release_notes_integration_test.go | 11 +++++++---- hack/tools/release/notes/test/golden/v1.5.0.md | 10 +++++----- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/hack/tools/release/notes/main.go b/hack/tools/release/notes/main.go index d4163c6ae2d0..eeeed683e93d 100644 --- a/hack/tools/release/notes/main.go +++ b/hack/tools/release/notes/main.go @@ -88,7 +88,7 @@ var ( "clusterresourceset": "ClusterResourceSet", "machinedeployment": "MachineDeployment", "ipam": "IPAM", - "provider/bootstrap-kubeadm": "CAPBK", + "provider/bootstrap-kubeadm": "CABPK", "provider/infrastructure-in-memory": "CAPIM", "provider/core": "Core", "runtime-sdk": "Runtime SDK", diff --git a/hack/tools/release/notes/release_notes_integration_test.go b/hack/tools/release/notes/release_notes_integration_test.go index 457f1d19fcf8..52f814737bc5 100644 --- a/hack/tools/release/notes/release_notes_integration_test.go +++ b/hack/tools/release/notes/release_notes_integration_test.go @@ -35,6 +35,7 @@ func TestReleaseNotesIntegration(t *testing.T) { name string previousRelease string releaseBranchForTest string + head string expected string }{ { @@ -44,6 +45,7 @@ func TestReleaseNotesIntegration(t *testing.T) { name: "new patch", previousRelease: "v1.3.9", releaseBranchForTest: "release-1.3", + head: "release-1.3", expected: "test/golden/v1.3.10.md", }, { @@ -55,13 +57,14 @@ func TestReleaseNotesIntegration(t *testing.T) { // it represents accurately the HEAD of release-1.5 when we released v1.5.0. name: "new minor", previousRelease: "v1.4.0", - releaseBranchForTest: "v1.5.0", + releaseBranchForTest: "v1.5.0-integration-test", + head: "v1.5.0", expected: "test/golden/v1.5.0.md", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - setupNotesTest(t, tc.previousRelease, tc.releaseBranchForTest) + setupNotesTest(t, tc.previousRelease, tc.releaseBranchForTest, tc.head) g := NewWithT(t) expectedOutput, err := os.ReadFile(tc.expected) @@ -104,7 +107,7 @@ func runReleaseNotesCmd() error { return nil } -func setupNotesTest(tb testing.TB, previousRelease, releaseBranchForTest string) { +func setupNotesTest(tb testing.TB, previousRelease, releaseBranchForTest, head string) { g := NewWithT(tb) _, err := os.Stat(releaseBranchForTest) @@ -114,7 +117,7 @@ func setupNotesTest(tb testing.TB, previousRelease, releaseBranchForTest string) g.Expect(err).To(Succeed()) } - pull := exec.Command("git", "pull", "upstream", releaseBranchForTest) + pull := exec.Command("git", "checkout", head) pull.Dir = releaseBranchForTest runCommand(tb, pull) diff --git a/hack/tools/release/notes/test/golden/v1.5.0.md b/hack/tools/release/notes/test/golden/v1.5.0.md index 714da8a229cb..256b5a723471 100644 --- a/hack/tools/release/notes/test/golden/v1.5.0.md +++ b/hack/tools/release/notes/test/golden/v1.5.0.md @@ -29,7 +29,7 @@ REPLACE ME: A couple sentences describing the deprecation, including links to do - Dependency: Bump to CR v0.15.0 (#8007) ## :sparkles: New Features -- CAPBK: Use caching read for bootstrap config owner (#8867) +- CABPK: Use caching read for bootstrap config owner (#8867) - CAPIM: Enable Kubernetes upgrades in CAPIM (#8938) - ClusterClass: Add support or concurrent MD upgrades in classy clusters (#8432) - ClusterClass: Add webhook warning for missing ClusterClass (#8746) @@ -52,8 +52,8 @@ REPLACE ME: A couple sentences describing the deprecation, including links to do ## :bug: Bug Fixes - API: All: only set finalizers if deletionTimestamp is not set (#8949) - API: Ensure ownerReference apiVersions are always up to date (#8256) -- CAPBK: Ignition: start kubeadm after network.target (#8772) -- CAPBK: Set uninitialized taint only on worker nodes (#8358) +- CABPK: Ignition: start kubeadm after network.target (#8772) +- CABPK: Set uninitialized taint only on worker nodes (#8358) - CAPD: Add kind mapper (#8880) - CAPD: Change the haproxy entrypoint to prevent getting stopped immediately after start (#8685) - CAPD: Delegate CAPD port selection to the container runtime (#8642) @@ -120,7 +120,7 @@ REPLACE ME: A couple sentences describing the deprecation, including links to do ## :seedling: Others - API: Deprecate v1alpha3 and v1alpha4 in CRDs (#8687) -- CAPBK: Replace reflect deepequal in bootstrap kubeadm (#8266) +- CABPK: Replace reflect deepequal in bootstrap kubeadm (#8266) - CAPD: Automatically set kubelet args for capd (#8881) - CAPD: Only ignore necessary kubeadm preflight errors (#7911) - CAPIM: Add ClusterClass support for in-memory provider (#8807) @@ -271,7 +271,7 @@ REPLACE ME: A couple sentences describing the deprecation, including links to do - MachineDeployment: Drop the first return value from FindOldMachineSets (#8415) - MachineSet: Add MachineFinalizer during machine computation (#8463) - MachineSet: Surface failed preflight checks on MachineSet in `MachinesCreated` condition (#8669) -- MULTIPLE_AREAS[ClusterCacheTracker/KCP/CAPBK]: Cache secrets in KCP, CABPK and ClusterCacheTracker (#8940) +- MULTIPLE_AREAS[ClusterCacheTracker/KCP/CABPK]: Cache secrets in KCP, CABPK and ClusterCacheTracker (#8940) - Release: Add area label lookup for prefixes to release notes tool (#8780) - Release: Add runtime extension components to release (#8438) - Release: Bump kpromo to v3.5.1 (#8301)