diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67a48cb8dd..a581397936 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -881,7 +881,7 @@ jobs: retention-days: 1 k8_upgrade_test: - name: Upgrade cluster test on (${{ matrix.run }}) + name: Upgrade K8S cluster test on (${{ matrix.run }}) needs: build_image runs-on: ${{ matrix.os }} strategy: @@ -945,6 +945,50 @@ jobs: path: diagnostics*.gz retention-days: 1 + local_upgrade_test: + name: Upgrade local cluster test on (${{ matrix.run }}) + needs: build_primary_binaries + runs-on: ${{ matrix.os }} + strategy: + # fail-fast: false + matrix: + os: [ubuntu-latest] + rust-target: [x86_64-unknown-linux-musl] + run: [r1] + steps: + - uses: actions/checkout@v4 + # Download artifacts + - name: Download artifact - fluvio + uses: actions/download-artifact@v4 + with: + name: fluvio-${{ matrix.rust-target }} + path: ~/bin + - name: Mark executable + run: | + chmod +x ~/bin/fluvio && ~/bin/fluvio version + echo "${HOME}/bin" >> $GITHUB_PATH + + - name: Run upgrade test with CI artifacts + timeout-minutes: 10 + env: + TEST_DATA_BYTES: 10000 + run: | + date + make FLUVIO_MODE=local FLUVIO_BIN=~/bin/fluvio upgrade-test + + - name: Run diagnostics + if: ${{ !success() }} + timeout-minutes: 5 + run: fluvio cluster diagnostics + - name: Upload logs + timeout-minutes: 5 + if: ${{ !success() }} + uses: actions/upload-artifact@v4 + with: + name: k8_upgrade_${{ matrix.run }}_log + path: diagnostics*.gz + retention-days: 1 + # Smoke test across different version of fluvio cli_smoke: name: CLI smoke test (${{ matrix.test }}) CLI (${{ matrix.cli_version }}) on cluster (${{ matrix.cluster_version }}) diff --git a/tests/upgrade-test.sh b/tests/upgrade-test.sh index 77b1f9f424..a421b5c8b8 100755 --- a/tests/upgrade-test.sh +++ b/tests/upgrade-test.sh @@ -35,6 +35,7 @@ readonly PRERELEASE_TOPIC=${PRERELEASE_TOPIC:-prerelease} readonly USE_LATEST=${USE_LATEST:-} readonly FLUVIO_BIN=$(${READLINK} -f ${FLUVIO_BIN:-"$(which fluvio)"}) readonly FVM_BIN=$(${READLINK} -f ${FVM_BIN:-"~/.fvm/bin/fvm"}) +readonly FLUVIO_MODE=${FLUVIO_MODE:-"k8"} # Change to this script's directory pushd "$(dirname "$(${READLINK} -f "$0")")" > /dev/null @@ -75,7 +76,12 @@ function validate_cluster_stable() { ~/.fvm/bin/fvm switch stable echo "Installing stable fluvio cluster" - $STABLE_FLUVIO cluster start --k8 + if [[ "$FLUVIO_MODE" == "local" ]]; then + $STABLE_FLUVIO cluster start --local + else + $STABLE_FLUVIO cluster start --k8 + fi + ci_check; # Baseline: CLI version and platform version are expected to be the same @@ -163,6 +169,12 @@ function validate_upgrade_cluster_to_prerelease() { fi popd + if [[ "$FLUVIO_MODE" == "local" ]]; then + echo "Resuming local cluster" + $FLUVIO_BIN_ABS_PATH cluster resume + fi + + # Validate that the development version output matches the expected version from installer output $FLUVIO_BIN_ABS_PATH version validate_cli_version $FLUVIO_BIN_ABS_PATH $TARGET_VERSION