Skip to content

Commit c65a2f0

Browse files
committed
Squashed 'release-tools/' changes from 31aa44d1..d29a2e75
kubernetes-csi/csi-release-tools@d29a2e75 Merge kubernetes-csi/csi-release-tools#198 from pohly/csi-test-5.0.0 kubernetes-csi/csi-release-tools@41cb70d3 prow.sh: sanity testing with csi-test v5.0.0 kubernetes-csi/csi-release-tools@c85a63fb Merge kubernetes-csi/csi-release-tools#197 from pohly/fix-alpha-testing kubernetes-csi/csi-release-tools@b86d8e94 support Kubernetes 1.25 + Ginkgo v2 kubernetes-csi/csi-release-tools@ab0b0a3d Merge kubernetes-csi/csi-release-tools#192 from andyzhangx/patch-1 kubernetes-csi/csi-release-tools@7bbab24e Merge kubernetes-csi/csi-release-tools#196 from humblec/non-alpha kubernetes-csi/csi-release-tools@e51ff2cc introduce control variable for non alpha feature gate configuration kubernetes-csi/csi-release-tools@ca19ef52 Merge kubernetes-csi/csi-release-tools#195 from pohly/fix-alpha-testing kubernetes-csi/csi-release-tools@3948331e fix testing with latest Kubernetes kubernetes-csi/csi-release-tools@e4dab7ff Merge kubernetes-csi/csi-release-tools#194 from yselkowitz/registry-k8s-io kubernetes-csi/csi-release-tools@84a4d5a1 Move from k8s.gcr.io to registry.k8s.io kubernetes-csi/csi-release-tools@9a0260c5 fix boilerplate header kubernetes-csi/csi-release-tools@37d11049 Merge kubernetes-csi/csi-release-tools#191 from pohly/go-1.18 kubernetes-csi/csi-release-tools@db917f5c update to Go 1.18 kubernetes-csi/csi-release-tools@335339f0 Merge kubernetes-csi/csi-release-tools#187 from mauriciopoppe/remove-eol-windows-versions kubernetes-csi/csi-release-tools@890b87a2 Merge kubernetes-csi/csi-release-tools#188 from pwschuurman/update-release-notes-docs kubernetes-csi/csi-release-tools@274bc9ba Update Sidecar Release Process documentation to reference latest syntax for release-notes tool kubernetes-csi/csi-release-tools@87b6c372 Merge kubernetes-csi/csi-release-tools#185 from Garima-Negi/fix-OWNERS-files kubernetes-csi/csi-release-tools@f1de2c66 Fix OWNERS file - squashed commits kubernetes-csi/csi-release-tools@59ae38b7 Remove EOL windows versions from BUILD_PLATFORMS kubernetes-csi/csi-release-tools@5d664712 Merge kubernetes-csi/csi-release-tools#186 from humblec/sp kubernetes-csi/csi-release-tools@d066f1ba Correct prow.sh typo and make codespell linter pass kubernetes-csi/csi-release-tools@762e22d0 Merge kubernetes-csi/csi-release-tools#184 from pohly/image-publishing-troubleshooting kubernetes-csi/csi-release-tools@81e26c3f SIDECAR_RELEASE_PROCESS.md: add troubleshooting for image publishing git-subtree-dir: release-tools git-subtree-split: d29a2e7547822371ebf3e61f7d2249c244879f85
1 parent de8b56c commit c65a2f0

6 files changed

+96
-39
lines changed

KUBERNETES_CSI_OWNERS_ALIASES

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,7 @@ aliases:
3131

3232
# This documents who previously contributed to Kubernetes-CSI
3333
# as approver.
34-
emeritus_approver:
34+
emeritus_approvers:
3535
- lpabon
3636
- sbezverk
3737
- vladimirvivien
38-
39-
# This documents who previously contributed to Kubernetes-CSI
40-
# as reviewer.
41-
emeritus_reviewer:
42-
- lpabon
43-
- saad-ali
44-
- sbezverk
45-
- vladimirvivien

