diff --git a/KUBERNETES_CSI_OWNERS_ALIASES b/KUBERNETES_CSI_OWNERS_ALIASES index 8ea922ed..2f3e2dfc 100644 --- a/KUBERNETES_CSI_OWNERS_ALIASES +++ b/KUBERNETES_CSI_OWNERS_ALIASES @@ -31,15 +31,7 @@ aliases: # This documents who previously contributed to Kubernetes-CSI # as approver. -emeritus_approver: +emeritus_approvers: - lpabon - sbezverk - vladimirvivien - -# This documents who previously contributed to Kubernetes-CSI -# as reviewer. -emeritus_reviewer: -- lpabon -- saad-ali -- sbezverk -- vladimirvivien diff --git a/SIDECAR_RELEASE_PROCESS.md b/SIDECAR_RELEASE_PROCESS.md index e4b30e89..8977fbe6 100644 --- a/SIDECAR_RELEASE_PROCESS.md +++ b/SIDECAR_RELEASE_PROCESS.md @@ -46,10 +46,13 @@ naming convention `-on-`. ## Release Process 1. Identify all issues and ongoing PRs that should go into the release, and drive them to resolution. -1. Download v2.8+ [K8s release notes - generator](https://github.com/kubernetes/release/tree/HEAD/cmd/release-notes) +1. Download the latest version of the + [K8s release notes generator](https://github.com/kubernetes/release/tree/HEAD/cmd/release-notes) +1. Create a + [Github personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) + with `repo:public_repo` access 1. Generate release notes for the release. Replace arguments with the relevant - information. + information. * Clean up old cached information (also needed if you are generating release notes for multiple repos) ```bash @@ -57,15 +60,24 @@ naming convention `-on-`. ``` * For new minor releases on master: ```bash - GITHUB_TOKEN= release-notes --discover=mergebase-to-latest - --github-org=kubernetes-csi --github-repo=external-provisioner - --required-author="" --output out.md + GITHUB_TOKEN= release-notes \ + --discover=mergebase-to-latest \ + --org=kubernetes-csi \ + --repo=external-provisioner \ + --required-author="" \ + --markdown-links \ + --output out.md ``` * For new patch releases on a release branch: ```bash - GITHUB_TOKEN= release-notes --discover=patch-to-latest --branch=release-1.1 - --github-org=kubernetes-csi --github-repo=external-provisioner - --required-author="" --output out.md + GITHUB_TOKEN= release-notes \ + --discover=patch-to-latest \ + --branch=release-1.1 \ + --org=kubernetes-csi \ + --repo=external-provisioner \ + --required-author="" \ + --markdown-links \ + --output out.md ``` 1. Compare the generated output to the new commits for the release to check if any notable change missed a release note. @@ -100,6 +112,29 @@ naming convention `-on-`. and [k/k in-tree](https://github.com/kubernetes/kubernetes/tree/HEAD/test/e2e/testing-manifests/storage-csi/hostpath/hostpath) +### Troubleshooting + +#### Image build jobs + +The following jobs are triggered after tagging to produce the corresponding +image(s): +https://k8s-testgrid.appspot.com/sig-storage-image-build + +Clicking on a failed build job opens that job in https://prow.k8s.io. Next to +the job title is a rerun icon (circle with arrow). Clicking it opens a popup +with a "rerun" button that maintainers with enough permissions can use. If in +doubt, ask someone on #sig-release to rerun the job. + +Another way to rerun a job is to search for it in https://prow.k8s.io and click +the rerun icon in the resulting job list: +https://prow.k8s.io/?job=canary-csi-test-push-images + +#### Verify images + +Canary and staged images can be viewed at https://console.cloud.google.com/gcr/images/k8s-staging-sig-storage + +Promoted images can be viewed at https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/sig-storage + ## Adding support for a new Kubernetes release 1. Add the new release to `k8s_versions` in diff --git a/filter-junit.go b/filter-junit.go index cf1cb4ab..5454092b 100644 --- a/filter-junit.go +++ b/filter-junit.go @@ -35,10 +35,18 @@ var ( ) /* - * TestSuite represents a JUnit file. Due to how encoding/xml works, we have + * TestResults represents a JUnit file. Due to how encoding/xml works, we have * represent all fields that we want to be passed through. It's therefore * not a complete solution, but good enough for Ginkgo + Spyglass. + * + * Before Kubernetes 1.25 and ginkgo v2, we directly had in the + * JUnit file. Now we get and inside it the . */ +type TestResults struct { + XMLName string `xml:"testsuites"` + TestSuite TestSuite `xml:"testsuite"` +} + type TestSuite struct { XMLName string `xml:"testsuite"` TestCases []TestCase `xml:"testcase"` @@ -93,7 +101,15 @@ func main() { } } if err := xml.Unmarshal(data, &junit); err != nil { - panic(err) + if err.Error() != "expected element type but have " { + panic(err) + } + // Fall back to Ginkgo v2 format. + var junitv2 TestResults + if err := xml.Unmarshal(data, &junitv2); err != nil { + panic(err) + } + junit = junitv2.TestSuite } } diff --git a/go-get-kubernetes.sh b/go-get-kubernetes.sh index 0a960c47..2b46c187 100755 --- a/go-get-kubernetes.sh +++ b/go-get-kubernetes.sh @@ -13,7 +13,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# + # This script can be used while converting a repo from "dep" to "go mod" # by calling it after "go mod init" or to update the Kubernetes packages # in a repo that has already been converted. Only packages that are diff --git a/prow.sh b/prow.sh index 819d13db..5cddb69f 100755 --- a/prow.sh +++ b/prow.sh @@ -78,7 +78,7 @@ version_to_git () { # the list of windows versions was matched from: # - https://hub.docker.com/_/microsoft-windows-nanoserver # - https://hub.docker.com/_/microsoft-windows-servercore -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" +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" # If we have a vendor directory, then use it. We must be careful to only # use this for "make" invocations inside the project's repo itself because @@ -86,14 +86,17 @@ configvar CSI_PROW_BUILD_PLATFORMS "linux amd64 amd64; linux ppc64le ppc64le -pp # which is disabled with GOFLAGS=-mod=vendor). configvar GOFLAGS_VENDOR "$( [ -d vendor ] && echo '-mod=vendor' )" "Go flags for using the vendor directory" -configvar CSI_PROW_GO_VERSION_BUILD "1.17.3" "Go version for building the component" # depends on component's source code +configvar CSI_PROW_GO_VERSION_BUILD "1.18" "Go version for building the component" # depends on component's source code 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 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 configvar CSI_PROW_GO_VERSION_KIND "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building 'kind'" # depends on CSI_PROW_KIND_VERSION below configvar CSI_PROW_GO_VERSION_GINKGO "${CSI_PROW_GO_VERSION_BUILD}" "Go version for building ginkgo" # depends on CSI_PROW_GINKGO_VERSION below # ginkgo test runner version to use. If the pre-installed version is -# different, the desired version is built from source. +# different, the desired version is built from source. For Kubernetes, +# the version built via "make WHAT=vendor/github.com/onsi/ginkgo/ginkgo" is +# used, which is guaranteed to match what the Kubernetes e2e.test binary +# needs. configvar CSI_PROW_GINKGO_VERSION v1.7.0 "Ginkgo" # 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 # If the deployment script is called with CSI_PROW_TEST_DRIVER= as # environment variable, then it must write a suitable test driver configuration # into that file in addition to installing the driver. -configvar CSI_PROW_DRIVER_VERSION "v1.3.0" "CSI driver version" +configvar CSI_PROW_DRIVER_VERSION "v1.8.0" "CSI driver version" configvar CSI_PROW_DRIVER_REPO https://github.com/kubernetes-csi/csi-driver-host-path "CSI driver repo" configvar CSI_PROW_DEPLOYMENT "" "deployment" 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" # of the cluster. The alternative would have been to (cross-)compile csi-sanity # and install it inside the cluster, which is not necessarily easier. configvar CSI_PROW_SANITY_REPO https://github.com/kubernetes-csi/csi-test "csi-test repo" -configvar CSI_PROW_SANITY_VERSION v4.3.0 "csi-test version" +configvar CSI_PROW_SANITY_VERSION v5.0.0 "csi-test version" configvar CSI_PROW_SANITY_PACKAGE_PATH github.com/kubernetes-csi/csi-test "csi-test package" configvar CSI_PROW_SANITY_SERVICE "hostpath-service" "Kubernetes TCP service name that exposes csi.sock" 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 # kubernetes-csi components must be updated, either by disabling # the failing test for "latest" or by updating the test and not running # it anymore for older releases. -configvar CSI_PROW_E2E_ALPHA_GATES_LATEST 'GenericEphemeralVolume=true,CSIStorageCapacity=true' "alpha feature gates for latest Kubernetes" +configvar CSI_PROW_E2E_ALPHA_GATES_LATEST '' "alpha feature gates for latest Kubernetes" configvar CSI_PROW_E2E_ALPHA_GATES "$(get_versioned_variable CSI_PROW_E2E_ALPHA_GATES "${csi_prow_kubernetes_version_suffix}")" "alpha E2E feature gates" +configvar CSI_PROW_E2E_GATES_LATEST '' "non alpha feature gates for latest Kubernetes" +configvar CSI_PROW_E2E_GATES "$(get_versioned_variable CSI_PROW_E2E_GATES "${csi_prow_kubernetes_version_suffix}")" "non alpha E2E feature gates" + # Which external-snapshotter tag to use for the snapshotter CRD and snapshot-controller deployment default_csi_snapshotter_version () { if [ "${CSI_PROW_KUBERNETES_VERSION}" = "latest" ] || [ "${CSI_PROW_DRIVER_CANARY}" = "canary" ]; then @@ -437,14 +443,15 @@ install_kind () { # Ensure that we have the desired version of the ginkgo test runner. install_ginkgo () { + if [ -e "${CSI_PROW_BIN}/ginkgo" ]; then + return + fi + # CSI_PROW_GINKGO_VERSION contains the tag with v prefix, the command line output does not. if [ "v$(ginkgo version 2>/dev/null | sed -e 's/.* //')" = "${CSI_PROW_GINKGO_VERSION}" ]; then return fi - git_checkout https://github.com/onsi/ginkgo "$GOPATH/src/github.com/onsi/ginkgo" "${CSI_PROW_GINKGO_VERSION}" --depth=1 && - # We have to get dependencies and hence can't call just "go build". - run_with_go "${CSI_PROW_GO_VERSION_GINKGO}" go get github.com/onsi/ginkgo/ginkgo || die "building ginkgo failed" && - mv "$GOPATH/bin/ginkgo" "${CSI_PROW_BIN}" + 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" } # Ensure that we have the desired version of dep. @@ -737,7 +744,7 @@ install_csi_driver () { fi } -# Installs all nessesary snapshotter CRDs +# Installs all necessary snapshotter CRDs install_snapshot_crds() { # Wait until volumesnapshot CRDs are in place. CRD_BASE_DIR="https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${CSI_SNAPSHOTTER_VERSION}/client/config/crd" @@ -814,7 +821,7 @@ install_snapshot_controller() { modified="$(cat "$i" | while IFS= read -r line; do nocomments="$(echo "$line" | sed -e 's/ *#.*$//')" if echo "$nocomments" | grep -q '^[[:space:]]*image:[[:space:]]*'; then - # Split 'image: k8s.gcr.io/sig-storage/snapshot-controller:v3.0.0' + # Split 'image: registry.k8s.io/sig-storage/snapshot-controller:v3.0.0' # into image (snapshot-controller:v3.0.0), # name (snapshot-controller), # tag (v3.0.0). @@ -915,11 +922,11 @@ patch_kubernetes () { local source="$1" target="$2" if [ "${CSI_PROW_DRIVER_CANARY}" = "canary" ]; then - # We cannot replace k8s.gcr.io/sig-storage with gcr.io/k8s-staging-sig-storage because + # We cannot replace registry.k8s.io/sig-storage with gcr.io/k8s-staging-sig-storage because # e2e.test does not support it (see test/utils/image/manifest.go). Instead we # invoke the e2e.test binary with KUBE_TEST_REPO_LIST set to a file that # overrides that registry. - 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;' + 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;' cat >"$target/e2e-repo-list" <