Skip to content

Commit 0b27c8a

Browse files
committed
Squashed 'release-tools/' changes from d24254f..aa61bfd
kubernetes-csi/csi-release-tools@aa61bfd Merge kubernetes-csi/csi-release-tools#218 from xing-yang/update_csi_driver kubernetes-csi/csi-release-tools@7563d19 Update CSI_PROW_DRIVER_VERSION to v1.11.0 kubernetes-csi/csi-release-tools@a2171be Merge kubernetes-csi/csi-release-tools#216 from msau42/process kubernetes-csi/csi-release-tools@cb98782 Merge kubernetes-csi/csi-release-tools#217 from msau42/owners kubernetes-csi/csi-release-tools@a11216e add new reviewers and remove inactive reviewers kubernetes-csi/csi-release-tools@dd98675 Add step for checking builds kubernetes-csi/csi-release-tools@b66c082 Merge kubernetes-csi/csi-release-tools#214 from pohly/junit-fixes kubernetes-csi/csi-release-tools@b9b6763 filter-junit.go: fix loss of testcases when parsing Ginkgo v2 JUnit kubernetes-csi/csi-release-tools@d427783 filter-junit.go: preserve system error log kubernetes-csi/csi-release-tools@38e1146 prow.sh: publish individual JUnit files as separate artifacts kubernetes-csi/csi-release-tools@78c0fb7 Merge kubernetes-csi/csi-release-tools#208 from jsafrane/skip-selinux kubernetes-csi/csi-release-tools@36e433e Skip SELinux tests in CI by default kubernetes-csi/csi-release-tools@348d4a9 Merge kubernetes-csi/csi-release-tools#207 from RaunakShah/reviewers kubernetes-csi/csi-release-tools@1efc272 Merge kubernetes-csi/csi-release-tools#206 from RaunakShah/update-prow kubernetes-csi/csi-release-tools@7d410d8 Changes to csi prow to run e2e tests in sidecars kubernetes-csi/csi-release-tools@cfa5a75 Merge kubernetes-csi/csi-release-tools#203 from humblec/test-vendor kubernetes-csi/csi-release-tools@4edd1d8 Add RaunakShah to CSI reviewers group kubernetes-csi/csi-release-tools@7ccc959 release tools update to 1.19 git-subtree-dir: release-tools git-subtree-split: aa61bfd
1 parent e56dd6c commit 0b27c8a

File tree

4 files changed

+55
-14
lines changed

4 files changed

+55
-14
lines changed

KUBERNETES_CSI_OWNERS_ALIASES

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,19 @@ aliases:
2222
- ggriffiths
2323
- gnufied
2424
- humblec
25+
- mauriciopoppe
2526
- j-griffith
26-
- Jiawei0227
2727
- jingxu97
2828
- jsafrane
2929
- pohly
30+
- RaunakShah
31+
- sunnylovestiramisu
3032
- xing-yang
3133

3234
# This documents who previously contributed to Kubernetes-CSI
3335
# as approver.
3436
emeritus_approvers:
37+
- Jiawei0227
3538
- lpabon
3639
- sbezverk
3740
- vladimirvivien