SIDECAR_RELEASE_PROCESS.md

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,38 @@ naming convention `<hostpath-deployment-version>-on-<kubernetes-version>`.
4646
## Release Process
4747
1. Identify all issues and ongoing PRs that should go into the release, and
4848
drive them to resolution.
49-
1. Download v2.8+ [K8s release notes
50-
generator](https://github.com/kubernetes/release/tree/HEAD/cmd/release-notes)
49+
1. Download the latest version of the
50+
[K8s release notes generator](https://github.com/kubernetes/release/tree/HEAD/cmd/release-notes)
51+
1. Create a
52+
[Github personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
53+
with `repo:public_repo` access
5154
1. Generate release notes for the release. Replace arguments with the relevant
52-
information.
55+
information.
5356
* Clean up old cached information (also needed if you are generating release
5457
notes for multiple repos)
5558
```bash
5659
rm -rf /tmp/k8s-repo
5760
```
5861
* For new minor releases on master:
5962
```bash
60-
GITHUB_TOKEN=<token> release-notes --discover=mergebase-to-latest
61-
--github-org=kubernetes-csi --github-repo=external-provisioner
62-
--required-author="" --output out.md
63+
GITHUB_TOKEN=<token> release-notes \
64+
--discover=mergebase-to-latest \
65+
--org=kubernetes-csi \
66+
--repo=external-provisioner \
67+
--required-author="" \
68+
--markdown-links \
69+
--output out.md
6370
```
6471
* For new patch releases on a release branch:
6572
```bash
66-
GITHUB_TOKEN=<token> release-notes --discover=patch-to-latest --branch=release-1.1
67-
--github-org=kubernetes-csi --github-repo=external-provisioner
68-
--required-author="" --output out.md
73+
GITHUB_TOKEN=<token> release-notes \
74+
--discover=patch-to-latest \
75+
--branch=release-1.1 \
76+
--org=kubernetes-csi \
77+
--repo=external-provisioner \
78+
--required-author="" \
79+
--markdown-links \
80+
--output out.md
6981
```
7082
1. Compare the generated output to the new commits for the release to check if
7183
any notable change missed a release note.
@@ -100,6 +112,29 @@ naming convention `<hostpath-deployment-version>-on-<kubernetes-version>`.
100112
and [k/k
101113
in-tree](https://github.com/kubernetes/kubernetes/tree/HEAD/test/e2e/testing-manifests/storage-csi/hostpath/hostpath)
102114

115+
### Troubleshooting
116+
117+
#### Image build jobs
118+
119+
The following jobs are triggered after tagging to produce the corresponding
120+
image(s):
121+
https://k8s-testgrid.appspot.com/sig-storage-image-build
122+
123+
Clicking on a failed build job opens that job in https://prow.k8s.io. Next to
124+
the job title is a rerun icon (circle with arrow). Clicking it opens a popup
125+
with a "rerun" button that maintainers with enough permissions can use. If in
126+
doubt, ask someone on #sig-release to rerun the job.
127+
128+
Another way to rerun a job is to search for it in https://prow.k8s.io and click
129+
the rerun icon in the resulting job list:
130+
https://prow.k8s.io/?job=canary-csi-test-push-images
131+
132+
#### Verify images
133+
134+
Canary and staged images can be viewed at https://console.cloud.google.com/gcr/images/k8s-staging-sig-storage
135+
136+
Promoted images can be viewed at https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/sig-storage
137+
103138
## Adding support for a new Kubernetes release
104139

105140
1. Add the new release to `k8s_versions` in

filter-junit.go

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,18 @@ var (
3535
)
3636

3737
/*
38-
* TestSuite represents a JUnit file. Due to how encoding/xml works, we have
38+
* TestResults represents a JUnit file. Due to how encoding/xml works, we have
3939
* represent all fields that we want to be passed through. It's therefore
4040
* not a complete solution, but good enough for Ginkgo + Spyglass.
41+
*
42+
* Before Kubernetes 1.25 and ginkgo v2, we directly had <testsuite> in the
43+
* JUnit file. Now we get <testsuites> and inside it the <testsuite>.
4144
*/
45+
type TestResults struct {
46+
XMLName string `xml:"testsuites"`
47+
TestSuite TestSuite `xml:"testsuite"`
48+
}
49+
4250
type TestSuite struct {
4351
XMLName string `xml:"testsuite"`
4452
TestCases []TestCase `xml:"testcase"`
@@ -93,7 +101,15 @@ func main() {
93101
}
94102
}
95103
if err := xml.Unmarshal(data, &junit); err != nil {
96-
panic(err)
104+
if err.Error() != "expected element type <testsuite> but have <testsuites>" {
105+
panic(err)
106+
}
107+
// Fall back to Ginkgo v2 format.
108+
var junitv2 TestResults
109+
if err := xml.Unmarshal(data, &junitv2); err != nil {
110+
panic(err)
111+
}
112+
junit = junitv2.TestSuite
97113
}
98114
}
99115

go-get-kubernetes.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
16-
#
16+
1717
# This script can be used while converting a repo from "dep" to "go mod"
1818
# by calling it after "go mod init" or to update the Kubernetes packages
1919
# in a repo that has already been converted. Only packages that are

prow.sh

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,25 @@ version_to_git () {
7878
# the list of windows versions was matched from:
7979
# - https://hub.docker.com/_/microsoft-windows-nanoserver
8080
# - https://hub.docker.com/_/microsoft-windows-servercore
81-
configvar CSI_PROW_BUILD_PLATFORMS "linux amd64 amd64; linux ppc64le ppc64le -ppc64le; linux s390x s390x -s390x; linux arm arm -arm; linux arm64 arm64 -arm64; linux arm arm/v7 -armv7; windows amd64 amd64 .exe nanoserver:1809 servercore:ltsc2019; windows amd64 amd64 .exe nanoserver:1909 servercore:1909; windows amd64 amd64 .exe nanoserver:2004 servercore:2004; windows amd64 amd64 .exe nanoserver:20H2 servercore:20H2; windows amd64 amd64 .exe nanoserver:ltsc2022 servercore:ltsc2022" "Go target platforms (= GOOS + GOARCH) and file suffix of the resulting binaries"
81+
configvar CSI_PROW_BUILD_PLATFORMS "linux amd64 amd64; linux ppc64le ppc64le -ppc64le; linux s390x s390x -s390x; linux arm arm -arm; linux arm64 arm64 -arm64; linux arm arm/v7 -armv7; windows amd64 amd64 .exe nanoserver:1809 servercore:ltsc2019; windows amd64 amd64 .exe nanoserver:20H2 servercore:20H2; windows amd64 amd64 .exe nanoserver:ltsc2022 servercore:ltsc2022" "Go target platforms (= GOOS + GOARCH) and file suffix of the resulting binaries"
8282

8383
# If we have a vendor directory, then use it. We must be careful to only
8484
# use this for "make" invocations inside the project's repo itself because
8585
# setting it globally can break other go usages (like "go get <some command>"
8686
# which is disabled with GOFLAGS=-mod=vendor).
8787
configvar GOFLAGS_VENDOR "$( [ -d vendor ] && echo '-mod=vendor' )" "Go flags for using the vendor directory"
8888

89-
configvar CSI_PROW_GO_VERSION_BUILD "1.17.3" "Go version for building the component" # depends on component's source code
89+
configvar CSI_PROW_GO_VERSION_BUILD "1.18" "Go version for building the component" # depends on component's source code
9090
configvar CSI_PROW_GO_VERSION_E2E "" "override Go version for building the Kubernetes E2E test suite" # normally doesn't need to be set, see install_e2e
9191
configvar CSI_PROW_GO_VERSION_SANITY "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building the csi-sanity test suite" # depends on CSI_PROW_SANITY settings below
9292
configvar CSI_PROW_GO_VERSION_KIND "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building 'kind'" # depends on CSI_PROW_KIND_VERSION below
9393
configvar CSI_PROW_GO_VERSION_GINKGO "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building ginkgo" # depends on CSI_PROW_GINKGO_VERSION below
9494

9595
# ginkgo test runner version to use. If the pre-installed version is
96-
# different, the desired version is built from source.
96+
# different, the desired version is built from source. For Kubernetes,
97+
# the version built via "make WHAT=vendor/github.com/onsi/ginkgo/ginkgo" is
98+
# used, which is guaranteed to match what the Kubernetes e2e.test binary
99+
# needs.
97100
configvar CSI_PROW_GINKGO_VERSION v1.7.0 "Ginkgo"
98101

99102
# Ginkgo runs the E2E test in parallel. The default is based on the number
@@ -196,7 +199,7 @@ kindest/node:v1.14.10@sha256:f8a66ef82822ab4f7569e91a5bccaf27bceee135c1457c512e5
196199
# If the deployment script is called with CSI_PROW_TEST_DRIVER=<file name> as
197200
# environment variable, then it must write a suitable test driver configuration
198201
# into that file in addition to installing the driver.
199-
configvar CSI_PROW_DRIVER_VERSION "v1.3.0" "CSI driver version"
202+
configvar CSI_PROW_DRIVER_VERSION "v1.8.0" "CSI driver version"
200203
configvar CSI_PROW_DRIVER_REPO https://github.com/kubernetes-csi/csi-driver-host-path "CSI driver repo"
201204
configvar CSI_PROW_DEPLOYMENT "" "deployment"
202205
configvar CSI_PROW_DEPLOYMENT_SUFFIX "" "additional suffix in kubernetes-x.yy[suffix].yaml files"
@@ -234,7 +237,7 @@ configvar CSI_PROW_E2E_IMPORT_PATH "k8s.io/kubernetes" "E2E package"
234237
# of the cluster. The alternative would have been to (cross-)compile csi-sanity
235238
# and install it inside the cluster, which is not necessarily easier.
236239
configvar CSI_PROW_SANITY_REPO https://github.com/kubernetes-csi/csi-test "csi-test repo"
237-
configvar CSI_PROW_SANITY_VERSION v4.3.0 "csi-test version"
240+
configvar CSI_PROW_SANITY_VERSION v5.0.0 "csi-test version"
238241
configvar CSI_PROW_SANITY_PACKAGE_PATH github.com/kubernetes-csi/csi-test "csi-test package"
239242
configvar CSI_PROW_SANITY_SERVICE "hostpath-service" "Kubernetes TCP service name that exposes csi.sock"
240243
configvar CSI_PROW_SANITY_POD "csi-hostpathplugin-0" "Kubernetes pod with CSI driver"
@@ -346,9 +349,12 @@ configvar CSI_PROW_E2E_ALPHA "$(get_versioned_variable CSI_PROW_E2E_ALPHA "${csi
346349
# kubernetes-csi components must be updated, either by disabling
347350
# the failing test for "latest" or by updating the test and not running
348351
# it anymore for older releases.
349-
configvar CSI_PROW_E2E_ALPHA_GATES_LATEST 'GenericEphemeralVolume=true,CSIStorageCapacity=true' "alpha feature gates for latest Kubernetes"
352+
configvar CSI_PROW_E2E_ALPHA_GATES_LATEST '' "alpha feature gates for latest Kubernetes"
350353
configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_GATES "${csi_prow_kubernetes_version_suffix}")" "alpha E2E feature gates"
351354

355+
configvar CSI_PROW_E2E_GATES_LATEST '' "non alpha feature gates for latest Kubernetes"
356+
configvar CSI_PROW_E2E_GATES "$(get_versioned_variable CSI_PROW_E2E_GATES "${csi_prow_kubernetes_version_suffix}")" "non alpha E2E feature gates"
357+
352358
# Which external-snapshotter tag to use for the snapshotter CRD and snapshot-controller deployment
353359
default_csi_snapshotter_version () {
354360
if [ "${CSI_PROW_KUBERNETES_VERSION}" = "latest" ] || [ "${CSI_PROW_DRIVER_CANARY}" = "canary" ]; then
@@ -437,14 +443,15 @@ install_kind () {
437443

438444
# Ensure that we have the desired version of the ginkgo test runner.
439445
install_ginkgo () {
446+
if [ -e "${CSI_PROW_BIN}/ginkgo" ]; then
447+
return
448+
fi
449+
440450
# CSI_PROW_GINKGO_VERSION contains the tag with v prefix, the command line output does not.
441451
if [ "v$(ginkgo version 2>/dev/null | sed -e 's/.* //')" = "${CSI_PROW_GINKGO_VERSION}" ]; then
442452
return
443453
fi
444-
git_checkout https://github.com/onsi/ginkgo "$GOPATH/src/github.com/onsi/ginkgo" "${CSI_PROW_GINKGO_VERSION}" --depth=1 &&
445-
# We have to get dependencies and hence can't call just "go build".
446-
run_with_go "${CSI_PROW_GO_VERSION_GINKGO}" go get github.com/onsi/ginkgo/ginkgo || die "building ginkgo failed" &&
447-
mv "$GOPATH/bin/ginkgo" "${CSI_PROW_BIN}"
454+
run_with_go "${CSI_PROW_GO_VERSION_GINKGO}" env GOBIN="${CSI_PROW_BIN}" go install "github.com/onsi/ginkgo/ginkgo@${CSI_PROW_GINKGO_VERSION}" || die "building ginkgo failed"
448455
}
449456

450457
# Ensure that we have the desired version of dep.
@@ -737,7 +744,7 @@ install_csi_driver () {
737744
fi
738745
}
739746

740-
# Installs all nessesary snapshotter CRDs
747+
# Installs all necessary snapshotter CRDs
741748
install_snapshot_crds() {
742749
# Wait until volumesnapshot CRDs are in place.
743750
CRD_BASE_DIR="https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION}/client/config/crd"
@@ -814,7 +821,7 @@ install_snapshot_controller() {
814821
modified="$(cat "$i" | while IFS= read -r line; do
815822
nocomments="$(echo "$line" | sed -e 's/ *#.*$//')"
816823
if echo "$nocomments" | grep -q '^[[:space:]]*image:[[:space:]]*'; then
817-
# Split 'image: k8s.gcr.io/sig-storage/snapshot-controller:v3.0.0'
824+
# Split 'image: registry.k8s.io/sig-storage/snapshot-controller:v3.0.0'
818825
# into image (snapshot-controller:v3.0.0),
819826
# name (snapshot-controller),
820827
# tag (v3.0.0).
@@ -915,11 +922,11 @@ patch_kubernetes () {
915922
local source="$1" target="$2"
916923
917924
if [ "${CSI_PROW_DRIVER_CANARY}" = "canary" ]; then
918-
# We cannot replace k8s.gcr.io/sig-storage with gcr.io/k8s-staging-sig-storage because
925+
# We cannot replace registry.k8s.io/sig-storage with gcr.io/k8s-staging-sig-storage because
919926
# e2e.test does not support it (see test/utils/image/manifest.go). Instead we
920927
# invoke the e2e.test binary with KUBE_TEST_REPO_LIST set to a file that
921928
# overrides that registry.
922-
find "$source/test/e2e/testing-manifests/storage-csi/mock" -name '*.yaml' -print0 | xargs -0 sed -i -e 's;k8s.gcr.io/sig-storage/\(.*\):v.*;k8s.gcr.io/sig-storage/\1:canary;'
929+
find "$source/test/e2e/testing-manifests/storage-csi/mock" -name '*.yaml' -print0 | xargs -0 sed -i -e 's;registry.k8s.io/sig-storage/\(.*\):v.*;registry.k8s.io/sig-storage/\1:canary;'
923930
cat >"$target/e2e-repo-list" <<EOF
924931
sigStorageRegistry: gcr.io/k8s-staging-sig-storage
925932
EOF
@@ -943,7 +950,9 @@ install_e2e () {
943950
patch_kubernetes "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" "${CSI_PROW_WORK}" &&
944951
go_version="${CSI_PROW_GO_VERSION_E2E:-$(go_version_for_kubernetes "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" "${CSI_PROW_E2E_VERSION}")}" &&
945952
run_with_go "$go_version" make WHAT=test/e2e/e2e.test "-C${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" &&
946-
ln -s "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}/_output/bin/e2e.test" "${CSI_PROW_WORK}"
953+
ln -s "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}/_output/bin/e2e.test" "${CSI_PROW_WORK}" &&
954+
run_with_go "$go_version" make WHAT=vendor/github.com/onsi/ginkgo/ginkgo "-C${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" &&
955+
ln -s "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}/_output/bin/ginkgo" "${CSI_PROW_BIN}"
947956
else
948957
run_with_go "${CSI_PROW_GO_VERSION_E2E}" go test -c -o "${CSI_PROW_WORK}/e2e.test" "${CSI_PROW_E2E_IMPORT_PATH}/test/e2e"
949958
fi
@@ -1257,7 +1266,8 @@ main () {
12571266
fi
12581267
12591268
if tests_need_non_alpha_cluster; then
1260-
start_cluster || die "starting the non-alpha cluster failed"
1269+
# Need to (re)create the cluster.
1270+
start_cluster "${CSI_PROW_E2E_GATES}" || die "starting the non-alpha cluster failed"
12611271
12621272
# Install necessary snapshot CRDs and snapshot controller
12631273
install_snapshot_crds
@@ -1307,7 +1317,11 @@ main () {
13071317
delete_cluster_inside_prow_job non-alpha
13081318
fi
13091319
1310-
if tests_need_alpha_cluster && [ "${CSI_PROW_E2E_ALPHA_GATES}" ]; then
1320+
# If the cluster for alpha tests doesn't need any feature gates, then we
1321+
# could reuse the same cluster as for the other tests. But that would make
1322+
# the flow in this script harder and wouldn't help in practice because
1323+
# we have separate Prow jobs for alpha and non-alpha tests.
1324+
if tests_need_alpha_cluster; then
13111325
# Need to (re)create the cluster.
13121326
start_cluster "${CSI_PROW_E2E_ALPHA_GATES}" || die "starting alpha cluster failed"
13131327

verify-spelling.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ if [[ -z "$(command -v misspell)" ]]; then
4141
# perform go get in a temp dir as we are not tracking this version in a go module
4242
# if we do the go get in the repo, it will create / update a go.mod and go.sum
4343
cd "${TMP_DIR}"
44-
GO111MODULE=on GOBIN="${TMP_DIR}" go get "github.com/client9/misspell/cmd/misspell@${TOOL_VERSION}"
44+
GO111MODULE=on GOBIN="${TMP_DIR}" go install "github.com/client9/misspell/cmd/misspell@${TOOL_VERSION}"
4545
export PATH="${TMP_DIR}:${PATH}"
4646
fi
4747

0 commit comments

Comments
 (0)