From 1c1a42b859603369d30da92f78119f491485ef7c Mon Sep 17 00:00:00 2001 From: Oleksandr Holubenko Date: Mon, 27 Feb 2023 15:03:46 +0200 Subject: [PATCH 01/14] sanity --- .github/workflows/sanity.yaml | 97 ++++++++++++++++++++++++ tests/csi-sanity/ga-Dockerfile | 25 ++++++ tests/csi-sanity/ga-docker-compose1.yaml | 25 ++++++ tests/csi-sanity/ga-docker-compose2.yaml | 25 ++++++ tests/csi-sanity/ga_docker_run_sanity.sh | 94 +++++++++++++++++++++++ 5 files changed, 266 insertions(+) create mode 100644 .github/workflows/sanity.yaml create mode 100644 tests/csi-sanity/ga-Dockerfile create mode 100644 tests/csi-sanity/ga-docker-compose1.yaml create mode 100644 tests/csi-sanity/ga-docker-compose2.yaml create mode 100755 tests/csi-sanity/ga_docker_run_sanity.sh diff --git a/.github/workflows/sanity.yaml b/.github/workflows/sanity.yaml new file mode 100644 index 000000000..96480edef --- /dev/null +++ b/.github/workflows/sanity.yaml @@ -0,0 +1,97 @@ +name: sanity +on: + pull_request: + +concurrency: + group: sanity=${{ github.ref }} + cancel-in-progress: true + +env: + # through 1 to 9 + PLUGIN_VERBOSITY: ${{ vars.PLUGIN_VERBOSITY }} + # - '' + # - '-ginkgo.v' + # - '-ginkgo.vv' + SANITY_VERBOSITY: ${{ vars.SANITY_VERBOSITY }} + COMPOSE_DEFAULTS: '--exit-code-from=sanity --always-recreate-deps' + +jobs: + build: + runs-on: self-hosted + steps: + - uses: actions/checkout@v3 + + - run: echo "${{ secrets.WEKAFS_API_SECRET_YAML }}" > tests/csi-sanity/wekafs-api-secret.yaml + + - uses: docker/setup-buildx-action@v2 + - uses: docker/build-push-action@v4 + with: + context: . + file: tests/csi-sanity/ga-Dockerfile + tags: sanity:latest + + legacy_sanity: + needs: build + runs-on: self-hosted + steps: + - uses: actions/checkout@v3 + + - run: docker-compose -f tests/csi-sanity/ga-docker-compose1.yaml up $COMPOSE_DEFAULTS + env: + SANITY_FUNCTION: legacy_sanity + + + directory_volume_no_snapshots: + if: always() + needs: legacy_sanity + runs-on: self-hosted + steps: + - uses: actions/checkout@v3 + + - run: docker-compose -f tests/csi-sanity/ga-docker-compose1.yaml up $COMPOSE_DEFAULTS + env: + SANITY_FUNCTION: directory_volume_no_snapshots + + fs_volume_no_snapshots: + if: always() + needs: directory_volume_no_snapshots + runs-on: self-hosted + steps: + - uses: actions/checkout@v3 + + - run: docker-compose -f tests/csi-sanity/ga-docker-compose1.yaml up $COMPOSE_DEFAULTS + env: + SANITY_FUNCTION: fs_volume_no_snapshots + + directory_volume_and_snapshots: + if: always() + needs: fs_volume_no_snapshots + runs-on: self-hosted + steps: + - uses: actions/checkout@v3 + + - run: docker-compose -f tests/csi-sanity/ga-docker-compose2.yaml up $COMPOSE_DEFAULTS + env: + SANITY_FUNCTION: directory_volume_and_snapshots + + snaphot_volumes_with_2nd_level_shapshots: + if: always() + needs: directory_volume_and_snapshots + runs-on: self-hosted + steps: + - uses: actions/checkout@v3 + + - run: docker-compose -f tests/csi-sanity/ga-docker-compose2.yaml up $COMPOSE_DEFAULTS + env: + SANITY_FUNCTION: snaphot_volumes_with_2nd_level_shapshots + + filesystem_volumes: + if: always() + needs: snaphot_volumes_with_2nd_level_shapshots + runs-on: self-hosted + steps: + - uses: actions/checkout@v3 + + - run: docker-compose -f tests/csi-sanity/ga-docker-compose2.yaml up $COMPOSE_DEFAULTS + env: + SANITY_FUNCTION: filesystem_volumes diff --git a/tests/csi-sanity/ga-Dockerfile b/tests/csi-sanity/ga-Dockerfile new file mode 100644 index 000000000..1810537e9 --- /dev/null +++ b/tests/csi-sanity/ga-Dockerfile @@ -0,0 +1,25 @@ +FROM golang:1.19-alpine + +WORKDIR /app + +COPY go.mod . +COPY go.sum . +RUN go mod download + +RUN go install -v github.com/kubernetes-csi/csi-test/v5/cmd/csi-sanity@v5.0.0 + +COPY cmd cmd +COPY pkg pkg + +RUN CGO_ENABLED=0 GOOS="linux" GOARCH="amd64" go build -a -ldflags '-X main.version='$VERSION' -extldflags "-static"' -o wekafsplugin ./cmd/wekafsplugin/main.go + + +FROM golang:1.19-alpine + +ADD tests/csi-sanity/wekafs-dirv1.yaml /test/wekafs-dirv1.yaml +ADD tests/csi-sanity/wekafs-fs.yaml /test/wekafs-fs.yaml +ADD tests/csi-sanity/wekafs-snapvol.yaml /test/wekafs-snapvol.yaml +ADD tests/csi-sanity/wekafs-api-secret.yaml /test/wekafs-api-secret.yaml +ADD tests/csi-sanity/ga_docker_run_sanity.sh /usr/bin/run_sanity +COPY --from=0 /go/bin/csi-sanity /usr/local/bin/csi-sanity +COPY --from=0 /app/wekafsplugin /usr/local/bin/wekafsplugin diff --git a/tests/csi-sanity/ga-docker-compose1.yaml b/tests/csi-sanity/ga-docker-compose1.yaml new file mode 100644 index 000000000..489212156 --- /dev/null +++ b/tests/csi-sanity/ga-docker-compose1.yaml @@ -0,0 +1,25 @@ +version: '3' + +services: + plugin_controller_no_snaps: + image: sanity + command: wekafsplugin -nodeid 1 -v ${PLUGIN_VERBOSITY} --allowinsecurehttps --endpoint=unix://tmp/weka-csi-test/controller-no-snaps.sock --debugpath=/tmp/weka-csi-test/filesystems -metricsport=9091 --csimode=controller -enablemetrics -allowautofscreation -allowautofsexpansion -allowsnapshotsoflegacyvolumes -allowautoseedsnapshotcreation -suppresssnapshotcapability -suppressrvolumeclonecapability -alwaysallowsnapshotvolumes + volumes: + - test-volume:/tmp/weka-csi-test + privileged: true + network_mode: host + plugin_node_no_snaps: + image: sanity + command: wekafsplugin -nodeid 1 -v ${PLUGIN_VERBOSITY} --allowinsecurehttps --endpoint=unix://tmp/weka-csi-test/node-no-snaps.sock --debugpath=/tmp/weka-csi-test/filesystems -metricsport=9092 --csimode=node -enablemetrics -allowautofscreation -allowautofsexpansion -allowsnapshotsoflegacyvolumes -allowautoseedsnapshotcreation -suppresssnapshotcapability -suppressrvolumeclonecapability -alwaysallowsnapshotvolumes + volumes: + - test-volume:/tmp/weka-csi-test + privileged: true + network_mode: host + sanity: + image: sanity + command: run_sanity ${SANITY_FUNCTION} ${SANITY_VERBOSITY} + network_mode: host + volumes: + - test-volume:/tmp/weka-csi-test +volumes: + test-volume: diff --git a/tests/csi-sanity/ga-docker-compose2.yaml b/tests/csi-sanity/ga-docker-compose2.yaml new file mode 100644 index 000000000..a6f5e5535 --- /dev/null +++ b/tests/csi-sanity/ga-docker-compose2.yaml @@ -0,0 +1,25 @@ +version: '3' + +services: + plugin_controller: + image: sanity + command: wekafsplugin -nodeid 1 -v ${PLUGIN_VERBOSITY} --allowinsecurehttps --endpoint=unix://tmp/weka-csi-test/controller.sock --debugpath=/tmp/weka-csi-test/filesystems -metricsport=9091 --csimode=controller -enablemetrics -allowautofscreation -allowautofsexpansion -allowsnapshotsoflegacyvolumes -allowautoseedsnapshotcreation -alwaysallowsnapshotvolumes + volumes: + - test-volume:/tmp/weka-csi-test + privileged: true + network_mode: host + plugin_node: + image: sanity + command: wekafsplugin -nodeid 1 -v ${PLUGIN_VERBOSITY} --allowinsecurehttps --endpoint=unix://tmp/weka-csi-test/node.sock --debugpath=/tmp/weka-csi-test/filesystems -metricsport=9092 --csimode=node -enablemetrics -allowautofscreation -allowautofsexpansion -allowsnapshotsoflegacyvolumes -allowautoseedsnapshotcreation -alwaysallowsnapshotvolumes + volumes: + - test-volume:/tmp/weka-csi-test + privileged: true + network_mode: host + sanity: + image: sanity + command: run_sanity ${SANITY_FUNCTION} ${SANITY_VERBOSITY} + network_mode: host + volumes: + - test-volume:/tmp/weka-csi-test +volumes: + test-volume: diff --git a/tests/csi-sanity/ga_docker_run_sanity.sh b/tests/csi-sanity/ga_docker_run_sanity.sh new file mode 100755 index 000000000..827c7eb6c --- /dev/null +++ b/tests/csi-sanity/ga_docker_run_sanity.sh @@ -0,0 +1,94 @@ +#!/usr/bin/env sh + +# wait for other containers to start +sleep 8 +mkdir -p /tmp/weka-csi-test/filesystems/default/test/my/path + +# ---------------------- LEGACY DIR VOLUME NO API BINDING (NO SNAPSHOT SUPPORT) ---------------------- +legacy_sanity() { +echo "LEGACY SANITY STARTED" + +csi-sanity -csi.stagingdir /tmp/csi-test-staging \ + --csi.controllerendpoint /tmp/weka-csi-test/controller-no-snaps.sock \ + --csi.endpoint /tmp/weka-csi-test/node-no-snaps.sock \ + -csi.mountdir=/tmp/weka-csi-test/sanity-workspace/ \ + -ginkgo.always-emit-ginkgo-writer \ + -ginkgo.progress $1\ + -ginkgo.seed 0 \ + -csi.testvolumeparameters /test/wekafs-dirv1.yaml +} + + +# ---------------------- DIR VOLUME WITH API BINDING EXCLUDING SNAPSHOTS ---------------------- +directory_volume_no_snapshots() { +echo "DIRECTORY VOLUME NO SNAPSHOTS STARTED" + +csi-sanity -csi.stagingdir /tmp/csi-test-staging \ + --csi.controllerendpoint /tmp/weka-csi-test/controller-no-snaps.sock \ + --csi.endpoint /tmp/weka-csi-test/node-no-snaps.sock \ + -csi.secrets /test/wekafs-api-secret.yaml \ + -csi.mountdir=/tmp/weka-csi-test/sanity-workspace/ \ + -ginkgo.seed 0 \ + -ginkgo.progress $1\ + -csi.testvolumeparameters /test/wekafs-dirv1.yaml +} + + +# ---------------------- FS VOLUME WITH API BINDING EXCLUDING SNAPSHOTS ---------------------- +fs_volume_no_snapshots() { +echo "FS VOLUME NO SNAPSHOTS STARTED" + +csi-sanity -csi.stagingdir /tmp/csi-test-staging \ + --csi.controllerendpoint /tmp/weka-csi-test/controller-no-snaps.sock \ + --csi.endpoint /tmp/weka-csi-test/node-no-snaps.sock \ + -csi.secrets /test/wekafs-api-secret.yaml \ + -csi.mountdir=/tmp/weka-csi-test/sanity-workspace/ \ + -csi.testvolumeparameters /test/wekafs-fs.yaml \ + -ginkgo.seed 0 \ + -ginkgo.progress $1 +} + +# ---------------------- DIR VOLUME WITH API BINDING AND SNAPSHOTS ---------------------- +directory_volume_and_snapshots() { +echo "DIRECTORY VOLUME AND SNAPSHOTS STARTED" + +csi-sanity -csi.stagingdir /tmp/csi-test-staging \ + --csi.controllerendpoint /tmp/weka-csi-test/controller.sock \ + --csi.endpoint /tmp/weka-csi-test/node.sock \ + -csi.secrets /test/wekafs-api-secret.yaml \ + -csi.mountdir=/tmp/weka-csi-test/sanity-workspace/ \ + -ginkgo.seed 0 \ + -ginkgo.progress $1\ + -csi.testvolumeparameters /test/wekafs-dirv1.yaml +} + + +# ---------------------- SNAPSHOT VOLUME WITH API BINDING AND SNAPSHOTS ---------------------- +snaphot_volumes_with_2nd_level_shapshots() { +echo "SNAPSHOT VOLUMES WITH 2nd LEVEL SNAPSHOTS STARTED" + +csi-sanity -csi.stagingdir /tmp/csi-test-staging \ + --csi.controllerendpoint /tmp/weka-csi-test/controller.sock \ + --csi.endpoint /tmp/weka-csi-test/node.sock \ + -csi.secrets /test/wekafs-api-secret.yaml \ + -csi.mountdir=/tmp/weka-csi-test/sanity-workspace/ \ + -ginkgo.seed 0 \ + -ginkgo.progress $1\ + -csi.testvolumeparameters /test/wekafs-snapvol.yaml +} + +# ---------------------- FILESYSTEM VOLUME WITH API BINDING AND SNAPSHOTS ---------------------- +filesystem_volumes() { +echo "FILESYSTEM VOLUMES STARTED" + +csi-sanity -csi.stagingdir /tmp/csi-test-staging \ + --csi.controllerendpoint /tmp/weka-csi-test/controller.sock \ + --csi.endpoint /tmp/weka-csi-test/node.sock \ + -csi.secrets /test/wekafs-api-secret.yaml \ + -csi.mountdir=/tmp/weka-csi-test/sanity-workspace/ \ + -ginkgo.seed 0 \ + -ginkgo.progress $1\ + -csi.testvolumeparameters /test/wekafs-fs.yaml +} + +"$@" \ No newline at end of file From f7f629582439a47698453ed3678abff4a0b618cc Mon Sep 17 00:00:00 2001 From: Oleksandr Holubenko Date: Mon, 27 Feb 2023 15:31:54 +0200 Subject: [PATCH 02/14] sanity --- .github/workflows/sanity.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sanity.yaml b/.github/workflows/sanity.yaml index 96480edef..db023cd88 100644 --- a/.github/workflows/sanity.yaml +++ b/.github/workflows/sanity.yaml @@ -1,6 +1,6 @@ name: sanity on: - pull_request: + push: concurrency: group: sanity=${{ github.ref }} From e1b2ebecfde48474ff6d594508b9add977f8542f Mon Sep 17 00:00:00 2001 From: Oleksandr Holubenko Date: Mon, 27 Feb 2023 15:32:58 +0200 Subject: [PATCH 03/14] sanity --- .github/workflows/sanity.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sanity.yaml b/.github/workflows/sanity.yaml index db023cd88..96480edef 100644 --- a/.github/workflows/sanity.yaml +++ b/.github/workflows/sanity.yaml @@ -1,6 +1,6 @@ name: sanity on: - push: + pull_request: concurrency: group: sanity=${{ github.ref }} From 0b262b6ae705c231973c499fad872af55d9388f4 Mon Sep 17 00:00:00 2001 From: Oleksandr Holubenko Date: Mon, 27 Feb 2023 15:35:10 +0200 Subject: [PATCH 04/14] sanity --- .github/workflows/sanity.yaml | 1 + tests/csi-sanity/ga-docker-compose1.yaml | 6 ++++++ tests/csi-sanity/ga-docker-compose2.yaml | 6 ++++++ tests/csi-sanity/ga_docker_run_sanity.sh | 2 -- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sanity.yaml b/.github/workflows/sanity.yaml index 96480edef..95c77c0ce 100644 --- a/.github/workflows/sanity.yaml +++ b/.github/workflows/sanity.yaml @@ -29,6 +29,7 @@ jobs: context: . file: tests/csi-sanity/ga-Dockerfile tags: sanity:latest + load: true legacy_sanity: needs: build diff --git a/tests/csi-sanity/ga-docker-compose1.yaml b/tests/csi-sanity/ga-docker-compose1.yaml index 489212156..cd3019e6d 100644 --- a/tests/csi-sanity/ga-docker-compose1.yaml +++ b/tests/csi-sanity/ga-docker-compose1.yaml @@ -21,5 +21,11 @@ services: network_mode: host volumes: - test-volume:/tmp/weka-csi-test + healthcheck: + test: test -f /tmp/weka-csi-test/controller-no-snaps.sock && test -f /tmp/weka-csi-test/node-no-snaps.sock + start_period: 5s + timeout: 1s + retries: 5 + interval: 3s volumes: test-volume: diff --git a/tests/csi-sanity/ga-docker-compose2.yaml b/tests/csi-sanity/ga-docker-compose2.yaml index a6f5e5535..d94bfb84b 100644 --- a/tests/csi-sanity/ga-docker-compose2.yaml +++ b/tests/csi-sanity/ga-docker-compose2.yaml @@ -21,5 +21,11 @@ services: network_mode: host volumes: - test-volume:/tmp/weka-csi-test + healthcheck: + test: test -f /tmp/weka-csi-test/controller-no-snaps.sock && test -f /tmp/weka-csi-test/node-no-snaps.sock + start_period: 5s + timeout: 1s + retries: 5 + interval: 3s volumes: test-volume: diff --git a/tests/csi-sanity/ga_docker_run_sanity.sh b/tests/csi-sanity/ga_docker_run_sanity.sh index 827c7eb6c..a5821257f 100755 --- a/tests/csi-sanity/ga_docker_run_sanity.sh +++ b/tests/csi-sanity/ga_docker_run_sanity.sh @@ -1,7 +1,5 @@ #!/usr/bin/env sh -# wait for other containers to start -sleep 8 mkdir -p /tmp/weka-csi-test/filesystems/default/test/my/path # ---------------------- LEGACY DIR VOLUME NO API BINDING (NO SNAPSHOT SUPPORT) ---------------------- From 15f0e189790bd57a48d824a2fc42a48ad9b982ed Mon Sep 17 00:00:00 2001 From: Oleksandr Holubenko Date: Mon, 27 Feb 2023 15:36:54 +0200 Subject: [PATCH 05/14] sanity --- .github/workflows/sanity.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sanity.yaml b/.github/workflows/sanity.yaml index 95c77c0ce..cc754eb2e 100644 --- a/.github/workflows/sanity.yaml +++ b/.github/workflows/sanity.yaml @@ -9,7 +9,7 @@ concurrency: env: # through 1 to 9 PLUGIN_VERBOSITY: ${{ vars.PLUGIN_VERBOSITY }} - # - '' + # - ' ' # - '-ginkgo.v' # - '-ginkgo.vv' SANITY_VERBOSITY: ${{ vars.SANITY_VERBOSITY }} From 9ce0f34e1e867a956088485e31e7fa681554f7be Mon Sep 17 00:00:00 2001 From: Oleksandr Holubenko Date: Mon, 27 Feb 2023 15:40:50 +0200 Subject: [PATCH 06/14] sanity --- tests/csi-sanity/ga-docker-compose2.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/csi-sanity/ga-docker-compose2.yaml b/tests/csi-sanity/ga-docker-compose2.yaml index d94bfb84b..5bab07758 100644 --- a/tests/csi-sanity/ga-docker-compose2.yaml +++ b/tests/csi-sanity/ga-docker-compose2.yaml @@ -22,7 +22,7 @@ services: volumes: - test-volume:/tmp/weka-csi-test healthcheck: - test: test -f /tmp/weka-csi-test/controller-no-snaps.sock && test -f /tmp/weka-csi-test/node-no-snaps.sock + test: test -f /tmp/weka-csi-test/controller.sock && test -f /tmp/weka-csi-test/node.sock start_period: 5s timeout: 1s retries: 5 From aab300484742623cf305f9ba18828e55c86d67f5 Mon Sep 17 00:00:00 2001 From: Oleksandr Holubenko Date: Mon, 27 Feb 2023 15:42:12 +0200 Subject: [PATCH 07/14] sanity --- tests/csi-sanity/ga_docker_run_sanity.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/csi-sanity/ga_docker_run_sanity.sh b/tests/csi-sanity/ga_docker_run_sanity.sh index a5821257f..6f54329cf 100755 --- a/tests/csi-sanity/ga_docker_run_sanity.sh +++ b/tests/csi-sanity/ga_docker_run_sanity.sh @@ -89,4 +89,5 @@ csi-sanity -csi.stagingdir /tmp/csi-test-staging \ -csi.testvolumeparameters /test/wekafs-fs.yaml } -"$@" \ No newline at end of file +"$@" + From 2292c1c01844d1092179fcb578aeff6cd2809063 Mon Sep 17 00:00:00 2001 From: Oleksandr Holubenko Date: Mon, 27 Feb 2023 15:48:35 +0200 Subject: [PATCH 08/14] sanity --- .github/workflows/sanity.yaml | 7 ------- tests/csi-sanity/ga_docker_run_sanity.sh | 4 ---- 2 files changed, 11 deletions(-) diff --git a/.github/workflows/sanity.yaml b/.github/workflows/sanity.yaml index cc754eb2e..634a3115d 100644 --- a/.github/workflows/sanity.yaml +++ b/.github/workflows/sanity.yaml @@ -36,19 +36,16 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/ga-docker-compose1.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: legacy_sanity - directory_volume_no_snapshots: if: always() needs: legacy_sanity runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/ga-docker-compose1.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: directory_volume_no_snapshots @@ -59,7 +56,6 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/ga-docker-compose1.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: fs_volume_no_snapshots @@ -70,7 +66,6 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/ga-docker-compose2.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: directory_volume_and_snapshots @@ -81,7 +76,6 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/ga-docker-compose2.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: snaphot_volumes_with_2nd_level_shapshots @@ -92,7 +86,6 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/ga-docker-compose2.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: filesystem_volumes diff --git a/tests/csi-sanity/ga_docker_run_sanity.sh b/tests/csi-sanity/ga_docker_run_sanity.sh index 6f54329cf..682f3af99 100755 --- a/tests/csi-sanity/ga_docker_run_sanity.sh +++ b/tests/csi-sanity/ga_docker_run_sanity.sh @@ -16,7 +16,6 @@ csi-sanity -csi.stagingdir /tmp/csi-test-staging \ -csi.testvolumeparameters /test/wekafs-dirv1.yaml } - # ---------------------- DIR VOLUME WITH API BINDING EXCLUDING SNAPSHOTS ---------------------- directory_volume_no_snapshots() { echo "DIRECTORY VOLUME NO SNAPSHOTS STARTED" @@ -31,7 +30,6 @@ csi-sanity -csi.stagingdir /tmp/csi-test-staging \ -csi.testvolumeparameters /test/wekafs-dirv1.yaml } - # ---------------------- FS VOLUME WITH API BINDING EXCLUDING SNAPSHOTS ---------------------- fs_volume_no_snapshots() { echo "FS VOLUME NO SNAPSHOTS STARTED" @@ -60,7 +58,6 @@ csi-sanity -csi.stagingdir /tmp/csi-test-staging \ -csi.testvolumeparameters /test/wekafs-dirv1.yaml } - # ---------------------- SNAPSHOT VOLUME WITH API BINDING AND SNAPSHOTS ---------------------- snaphot_volumes_with_2nd_level_shapshots() { echo "SNAPSHOT VOLUMES WITH 2nd LEVEL SNAPSHOTS STARTED" @@ -90,4 +87,3 @@ csi-sanity -csi.stagingdir /tmp/csi-test-staging \ } "$@" - From 7e60e45cdc6e443fc9971608c3c9334c4c9adaa6 Mon Sep 17 00:00:00 2001 From: Oleksandr Holubenko Date: Mon, 27 Feb 2023 17:41:48 +0200 Subject: [PATCH 09/14] sanity --- .github/workflows/sanity.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sanity.yaml b/.github/workflows/sanity.yaml index 634a3115d..dd74c9ca4 100644 --- a/.github/workflows/sanity.yaml +++ b/.github/workflows/sanity.yaml @@ -13,7 +13,7 @@ env: # - '-ginkgo.v' # - '-ginkgo.vv' SANITY_VERBOSITY: ${{ vars.SANITY_VERBOSITY }} - COMPOSE_DEFAULTS: '--exit-code-from=sanity --always-recreate-deps' + COMPOSE_DEFAULTS: '--exit-code-from=sanity --always-recreate-deps --force-recreate' jobs: build: From 0e13b57a67650b4cab19c2de9c700a1d6bb24e46 Mon Sep 17 00:00:00 2001 From: Oleksandr Holubenko Date: Tue, 28 Feb 2023 15:44:29 +0200 Subject: [PATCH 10/14] sanity --- .github/workflows/sanity.yaml | 12 ++++++------ ...pose1.yaml => docker-compose-nosnapshotcaps.yaml} | 0 ...ompose2.yaml => docker-compose-snapshotcaps.yaml} | 0 3 files changed, 6 insertions(+), 6 deletions(-) rename tests/csi-sanity/{ga-docker-compose1.yaml => docker-compose-nosnapshotcaps.yaml} (100%) rename tests/csi-sanity/{ga-docker-compose2.yaml => docker-compose-snapshotcaps.yaml} (100%) diff --git a/.github/workflows/sanity.yaml b/.github/workflows/sanity.yaml index dd74c9ca4..1946465e6 100644 --- a/.github/workflows/sanity.yaml +++ b/.github/workflows/sanity.yaml @@ -36,7 +36,7 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/ga-docker-compose1.yaml up $COMPOSE_DEFAULTS + - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: legacy_sanity @@ -46,7 +46,7 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/ga-docker-compose1.yaml up $COMPOSE_DEFAULTS + - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: directory_volume_no_snapshots @@ -56,7 +56,7 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/ga-docker-compose1.yaml up $COMPOSE_DEFAULTS + - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: fs_volume_no_snapshots @@ -66,7 +66,7 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/ga-docker-compose2.yaml up $COMPOSE_DEFAULTS + - run: docker-compose -f tests/csi-sanity/docker-compose-snapshotcaps.yaml.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: directory_volume_and_snapshots @@ -76,7 +76,7 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/ga-docker-compose2.yaml up $COMPOSE_DEFAULTS + - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: snaphot_volumes_with_2nd_level_shapshots @@ -86,6 +86,6 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/ga-docker-compose2.yaml up $COMPOSE_DEFAULTS + - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: filesystem_volumes diff --git a/tests/csi-sanity/ga-docker-compose1.yaml b/tests/csi-sanity/docker-compose-nosnapshotcaps.yaml similarity index 100% rename from tests/csi-sanity/ga-docker-compose1.yaml rename to tests/csi-sanity/docker-compose-nosnapshotcaps.yaml diff --git a/tests/csi-sanity/ga-docker-compose2.yaml b/tests/csi-sanity/docker-compose-snapshotcaps.yaml similarity index 100% rename from tests/csi-sanity/ga-docker-compose2.yaml rename to tests/csi-sanity/docker-compose-snapshotcaps.yaml From 99c3d211c152815b55f27bb662348af2dfe599c7 Mon Sep 17 00:00:00 2001 From: Oleksandr Holubenko Date: Tue, 28 Feb 2023 15:50:00 +0200 Subject: [PATCH 11/14] sanity --- .github/workflows/sanity.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sanity.yaml b/.github/workflows/sanity.yaml index 1946465e6..8a2fafff6 100644 --- a/.github/workflows/sanity.yaml +++ b/.github/workflows/sanity.yaml @@ -36,7 +36,7 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml.yaml up $COMPOSE_DEFAULTS + - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: legacy_sanity @@ -46,7 +46,7 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml.yaml up $COMPOSE_DEFAULTS + - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: directory_volume_no_snapshots @@ -56,7 +56,7 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml.yaml up $COMPOSE_DEFAULTS + - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: fs_volume_no_snapshots @@ -66,7 +66,7 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/docker-compose-snapshotcaps.yaml.yaml up $COMPOSE_DEFAULTS + - run: docker-compose -f tests/csi-sanity/docker-compose-snapshotcaps.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: directory_volume_and_snapshots @@ -76,7 +76,7 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml.yaml up $COMPOSE_DEFAULTS + - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: snaphot_volumes_with_2nd_level_shapshots @@ -86,6 +86,6 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml.yaml up $COMPOSE_DEFAULTS + - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: filesystem_volumes From 4a9bf00b2deaaefc0267a396c945d74a040837d4 Mon Sep 17 00:00:00 2001 From: Oleksandr Holubenko Date: Tue, 28 Feb 2023 15:55:22 +0200 Subject: [PATCH 12/14] sanity --- .github/workflows/sanity.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/sanity.yaml b/.github/workflows/sanity.yaml index 8a2fafff6..d7dc01195 100644 --- a/.github/workflows/sanity.yaml +++ b/.github/workflows/sanity.yaml @@ -20,7 +20,6 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: echo "${{ secrets.WEKAFS_API_SECRET_YAML }}" > tests/csi-sanity/wekafs-api-secret.yaml - uses: docker/setup-buildx-action@v2 From e3427d6586b9d8e565297fbb4f793a5f1a2eff66 Mon Sep 17 00:00:00 2001 From: Oleksandr Holubenko Date: Tue, 28 Feb 2023 16:03:12 +0200 Subject: [PATCH 13/14] sanity --- .github/workflows/sanity.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sanity.yaml b/.github/workflows/sanity.yaml index d7dc01195..6ae867eca 100644 --- a/.github/workflows/sanity.yaml +++ b/.github/workflows/sanity.yaml @@ -3,7 +3,7 @@ on: pull_request: concurrency: - group: sanity=${{ github.ref }} + group: ${{ github.ref }} cancel-in-progress: true env: @@ -40,7 +40,7 @@ jobs: SANITY_FUNCTION: legacy_sanity directory_volume_no_snapshots: - if: always() + if: success() || failure() # always() can't be canceled needs: legacy_sanity runs-on: self-hosted steps: @@ -50,7 +50,7 @@ jobs: SANITY_FUNCTION: directory_volume_no_snapshots fs_volume_no_snapshots: - if: always() + if: success() || failure() needs: directory_volume_no_snapshots runs-on: self-hosted steps: @@ -60,7 +60,7 @@ jobs: SANITY_FUNCTION: fs_volume_no_snapshots directory_volume_and_snapshots: - if: always() + if: success() || failure() needs: fs_volume_no_snapshots runs-on: self-hosted steps: @@ -70,7 +70,7 @@ jobs: SANITY_FUNCTION: directory_volume_and_snapshots snaphot_volumes_with_2nd_level_shapshots: - if: always() + if: success() || failure() needs: directory_volume_and_snapshots runs-on: self-hosted steps: @@ -80,7 +80,7 @@ jobs: SANITY_FUNCTION: snaphot_volumes_with_2nd_level_shapshots filesystem_volumes: - if: always() + if: success() || failure() needs: snaphot_volumes_with_2nd_level_shapshots runs-on: self-hosted steps: From e93311a25513d880845c1d6c19564be888764423 Mon Sep 17 00:00:00 2001 From: Oleksandr Holubenko Date: Tue, 28 Feb 2023 16:19:39 +0200 Subject: [PATCH 14/14] sanity --- .github/workflows/sanity.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sanity.yaml b/.github/workflows/sanity.yaml index 6ae867eca..ce518d74d 100644 --- a/.github/workflows/sanity.yaml +++ b/.github/workflows/sanity.yaml @@ -75,7 +75,7 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml up $COMPOSE_DEFAULTS + - run: docker-compose -f tests/csi-sanity/docker-compose-snapshotcaps.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: snaphot_volumes_with_2nd_level_shapshots @@ -85,6 +85,6 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v3 - - run: docker-compose -f tests/csi-sanity/docker-compose-nosnapshotcaps.yaml up $COMPOSE_DEFAULTS + - run: docker-compose -f tests/csi-sanity/docker-compose-snapshotcaps.yaml up $COMPOSE_DEFAULTS env: SANITY_FUNCTION: filesystem_volumes