From d06d7d155b1ff3b2e268c0d7e63f4d51a077e63d Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Fri, 15 Dec 2023 22:11:54 +0000 Subject: [PATCH 1/7] Add changelog for 1.12.5 --- CHANGELOG/CHANGELOG-1.12.md | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/CHANGELOG/CHANGELOG-1.12.md b/CHANGELOG/CHANGELOG-1.12.md index 186be8367..f7bc00eaa 100644 --- a/CHANGELOG/CHANGELOG-1.12.md +++ b/CHANGELOG/CHANGELOG-1.12.md @@ -1,3 +1,46 @@ +# v1.12.5 - Changelog since v1.12.4 + +## Changes by Kind + +### Other (Cleanup or Flake) + +- Update golang builder to 1.20.12 ([#1536](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/pull/1536), [@msau42](https://github.com/msau42)) + +### Uncategorized + +- Add --fallback-requisite-zones flag to allow disk provisioning to fallback to a default set of zones when there are an insufficient number of zones available in a passed in requisite topology in CreateVolume. ([#1542](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/pull/1542), [@k8s-infra-cherrypick-robot](https://github.com/k8s-infra-cherrypick-robot)) +- Properly wrap error from GCE Images.Get() API call, to fix a potential nil-ptr dereference ([#1515](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/pull/1515), [@k8s-infra-cherrypick-robot](https://github.com/k8s-infra-cherrypick-robot)) + +## Dependencies + +### Added +_Nothing has changed._ + +### Changed +_Nothing has changed._ + +### Removed +_Nothing has changed._ + +# v1.12.4 - Changelog since v1.12.3 + +## Changes by Kind + +### Uncategorized + +- Properly wrap error from GCE Images.Get() API call, to fix a potential nil-ptr dereference ([#1515](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/pull/1515), [@k8s-infra-cherrypick-robot](https://github.com/k8s-infra-cherrypick-robot)) + +## Dependencies + +### Added +_Nothing has changed._ + +### Changed +_Nothing has changed._ + +### Removed +_Nothing has changed._ + # v1.12.3 - Changelog since v1.12.2 ## Changes by Kind From bde502492306a5a6a251f73b328fb69cd15a2162 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Fri, 15 Dec 2023 22:12:20 +0000 Subject: [PATCH 2/7] Add changelog for 1.11.7 --- CHANGELOG/CHANGELOG-1.11.md | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/CHANGELOG/CHANGELOG-1.11.md b/CHANGELOG/CHANGELOG-1.11.md index d5623498e..c8994ae6c 100644 --- a/CHANGELOG/CHANGELOG-1.11.md +++ b/CHANGELOG/CHANGELOG-1.11.md @@ -1,3 +1,41 @@ +# v1.11.7 - Changelog since v1.11.6 + +## Changes by Kind + +### Uncategorized + +- Update golang builder to 1.20.12 ([#1540](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/pull/1540), [@k8s-infra-cherrypick-robot](https://github.com/k8s-infra-cherrypick-robot)) + +## Dependencies + +### Added +_Nothing has changed._ + +### Changed +_Nothing has changed._ + +### Removed +_Nothing has changed._ + +# v1.11.6 - Changelog since v1.11.5 + +## Changes by Kind + +### Uncategorized + +- Properly wrap error from GCE Images.Get() API call, to fix a potential nil-ptr dereference ([#1516](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/pull/1516), [@k8s-infra-cherrypick-robot](https://github.com/k8s-infra-cherrypick-robot)) + +## Dependencies + +### Added +_Nothing has changed._ + +### Changed +_Nothing has changed._ + +### Removed +_Nothing has changed._ + # v1.11.5 - Changelog since v1.11.4 ## Changes by Kind From 27c5098f69b177edfdb10f4441bbda64a3022ae5 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Fri, 15 Dec 2023 22:12:48 +0000 Subject: [PATCH 3/7] Add changelog for 1.10.12 --- CHANGELOG/CHANGELOG-1.10.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGELOG/CHANGELOG-1.10.md b/CHANGELOG/CHANGELOG-1.10.md index a02a180bd..df5060214 100644 --- a/CHANGELOG/CHANGELOG-1.10.md +++ b/CHANGELOG/CHANGELOG-1.10.md @@ -1,3 +1,25 @@ +# v1.10.12 - Changelog since v1.10.11 + +## Changes by Kind + +### Uncategorized + +- Properly wrap error from GCE Images.Get() API call, to fix a potential nil-ptr dereference ([#1517](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/pull/1517), [@k8s-infra-cherrypick-robot](https://github.com/k8s-infra-cherrypick-robot)) +- Reduce log spam when identifying NVMe devices located in `/dev` ([#1545](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/pull/1545), [@pwschuurman](https://github.com/pwschuurman)) +- Update golang builder to 1.20.12 ([#1541](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/pull/1541), [@k8s-infra-cherrypick-robot](https://github.com/k8s-infra-cherrypick-robot)) + +## Dependencies + +### Added +_Nothing has changed._ + +### Changed +_Nothing has changed._ + +### Removed +_Nothing has changed._ + + # v1.10.11 - Changelog since v1.10.10 ## Changes by Kind From e342fa7bea146f14c4c601849b7e289ab8107b41 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Fri, 15 Dec 2023 22:13:20 +0000 Subject: [PATCH 4/7] Add changelog for 1.9.14 --- CHANGELOG/CHANGELOG-1.9.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG/CHANGELOG-1.9.md b/CHANGELOG/CHANGELOG-1.9.md index 90167eb98..a83c03c8d 100644 --- a/CHANGELOG/CHANGELOG-1.9.md +++ b/CHANGELOG/CHANGELOG-1.9.md @@ -1,3 +1,24 @@ +# v1.9.14 - Changelog since v1.9.13 + +## Changes by Kind + +### Uncategorized + +- Properly wrap error from GCE Images.Get() API call, to fix a potential nil-ptr dereference ([#1518](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/pull/1518), [@k8s-infra-cherrypick-robot](https://github.com/k8s-infra-cherrypick-robot)) +- Update golang builder to 1.20.12 ([#1537](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/pull/1537), [@k8s-infra-cherrypick-robot](https://github.com/k8s-infra-cherrypick-robot)) + +## Dependencies + +### Added +_Nothing has changed._ + +### Changed +_Nothing has changed._ + +### Removed +_Nothing has changed._ + + # v1.9.13 - Changelog since v1.9.12 ## Changes by Kind From 08353734453baebdbe4c96e1e0e827a7d0453473 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Fri, 15 Dec 2023 22:13:46 +0000 Subject: [PATCH 5/7] Add changelog for 1.8.18 --- CHANGELOG/CHANGELOG-1.8.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGELOG/CHANGELOG-1.8.md b/CHANGELOG/CHANGELOG-1.8.md index 24e059da9..972f21a1a 100644 --- a/CHANGELOG/CHANGELOG-1.8.md +++ b/CHANGELOG/CHANGELOG-1.8.md @@ -1,3 +1,23 @@ +# v1.8.18 - Changelog since v1.8.17 + +## Changes by Kind + +### Uncategorized + +- Update golang builder to 1.20.12 ([#1538](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/pull/1538), [@k8s-infra-cherrypick-robot](https://github.com/k8s-infra-cherrypick-robot)) + +## Dependencies + +### Added +_Nothing has changed._ + +### Changed +_Nothing has changed._ + +### Removed +_Nothing has changed._ + + # v1.8.17 - Changelog since v1.8.16 ## Changes by Kind From fcd1e5fe635987c5a50c152704783c1853f0c381 Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Fri, 15 Dec 2023 22:14:15 +0000 Subject: [PATCH 6/7] Add changelog for 1.7.19 --- CHANGELOG/CHANGELOG-1.7.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/CHANGELOG/CHANGELOG-1.7.md b/CHANGELOG/CHANGELOG-1.7.md index 51f73942d..5c11cb3c7 100644 --- a/CHANGELOG/CHANGELOG-1.7.md +++ b/CHANGELOG/CHANGELOG-1.7.md @@ -1,3 +1,23 @@ +# v1.7.19 - Changelog since v1.7.18 + +## Changes by Kind + +### Uncategorized + +- Update golang builder to 1.20.12 ([#1539](https://github.com/kubernetes-sigs/gcp-compute-persistent-disk-csi-driver/pull/1539), [@k8s-infra-cherrypick-robot](https://github.com/k8s-infra-cherrypick-robot)) + +## Dependencies + +### Added +_Nothing has changed._ + +### Changed +_Nothing has changed._ + +### Removed +_Nothing has changed._ + + # v1.7.18 - Changelog since v1.7.17 ## Changes by Kind From 33d9df8130a918f566af38b02417ed45a4d8ba0a Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Thu, 21 Dec 2023 03:21:19 +0000 Subject: [PATCH 7/7] Add script to generate patch release notes --- hack/generate-patch-release-notes.sh | 97 ++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100755 hack/generate-patch-release-notes.sh diff --git a/hack/generate-patch-release-notes.sh b/hack/generate-patch-release-notes.sh new file mode 100755 index 000000000..9abf0d8e5 --- /dev/null +++ b/hack/generate-patch-release-notes.sh @@ -0,0 +1,97 @@ +#!/bin/bash + +# Usage: generate_patch_release_notes.sh +# +# Generates and creates commits for GCP CSI driver patch release notes. +# +# Required environment variables: +# CSI_RELEASE_TOKEN: Github token needed for generating release notes +# +# Prerequisites: +# - This script creates and deletes the origin/changelog branch in your git +# workspace. Make sure you are not using the branch for anything else. +# +# Instructions: +# 1. Update the versions in the $releases array +# 2. Set environment variables +# 3. Run the script +# 4. The script pushes the commits to your origin/changelog branch +# 5. Make any modifications as needed +# 6. Create a PR +# +# Caveats: +# - This script doesn't handle regenerating and updating existing branches. +# - The "--start-rev" option in the release-notes generator is inclusive, which +# causes the last commit from the last patch to show up in the release notes (if +# there was a release note). This needs to be manually modified until a solution is found. + +set -e +set -x + +repo="gcp-compute-persistent-disk-csi-driver" +releases=( + "1.12.5" + "1.11.7" + "1.10.12" + "1.9.14" + "1.8.18" + "1.7.19" +) + +function gen_patch_relnotes() { + rm out.md || true + rm -rf /tmp/k8s-repo || true + GITHUB_TOKEN=$CSI_RELEASE_TOKEN \ + release-notes --start-rev=$3 --end-rev=$2 --branch=$2 \ + --org=kubernetes-sigs --repo=$1 \ + --required-author="" --markdown-links --output out.md +} + +script_dir="$(dirname "$(readlink -f "$0")")" +pushd "$script_dir/../CHANGELOG" + +# Create branch +git fetch upstream +git checkout master +git rebase upstream/master + +branch="changelog" +if [ `git rev-parse --verify "$branch" 2>/dev/null` ]; then + git branch -D "$branch" +fi +git checkout -b $branch + +for version in "${releases[@]}"; do + # Parse minor and patch version + minorPatchPattern="(^[[:digit:]]+\.[[:digit:]]+)\.([[:digit:]]+)" + [[ "$version" =~ $minorPatchPattern ]] + minor="${BASH_REMATCH[1]}" + patch="${BASH_REMATCH[2]}" + + echo $repo $version $minor $patch + newVer="v$minor.$patch" + prevPatch="$(($patch-1))" + prevVer="v$minor.$prevPatch" + + # Generate release notes + gen_patch_relnotes $repo release-$minor $prevVer + cat > tmp.md <> tmp.md + echo >> tmp.md + echo >> tmp.md + + file="CHANGELOG-$minor.md" + cat $file >> tmp.md + mv tmp.md $file + + git add -u + git commit -m "Add changelog for $version" +done + +git push -f origin $branch + +popd