Skip to content

Commit

Permalink
partition slow udf tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed May 27, 2024
1 parent a0d7323 commit 64acfec
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 5 deletions.
2 changes: 0 additions & 2 deletions ci/scripts/run-e2e-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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'

Expand Down
39 changes: 39 additions & 0 deletions ci/scripts/slow-e2e-test.sh
Original file line number Diff line number Diff line change
@@ -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'
12 changes: 12 additions & 0 deletions ci/workflows/main-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions e2e_test/udf/always_retry_python.slt
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 64acfec

Please sign in to comment.