SIDECAR_RELEASE_PROCESS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ naming convention `<hostpath-deployment-version>-on-<kubernetes-version>`.
9292
1. Check that all [canary CI
9393
jobs](https://k8s-testgrid.appspot.com/sig-storage-csi-ci) are passing,
9494
and that test coverage is adequate for the changes that are going into the release.
95+
1. Check that the post-\<sidecar\>-push-images builds are succeeding.
96+
[Example](https://k8s-testgrid.appspot.com/sig-storage-image-build#post-external-snapshotter-push-images)
9597
1. Make sure that no new PRs have merged in the meantime, and no PRs are in
9698
flight and soon to be merged.
9799
1. Create a new release following a previous release as a template. Be sure to select the correct

filter-junit.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ type TestCase struct {
5656
Name string `xml:"name,attr"`
5757
Time string `xml:"time,attr"`
5858
SystemOut string `xml:"system-out,omitempty"`
59+
SystemErr string `xml:"system-err,omitempty"`
5960
Failure string `xml:"failure,omitempty"`
6061
Skipped SkipReason `xml:"skipped,omitempty"`
6162
}
@@ -109,7 +110,7 @@ func main() {
109110
if err := xml.Unmarshal(data, &junitv2); err != nil {
110111
panic(err)
111112
}
112-
junit = junitv2.TestSuite
113+
junit.TestCases = append(junit.TestCases, junitv2.TestSuite.TestCases...)
113114
}
114115
}
115116

prow.sh

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ configvar CSI_PROW_BUILD_PLATFORMS "linux amd64 amd64; linux ppc64le ppc64le -pp
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.18" "Go version for building the component" # depends on component's source code
89+
configvar CSI_PROW_GO_VERSION_BUILD "1.19" "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
@@ -196,7 +196,7 @@ kindest/node:v1.18.20@sha256:738cdc23ed4be6cc0b7ea277a2ebcc454c8373d7d8fb991a7fc
196196
# If the deployment script is called with CSI_PROW_TEST_DRIVER=<file name> as
197197
# environment variable, then it must write a suitable test driver configuration
198198
# into that file in addition to installing the driver.
199-
configvar CSI_PROW_DRIVER_VERSION "v1.8.0" "CSI driver version"
199+
configvar CSI_PROW_DRIVER_VERSION "v1.11.0" "CSI driver version"
200200
configvar CSI_PROW_DRIVER_REPO https://github.com/kubernetes-csi/csi-driver-host-path "CSI driver repo"
201201
configvar CSI_PROW_DEPLOYMENT "" "deployment"
202202
configvar CSI_PROW_DEPLOYMENT_SUFFIX "" "additional suffix in kubernetes-x.yy[suffix].yaml files"
@@ -228,6 +228,9 @@ configvar CSI_PROW_E2E_VERSION "$(version_to_git "${CSI_PROW_KUBERNETES_VERSION}
228228
configvar CSI_PROW_E2E_REPO "https://github.com/kubernetes/kubernetes" "E2E repo"
229229
configvar CSI_PROW_E2E_IMPORT_PATH "k8s.io/kubernetes" "E2E package"
230230

231+
# Local path for e2e tests. Set to "none" to disable.
232+
configvar CSI_PROW_SIDECAR_E2E_IMPORT_PATH "none" "CSI Sidecar E2E package"
233+
231234
# csi-sanity testing from the csi-test repo can be run against the installed
232235
# CSI driver. For this to work, deploying the driver must expose the Unix domain
233236
# csi.sock as a TCP service for use by the csi-sanity command, which runs outside
@@ -282,13 +285,18 @@ tests_enabled () {
282285
sanity_enabled () {
283286
[ "${CSI_PROW_TESTS_SANITY}" = "sanity" ] && tests_enabled "sanity"
284287
}
288+
289+
sidecar_tests_enabled () {
290+
[ "${CSI_PROW_SIDECAR_E2E_IMPORT_PATH}" != "none" ]
291+
}
292+
285293
tests_need_kind () {
286294
tests_enabled "parallel" "serial" "serial-alpha" "parallel-alpha" ||
287-
sanity_enabled
295+
sanity_enabled || sidecar_tests_enabled
288296
}
289297
tests_need_non_alpha_cluster () {
290298
tests_enabled "parallel" "serial" ||
291-
sanity_enabled
299+
sanity_enabled || sidecar_tests_enabled
292300
}
293301
tests_need_alpha_cluster () {
294302
tests_enabled "parallel-alpha" "serial-alpha"
@@ -352,6 +360,11 @@ configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_
352360
configvar CSI_PROW_E2E_GATES_LATEST '' "non alpha feature gates for latest Kubernetes"
353361
configvar CSI_PROW_E2E_GATES "$(get_versioned_variable CSI_PROW_E2E_GATES "${csi_prow_kubernetes_version_suffix}")" "non alpha E2E feature gates"
354362

363+
# Focus for local tests run in the sidecar E2E repo. Only used if CSI_PROW_SIDECAR_E2E_IMPORT_PATH
364+
# is not set to "none". If empty, all tests in the sidecar repo will be run.
365+
configvar CSI_PROW_SIDECAR_E2E_FOCUS '' "tags for local E2E tests"
366+
configvar CSI_PROW_SIDECAR_E2E_SKIP '' "local tests that need to be skipped"
367+
355368
# Which external-snapshotter tag to use for the snapshotter CRD and snapshot-controller deployment
356369
default_csi_snapshotter_version () {
357370
if [ "${CSI_PROW_KUBERNETES_VERSION}" = "latest" ] || [ "${CSI_PROW_DRIVER_CANARY}" = "canary" ]; then
@@ -368,7 +381,7 @@ configvar CSI_SNAPSHOTTER_VERSION "$(default_csi_snapshotter_version)" "external
368381
# whether they can run with the current cluster provider, but until
369382
# they are, we filter them out by name. Like the other test selection
370383
# variables, this is again a space separated list of regular expressions.
371-
configvar CSI_PROW_E2E_SKIP 'Disruptive' "tests that need to be skipped"
384+
configvar CSI_PROW_E2E_SKIP '\[Disruptive\]|\[Feature:SELinux\]' "tests that need to be skipped"
372385

373386
# This creates directories that are required for testing.
374387
ensure_paths () {
@@ -942,6 +955,9 @@ install_e2e () {
942955
return
943956
fi
944957
958+
if sidecar_tests_enabled; then
959+
run_with_go "${CSI_PROW_GO_VERSION_BUILD}" go test -c -o "${CSI_PROW_WORK}/e2e-local.test" "${CSI_PROW_SIDECAR_E2E_IMPORT_PATH}"
960+
fi
945961
git_checkout "${CSI_PROW_E2E_REPO}" "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" "${CSI_PROW_E2E_VERSION}" --depth=1 &&
946962
if [ "${CSI_PROW_E2E_IMPORT_PATH}" = "k8s.io/kubernetes" ]; then
947963
patch_kubernetes "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" "${CSI_PROW_WORK}" &&
@@ -992,13 +1008,21 @@ run_e2e () (
9921008
# the full Kubernetes E2E testsuite while only running a few tests.
9931009
move_junit () {
9941010
if ls "${ARTIFACTS}"/junit_[0-9]*.xml 2>/dev/null >/dev/null; then
995-
run_filter_junit -t="External.Storage|CSI.mock.volume" -o "${ARTIFACTS}/junit_${name}.xml" "${ARTIFACTS}"/junit_[0-9]*.xml && rm -f "${ARTIFACTS}"/junit_[0-9]*.xml
1011+
mkdir -p "${ARTIFACTS}/junit/${name}" &&
1012+
mkdir -p "${ARTIFACTS}/junit/steps" &&
1013+
run_filter_junit -t="External.Storage|CSI.mock.volume" -o "${ARTIFACTS}/junit/steps/junit_${name}.xml" "${ARTIFACTS}"/junit_[0-9]*.xml &&
1014+
mv "${ARTIFACTS}"/junit_[0-9]*.xml "${ARTIFACTS}/junit/${name}/"
9961015
fi
9971016
}
9981017
trap move_junit EXIT
9991018
1000-
cd "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" &&
1001-
run_with_loggers env KUBECONFIG="$KUBECONFIG" KUBE_TEST_REPO_LIST="$(if [ -e "${CSI_PROW_WORK}/e2e-repo-list" ]; then echo "${CSI_PROW_WORK}/e2e-repo-list"; fi)" ginkgo -v "$@" "${CSI_PROW_WORK}/e2e.test" -- -report-dir "${ARTIFACTS}" -storage.testdriver="${CSI_PROW_WORK}/test-driver.yaml"
1019+
if [ "${name}" == "local" ]; then
1020+
cd "${GOPATH}/src/${CSI_PROW_SIDECAR_E2E_IMPORT_PATH}" &&
1021+
run_with_loggers env KUBECONFIG="$KUBECONFIG" KUBE_TEST_REPO_LIST="$(if [ -e "${CSI_PROW_WORK}/e2e-repo-list" ]; then echo "${CSI_PROW_WORK}/e2e-repo-list"; fi)" ginkgo -v "$@" "${CSI_PROW_WORK}/e2e-local.test" -- -report-dir "${ARTIFACTS}" -report-prefix local
1022+
else
1023+
cd "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" &&
1024+
run_with_loggers env KUBECONFIG="$KUBECONFIG" KUBE_TEST_REPO_LIST="$(if [ -e "${CSI_PROW_WORK}/e2e-repo-list" ]; then echo "${CSI_PROW_WORK}/e2e-repo-list"; fi)" ginkgo -v "$@" "${CSI_PROW_WORK}/e2e.test" -- -report-dir "${ARTIFACTS}" -storage.testdriver="${CSI_PROW_WORK}/test-driver.yaml"
1025+
fi
10021026
)
10031027
10041028
# Run csi-sanity against installed CSI driver.
@@ -1064,13 +1088,14 @@ kubectl exec "$pod" -c "${CSI_PROW_SANITY_CONTAINER}" -- /bin/sh -c "\${CHECK_PA
10641088
EOF
10651089
10661090
chmod u+x "${CSI_PROW_WORK}"/*dir_in_pod.sh
1091+
mkdir -p "${ARTIFACTS}/junit/steps"
10671092
10681093
# This cannot run in parallel, because -csi.junitfile output
10691094
# from different Ginkgo nodes would go to the same file. Also the
10701095
# staging and target directories are the same.
10711096
run_with_loggers "${CSI_PROW_WORK}/csi-sanity" \
10721097
-ginkgo.v \
1073-
-csi.junitfile "${ARTIFACTS}/junit_sanity.xml" \
1098+
-csi.junitfile "${ARTIFACTS}/junit/steps/junit_sanity.xml" \
10741099
-csi.endpoint "dns:///$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' csi-prow-control-plane):$(kubectl get "services/${CSI_PROW_SANITY_SERVICE}" -o "jsonpath={..nodePort}")" \
10751100
-csi.stagingdir "/tmp/staging" \
10761101
-csi.mountdir "/tmp/mount" \
@@ -1100,7 +1125,8 @@ make_test_to_junit () {
11001125
# Plain make-test.xml was not delivered as text/xml by the web
11011126
# server and ignored by spyglass. It seems that the name has to
11021127
# match junit*.xml.
1103-
out="${ARTIFACTS}/junit_make_test.xml"
1128+
out="${ARTIFACTS}/junit/steps/junit_make_test.xml"
1129+
mkdir -p "$(dirname "$out")"
11041130
testname=
11051131
echo "<testsuite>" >>"$out"
11061132
@@ -1310,6 +1336,15 @@ main () {
13101336
ret=1
13111337
fi
13121338
fi
1339+
1340+
if sidecar_tests_enabled; then
1341+
if ! run_e2e local \
1342+
-focus="${CSI_PROW_SIDECAR_E2E_FOCUS}" \
1343+
-skip="$(regex_join "${CSI_PROW_E2E_SERIAL}")"; then
1344+
warn "E2E sidecar failed"
1345+
ret=1
1346+
fi
1347+
fi
13131348
fi
13141349
delete_cluster_inside_prow_job non-alpha
13151350
fi
@@ -1355,8 +1390,8 @@ main () {
13551390
fi
13561391
13571392
# Merge all junit files into one. This gets rid of duplicated "skipped" tests.
1358-
if ls "${ARTIFACTS}"/junit_*.xml 2>/dev/null >&2; then
1359-
run_filter_junit -o "${CSI_PROW_WORK}/junit_final.xml" "${ARTIFACTS}"/junit_*.xml && rm "${ARTIFACTS}"/junit_*.xml && mv "${CSI_PROW_WORK}/junit_final.xml" "${ARTIFACTS}"
1393+
if ls "${ARTIFACTS}"/junit/steps/junit_*.xml 2>/dev/null >&2; then
1394+
run_filter_junit -o "${ARTIFACTS}/junit_final.xml" "${ARTIFACTS}"/junit/steps/junit_*.xml
13601395
fi
13611396
13621397
return "$ret"

0 commit comments

Comments
 (0)