Skip to content

Commit ee00b71

Browse files
committed
Merge commit '514e0e91d2471d07b9773a92e6da277528875dfb' into prow-update-master
2 parents 7a126c2 + 16675be commit ee00b71

File tree

6 files changed

+57
-17
lines changed

6 files changed

+57
-17
lines changed

pkg/gce-cloud-provider/compute/gce-compute.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,9 +1117,13 @@ func (cloud *CloudProvider) waitForSnapshotCreation(ctx context.Context, project
11171117

11181118
// kmsKeyEqual returns true if fetchedKMSKey and storageClassKMSKey refer to the same key.
11191119
// fetchedKMSKey - key returned by the server
1120-
// example: projects/{0}/locations/{1}/keyRings/{2}/cryptoKeys/{3}/cryptoKeyVersions/{4}
1120+
//
1121+
// example: projects/{0}/locations/{1}/keyRings/{2}/cryptoKeys/{3}/cryptoKeyVersions/{4}
1122+
//
11211123
// storageClassKMSKey - key as provided by the client
1122-
// example: projects/{0}/locations/{1}/keyRings/{2}/cryptoKeys/{3}
1124+
//
1125+
// example: projects/{0}/locations/{1}/keyRings/{2}/cryptoKeys/{3}
1126+
//
11231127
// cryptoKeyVersions should be disregarded if the rest of the key is identical.
11241128
func KmsKeyEqual(fetchedKMSKey, storageClassKMSKey string) bool {
11251129
return removeCryptoKeyVersion(fetchedKMSKey) == removeCryptoKeyVersion(storageClassKMSKey)

pkg/gce-pd-csi-driver/node_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ Copyright 2018 The Kubernetes Authors.
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
7-
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
810
Unless required by applicable law or agreed to in writing, software
911
distributed under the License is distributed on an "AS IS" BASIS,
1012
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

release-tools/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

release-tools/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

release-tools/prow.sh

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ configvar CSI_PROW_GO_VERSION_KIND "${CSI_PROW_GO_VERSION_BUILD}" "Go version fo
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
@@ -118,7 +121,7 @@ configvar CSI_PROW_BUILD_JOB true "building code in repo enabled"
118121
# use the same settings as for "latest" Kubernetes. This works
119122
# as long as there are no breaking changes in Kubernetes, like
120123
# deprecating or changing the implementation of an alpha feature.
121-
configvar CSI_PROW_KUBERNETES_VERSION 1.17.0 "Kubernetes"
124+
configvar CSI_PROW_KUBERNETES_VERSION 1.22.0 "Kubernetes"
122125

123126
# CSI_PROW_KUBERNETES_VERSION reduced to first two version numbers and
124127
# with underscore (1_13 instead of 1.13.3) and in uppercase (LATEST
@@ -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,6 +443,10 @@ 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
@@ -940,7 +950,9 @@ install_e2e () {
940950
patch_kubernetes "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" "${CSI_PROW_WORK}" &&
941951
go_version="${CSI_PROW_GO_VERSION_E2E:-$(go_version_for_kubernetes "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" "${CSI_PROW_E2E_VERSION}")}" &&
942952
run_with_go "$go_version" make WHAT=test/e2e/e2e.test "-C${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" &&
943-
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}"
944956
else
945957
run_with_go "${CSI_PROW_GO_VERSION_E2E}" go test -c -o "${CSI_PROW_WORK}/e2e.test" "${CSI_PROW_E2E_IMPORT_PATH}/test/e2e"
946958
fi
@@ -1254,7 +1266,8 @@ main () {
12541266
fi
12551267
12561268
if tests_need_non_alpha_cluster; then
1257-
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"
12581271
12591272
# Install necessary snapshot CRDs and snapshot controller
12601273
install_snapshot_crds
@@ -1304,7 +1317,11 @@ main () {
13041317
delete_cluster_inside_prow_job non-alpha
13051318
fi
13061319
1307-
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
13081325
# Need to (re)create the cluster.
13091326
start_cluster "${CSI_PROW_E2E_ALPHA_GATES}" || die "starting alpha cluster failed"
13101327

test/k8s-integration/version.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,10 @@ func mustParseVersion(version string) *version {
131131
}
132132

133133
// Helper function to compare versions.
134-
// -1 -- if left < right
135-
// 0 -- if left == right
136-
// 1 -- if left > right
134+
//
135+
// -1 -- if left < right
136+
// 0 -- if left == right
137+
// 1 -- if left > right
137138
func (v *version) compare(right *version) int {
138139
for i, b := range v.version {
139140
if b > right.version[i] {

0 commit comments

Comments
 (0)