Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ci): simplify sqlsmith workflow #12592

Merged
merged 3 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading