Skip to content

Commit

Permalink
refactor(ci): simplify sqlsmith workflow (#12592)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel authored Sep 29, 2023
1 parent 78b83df commit 31aac5a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 60 deletions.
9 changes: 7 additions & 2 deletions ci/scripts/cron-fuzz-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
set -euo pipefail

source ci/scripts/common.sh
export RUN_SQLSMITH=0
export RUN_SQLSMITH_FRONTEND=1

# 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=0
export RUN_SQLSMITH=1
export SQLSMITH_COUNT=1000
export TEST_NUM=100
source ci/scripts/run-fuzz-test.sh
32 changes: 17 additions & 15 deletions ci/scripts/pr-fuzz-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,26 @@ NOT_MATCHES="\.md"
CHANGED=$(git diff --name-only origin/main | grep -v "$NOT_MATCHES" | grep "$MATCHES")
set -e

# Always run sqlsmith frontend tests
export RUN_SQLSMITH_FRONTEND=1
# 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=0
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
15 changes: 15 additions & 0 deletions ci/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
43 changes: 0 additions & 43 deletions ci/workflows/sqlsmith-tests.yml

This file was deleted.

0 comments on commit 31aac5a

Please sign in to comment.