diff --git a/ci/scripts/run-e2e-test.sh b/ci/scripts/run-e2e-test.sh index ef11428ad5d00..793b12dde8b2c 100755 --- a/ci/scripts/run-e2e-test.sh +++ b/ci/scripts/run-e2e-test.sh @@ -80,7 +80,6 @@ RUST_LOG="info,risingwave_stream=info,risingwave_batch=info,risingwave_storage=i cluster_start # Please make sure the regression is expected before increasing the timeout. sqllogictest -p 4566 -d dev './e2e_test/streaming/**/*.slt' --junit "streaming-${profile}" -sqllogictest -p 4566 -d dev './e2e_test/backfill/rate_limit/*.slt' sqllogictest -p 4566 -d dev './e2e_test/backfill/sink/different_pk_and_dist_key.slt' echo "--- Kill cluster" @@ -115,7 +114,6 @@ pkill python3 sqllogictest -p 4566 -d dev './e2e_test/udf/alter_function.slt' sqllogictest -p 4566 -d dev './e2e_test/udf/graceful_shutdown_python.slt' -sqllogictest -p 4566 -d dev './e2e_test/udf/always_retry_python.slt' # FIXME: flaky test # sqllogictest -p 4566 -d dev './e2e_test/udf/retry_python.slt' diff --git a/ci/scripts/slow-e2e-test.sh b/ci/scripts/slow-e2e-test.sh new file mode 100644 index 0000000000000..b8fe5ee20ca81 --- /dev/null +++ b/ci/scripts/slow-e2e-test.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash + +# Exits as soon as any line fails. +set -euo pipefail + +while getopts 'p:m:' opt; do + case ${opt} in + p ) + profile=$OPTARG + ;; + m ) + mode=$OPTARG + ;; + \? ) + echo "Invalid Option: -$OPTARG" 1>&2 + exit 1 + ;; + : ) + echo "Invalid option: $OPTARG requires an argument" 1>&2 + ;; + esac +done +shift $((OPTIND -1)) + +source ci/scripts/common.sh + +download_and_prepare_rw "$profile" common + + +echo "--- Download artifacts" +mkdir -p e2e_test/udf/wasm/target/wasm32-wasi/release/ +buildkite-agent artifact download udf.wasm e2e_test/udf/wasm/target/wasm32-wasi/release/ +buildkite-agent artifact download udf.jar ./ + +echo "--- e2e, $mode, slow-udf-tests" +RUST_LOG="info" \ +risedev ci-start "$mode" +sqllogictest -p 4566 -d dev './e2e_test/udf/always_retry_python.slt' +sqllogictest -p 4566 -d dev './e2e_test/backfill/rate_limit/slow-udf.slt' diff --git a/ci/workflows/main-cron.yml b/ci/workflows/main-cron.yml index 1cbdefb6e7540..acbf3ec3e6e5c 100644 --- a/ci/workflows/main-cron.yml +++ b/ci/workflows/main-cron.yml @@ -90,6 +90,18 @@ steps: timeout_in_minutes: 15 retry: *auto-retry + - label: "slow end-to-end test (release)" + key: "slow-e2e-test-release" + command: "ci/scripts/slow-e2e-test.sh -p ci-release -m ci-3streaming-2serving-3fe" + if: | + !(build.pull_request.labels includes "ci/main-cron/skip-ci") && build.env("CI_STEPS") == null + || build.pull_request.labels includes "ci/run-slow-e2e-test" + || build.env("CI_STEPS") =~ /(^|,)slow-e2e-tests?(,|$$)/ + depends_on: + - "build" + - "build-other" + - "docslt" + - label: "meta backup test (release)" key: "e2e-meta-backup-test-release" command: "ci/scripts/run-meta-backup-test.sh -p ci-release -m ci-3streaming-2serving-3fe" diff --git a/e2e_test/udf/always_retry_python.slt b/e2e_test/udf/always_retry_python.slt index 31179c13f7d45..d7ef867a249f1 100644 --- a/e2e_test/udf/always_retry_python.slt +++ b/e2e_test/udf/always_retry_python.slt @@ -2,7 +2,7 @@ system ok python3 e2e_test/udf/test.py & # wait for server to start -sleep 5s +sleep 10s statement ok CREATE FUNCTION sleep_always_retry(INT) RETURNS INT AS 'sleep' USING LINK 'http://localhost:8815' WITH ( always_retry_on_network_error = true ); @@ -33,9 +33,9 @@ CREATE MATERIALIZED VIEW mv_no_retry AS SELECT sleep_no_retry(v1) as s1 from t; statement ok CREATE MATERIALIZED VIEW mv_always_retry AS SELECT sleep_always_retry(v1) as s1 from t; -# Immediately kill the server, sleep for 10s. +# Immediately kill the server, sleep system ok -pkill -9 -i python && sleep 10 +pkill -9 -i python && sleep 50 # Restart the server system ok