diff --git a/ci/scripts/cron-fuzz-test.sh b/ci/scripts/cron-fuzz-test.sh index fbddea00261e1..d8eb3c6e59857 100755 --- a/ci/scripts/cron-fuzz-test.sh +++ b/ci/scripts/cron-fuzz-test.sh @@ -4,12 +4,14 @@ set -euo pipefail source ci/scripts/common.sh -export RUN_SQLSMITH=0 + # NOTE(kwannoel): Disabled because there's some breakage after #12485, # see https://github.com/risingwavelabs/risingwave/issues/12577. # Frontend is relatively stable, e2e fuzz test will cover the same cases also, # so we can just disable it. # export RUN_SQLSMITH_FRONTEND=1 + +export RUN_SQLSMITH=1 export SQLSMITH_COUNT=1000 export TEST_NUM=100 source ci/scripts/run-fuzz-test.sh diff --git a/ci/scripts/pr-fuzz-test.sh b/ci/scripts/pr-fuzz-test.sh index 29091e2a0d26f..6d1d47315e282 100755 --- a/ci/scripts/pr-fuzz-test.sh +++ b/ci/scripts/pr-fuzz-test.sh @@ -16,28 +16,27 @@ NOT_MATCHES="\.md" CHANGED=$(git diff --name-only origin/main | grep -v "$NOT_MATCHES" | grep "$MATCHES") set -e -# Always run sqlsmith frontend tests # NOTE(kwannoel): Disabled because there's some breakage after #12485, # see https://github.com/risingwavelabs/risingwave/issues/12577. # Frontend is relatively stable, e2e fuzz test will cover the same cases also, # so we can just disable it. # export RUN_SQLSMITH_FRONTEND=1 + export RUN_SQLSMITH=1 export SQLSMITH_COUNT=100 # Run e2e tests if changes to sqlsmith source files detected. -# NOTE(kwannoel): Keep this here in-case we ever want to revert. -#if [[ -n "$CHANGED" ]]; then -# echo "--- Checking whether to run all sqlsmith tests" -# echo "origin/main SHA: $(git rev-parse origin/main)" -# echo "Changes to Sqlsmith source files detected:" -# echo "$CHANGED" -# export RUN_SQLSMITH=1 -# export SQLSMITH_COUNT=100 -# export TEST_NUM=32 -# echo "Enabled Sqlsmith tests." -#else -# export RUN_SQLSMITH=0 -#fi +if [[ -n "$CHANGED" ]]; then + echo "--- Checking whether to run all sqlsmith tests" + echo "origin/main SHA: $(git rev-parse origin/main)" + echo "Changes to Sqlsmith source files detected:" + echo "$CHANGED" + export RUN_SQLSMITH=1 + export SQLSMITH_COUNT=100 + export TEST_NUM=32 + echo "Enabled Sqlsmith tests." +else + export RUN_SQLSMITH=0 +fi source ci/scripts/run-fuzz-test.sh diff --git a/ci/workflows/pull-request.yml b/ci/workflows/pull-request.yml index d289dd130b8ae..baaf73a3b597e 100644 --- a/ci/workflows/pull-request.yml +++ b/ci/workflows/pull-request.yml @@ -491,3 +491,18 @@ steps: - ./ci/plugins/upload-failure-logs timeout_in_minutes: 25 retry: *auto-retry + + - label: "fuzz test" + command: "ci/scripts/pr-fuzz-test.sh -p ci-dev" + depends_on: + - "build" + - "build-simulation" + plugins: + - ./ci/plugins/swapfile + - docker-compose#v4.9.0: + run: rw-build-env + config: ci/docker-compose.yml + mount-buildkite-agent: true + - ./ci/plugins/upload-failure-logs + timeout_in_minutes: 15 + retry: *auto-retry diff --git a/ci/workflows/sqlsmith-tests.yml b/ci/workflows/sqlsmith-tests.yml deleted file mode 100644 index 201b3dd8bd20c..0000000000000 --- a/ci/workflows/sqlsmith-tests.yml +++ /dev/null @@ -1,43 +0,0 @@ -auto-retry: &auto-retry - automatic: - # Agent terminated because the AWS EC2 spot instance killed by AWS. - - signal_reason: agent_stop - limit: 3 - -steps: - - label: "check ci image rebuild" - plugins: - - chronotc/monorepo-diff#v2.3.0: - diff: "git diff --name-only origin/main" - watch: - - path: "ci/build-ci-image.sh" - config: - command: "ci/build-ci-image.sh" - label: "ci build images" - retry: *auto-retry - - wait - - - label: "build" - command: "ci/scripts/build.sh -p ci-dev" - key: "build" - plugins: - - docker-compose#v4.9.0: - run: rw-build-env - config: ci/docker-compose.yml - mount-buildkite-agent: true - timeout_in_minutes: 15 - retry: *auto-retry - - - label: "fuzz test" - command: "ci/scripts/pr-fuzz-test.sh -p ci-dev" - depends_on: - - "build" - plugins: - - ./ci/plugins/swapfile - - docker-compose#v4.9.0: - run: rw-build-env - config: ci/docker-compose.yml - mount-buildkite-agent: true - - ./ci/plugins/upload-failure-logs - timeout_in_minutes: 25 - retry: *auto-retry