Skip to content

Commit db1c4cc

Browse files
authored
Merge branch 'main' into zl_clnstate
2 parents 5f34a84 + f036974 commit db1c4cc

File tree

243 files changed

+6458
-3158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

243 files changed

+6458
-3158
lines changed

Cargo.lock

Lines changed: 11 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ members = [
3131
"src/tests/compaction_test",
3232
"src/tests/regress",
3333
"src/tests/simulation",
34-
"src/tests/simulation_scale",
3534
"src/tests/sqlsmith",
3635
"src/tracing",
3736
"src/utils/async_stack_trace",

Makefile.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ script = """
582582
set -e
583583
584584
cargo nextest run \
585-
-p risingwave_simulation_scale \
585+
-p risingwave_simulation \
586586
"$@"
587587
"""
588588

@@ -596,7 +596,7 @@ script = """
596596
set -e
597597
598598
cargo nextest archive \
599-
-p risingwave_simulation_scale \
599+
-p risingwave_simulation \
600600
--archive-file scale-test.tar.zst \
601601
"$@"
602602
"""

ci/scripts/build-other.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ set -euo pipefail
55

66
source ci/scripts/common.env.sh
77

8+
# Should set a stable version of connector node
9+
STABLE_VERSION=e31eb0bf6e4f708ceadce846538fc6bd55978c59
10+
811
echo "--- Build Java connector node"
9-
# clone a released version(tag)
10-
git clone --branch v0.0.2 --depth 1 https://"$GITHUB_TOKEN"@github.com/risingwavelabs/risingwave-connector-node.git
12+
git clone --depth 1 https://"$GITHUB_TOKEN"@github.com/risingwavelabs/risingwave-connector-node.git
1113
cd risingwave-connector-node
14+
# checkout a stable version
15+
git checkout $STABLE_VERSION
1216
mvn package -Dmaven.test.skip=true
1317
echo "--- Upload Java artifacts"
1418
cp service/target/service-*.jar ./connector-service.jar

ci/scripts/pre-unit-test.sh renamed to ci/scripts/check.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ set -euo pipefail
55

66
source ci/scripts/common.env.sh
77

8-
echo "--- Run clippy check"
8+
echo "--- Run clippy check (dev, all features)"
99
cargo clippy --all-targets --all-features --locked -- -D warnings
1010

11+
echo "--- Run clippy check (release)"
12+
cargo clippy --release --all-targets --features "static-link static-log-level" --locked -- -D warnings
13+
1114
echo "--- Build documentation"
1215
cargo doc --document-private-items --no-deps
1316

ci/scripts/deterministic-e2e-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ echo "--- deterministic simulation e2e, ci-3cn-1fe, batch"
2424
seq 16 | parallel MADSIM_TEST_SEED={} './risingwave_simulation ./e2e_test/batch/\*\*/\*.slt > $LOGDIR/batch-{}.log && rm $LOGDIR/batch-{}.log'
2525

2626
echo "--- deterministic simulation e2e, ci-3cn-1fe, kafka source"
27-
seq 16 | parallel MADSIM_TEST_SEED={} './risingwave_simulation ./e2e_test/source/kafka.slt > $LOGDIR/source-{}.log && rm $LOGDIR/source-{}.log'
27+
seq 16 | parallel MADSIM_TEST_SEED={} './risingwave_simulation --kafka-datadir=./scripts/source/test_data ./e2e_test/source/kafka.slt > $LOGDIR/source-{}.log && rm $LOGDIR/source-{}.log'
2828

2929
echo "--- deterministic simulation e2e, ci-3cn-2fe, parallel, streaming"
3030
seq 16 | parallel MADSIM_TEST_SEED={} './risingwave_simulation -j 16 ./e2e_test/streaming/\*\*/\*.slt > $LOGDIR/parallel-streaming-{}.log && rm $LOGDIR/parallel-streaming-{}.log'

ci/scripts/deterministic-recovery-test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export LOGDIR=.risingwave/log
1212
mkdir -p $LOGDIR
1313

1414
echo "--- deterministic simulation e2e, ci-3cn-1fe, recovery, streaming"
15-
seq 1 | parallel MADSIM_TEST_SEED={} './risingwave_simulation --kill-meta --kill-frontend --kill-compute --kill-compactor --kill-rate=${KILL_RATE} ./e2e_test/streaming/\*\*/\*.slt > $LOGDIR/recovery-streaming-{}.log && rm $LOGDIR/recovery-streaming-{}.log'
15+
seq 16 | parallel MADSIM_TEST_SEED={} './risingwave_simulation --kill --kill-rate=${KILL_RATE} ./e2e_test/streaming/\*\*/\*.slt > $LOGDIR/recovery-streaming-{}.log && rm $LOGDIR/recovery-streaming-{}.log'
1616

1717
echo "--- deterministic simulation e2e, ci-3cn-1fe, recovery, batch"
18-
seq 1 | parallel MADSIM_TEST_SEED={} './risingwave_simulation --kill-meta --kill-frontend --kill-compute --kill-compactor --kill-rate=${KILL_RATE} ./e2e_test/batch/\*\*/\*.slt > $LOGDIR/recovery-batch-{}.log && rm $LOGDIR/recovery-batch-{}.log'
18+
seq 16 | parallel MADSIM_TEST_SEED={} './risingwave_simulation --kill --kill-rate=${KILL_RATE} ./e2e_test/batch/\*\*/\*.slt > $LOGDIR/recovery-batch-{}.log && rm $LOGDIR/recovery-batch-{}.log'

ci/scripts/docker.sh

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,15 @@ docker build -f docker/Dockerfile -t "${ghcraddr}:${BUILDKITE_COMMIT}-${arch}" -
1414
echo "--- docker images"
1515
docker images
1616

17-
if [ "$PUSH" = true ]; then
18-
echo "--- ghcr login"
19-
echo "$GHCR_TOKEN" | docker login ghcr.io -u "$GHCR_USERNAME" --password-stdin
17+
echo "--- ghcr login"
18+
echo "$GHCR_TOKEN" | docker login ghcr.io -u "$GHCR_USERNAME" --password-stdin
2019

21-
echo "--- dockerhub login"
22-
echo "$DOCKER_TOKEN" | docker login -u "risingwavelabs" --password-stdin
20+
echo "--- dockerhub login"
21+
echo "$DOCKER_TOKEN" | docker login -u "risingwavelabs" --password-stdin
2322

24-
echo "--- docker push to ghcr"
25-
docker push "${ghcraddr}:${BUILDKITE_COMMIT}-${arch}"
23+
echo "--- docker push to ghcr"
24+
docker push "${ghcraddr}:${BUILDKITE_COMMIT}-${arch}"
2625

27-
echo "--- docker push to dockerhub"
28-
docker tag "${ghcraddr}:${BUILDKITE_COMMIT}-${arch}" "${dockerhubaddr}:${BUILDKITE_COMMIT}-${arch}"
29-
docker push "${dockerhubaddr}:${BUILDKITE_COMMIT}-${arch}"
30-
fi
26+
echo "--- docker push to dockerhub"
27+
docker tag "${ghcraddr}:${BUILDKITE_COMMIT}-${arch}" "${dockerhubaddr}:${BUILDKITE_COMMIT}-${arch}"
28+
docker push "${dockerhubaddr}:${BUILDKITE_COMMIT}-${arch}"

ci/scripts/e2e-source-test.sh

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,32 @@ apt-get -y install mysql-client
5656
# import data to mysql
5757
mysql --host=mysql --port=3306 -u root -p123456 < ./e2e_test/source/cdc/mysql_cdc.sql
5858
# start risingwave cluster
59-
cargo make ci-start ci-1cn-1fe
59+
cargo make ci-start ci-1cn-1fe-with-recovery
6060
# start cdc connector node
6161
nohup java -jar ./connector-service.jar --port 60061 > .risingwave/log/connector-source.log 2>&1 &
6262
sleep 1
6363
sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.load.slt'
6464
# wait for cdc loading
65-
sleep 4
65+
sleep 10
6666
sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.check.slt'
6767

68+
# kill cluster
69+
cargo make kill
70+
# start cluster w/o clean-data
71+
cargo make dev ci-1cn-1fe-with-recovery
72+
echo "wait for recovery finish"
73+
sleep 10
74+
echo "check mviews after cluster recovery"
75+
# check snapshot
76+
sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.check.slt'
77+
# insert new rows
78+
mysql --host=mysql --port=3306 -u root -p123456 < ./e2e_test/source/cdc/mysql_cdc_insert.sql
79+
# wait cdc ingesting
80+
sleep 10
81+
# check new results
82+
sqllogictest -p 4566 -d dev './e2e_test/source/cdc/cdc.check_new_rows.slt'
83+
84+
6885
echo "--- Kill cluster"
6986
pkill -f connector-service.jar
7087
cargo make ci-kill

ci/scripts/release.sh

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,38 @@ echo "--- Install protoc3"
1212
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip
1313
unzip -o protoc-3.15.8-linux-x86_64.zip -d /usr/local bin/protoc
1414

15-
echo "--- Install gh cli"
16-
yum install -y dnf
17-
dnf install -y 'dnf-command(config-manager)'
18-
dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
19-
dnf install -y gh
20-
2115
echo "--- Install lld"
2216
yum install -y centos-release-scl-rh
2317
yum install -y llvm-toolset-7.0-lld
2418
source /opt/rh/llvm-toolset-7.0/enable
2519

26-
echo "--- Release create"
27-
gh release create "${BUILDKITE_TAG}" --generate-notes -d -p
20+
echo "--- Install aws cli"
21+
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
22+
unzip -q awscliv2.zip && ./aws/install && mv /usr/local/bin/aws /bin/aws
2823

29-
echo "--- Build release asset"
24+
echo "--- Build release binary"
3025
cargo build -p risingwave_cmd_all --features "static-link static-log-level" --profile release
31-
cd target/release
32-
chmod +x risingwave
33-
tar -czvf risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux.tar.gz risingwave
26+
cd target/release && chmod +x risingwave
27+
28+
echo "--- Upload nightly binary to s3"
29+
tar -czvf risingwave-"$(date '+%Y%m%d')"-x86_64-unknown-linux.tar.gz risingwave
30+
aws s3 cp risingwave-"$(date '+%Y%m%d')"-x86_64-unknown-linux.tar.gz s3://risingwave-nightly-pre-built-binary
31+
32+
if [[ -n "${BUILDKITE_TAG+x}" ]]; then
33+
echo "--- Install gh cli"
34+
yum install -y dnf
35+
dnf install -y 'dnf-command(config-manager)'
36+
dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
37+
dnf install -y gh
38+
39+
echo "--- Release create"
40+
gh release create "${BUILDKITE_TAG}" --notes "release ${BUILDKITE_TAG}" -d -p
41+
42+
echo "--- Release upload asset"
43+
tar -czvf risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux.tar.gz risingwave
44+
gh release upload "${BUILDKITE_TAG}" risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux.tar.gz
45+
fi
46+
47+
48+
3449

35-
echo "--- Release upload asset"
36-
gh release upload "${BUILDKITE_TAG}" risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux.tar.gz

ci/workflows/docker.yml

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
projects:
2-
- label: docker-pr
3-
path: docker/
4-
skip:
5-
- docker-build-push*
6-
- multi-arch-image-create-push
7-
- label: docker-schedule-ui
8-
path: .
9-
skip:
10-
- docker-build-pr
11-
121
auto-retry: &auto-retry
132
automatic:
143
- exit_status: -1 # Agent was lost
@@ -17,21 +6,9 @@ auto-retry: &auto-retry
176
limit: 2
187

198
steps:
20-
- label: "docker-build-pr"
21-
command: "ci/scripts/docker.sh"
22-
if: build.source != "schedule"
23-
env:
24-
BUILDPIPE_SCOPE: project
25-
PUSH: false
26-
retry: *auto-retry
27-
289
- label: "docker-build-push: amd64"
2910
command: "ci/scripts/docker.sh"
3011
key: "build-amd64"
31-
if: build.source == "schedule" || build.source == "ui"
32-
env:
33-
BUILDPIPE_SCOPE: project
34-
PUSH: true
3512
plugins:
3613
- seek-oss/aws-sm#v2.3.1:
3714
env:
@@ -43,10 +20,6 @@ steps:
4320
- label: "docker-build-push: aarch64"
4421
command: "ci/scripts/docker.sh"
4522
key: "build-aarch64"
46-
if: build.source == "schedule" || build.source == "ui"
47-
env:
48-
BUILDPIPE_SCOPE: project
49-
PUSH: true
5023
plugins:
5124
- seek-oss/aws-sm#v2.3.1:
5225
env:
@@ -59,16 +32,21 @@ steps:
5932

6033
- label: "multi-arch-image-create-push"
6134
command: "ci/scripts/multi-arch-docker.sh"
62-
if: build.source == "schedule" || build.source == "ui"
6335
depends_on:
6436
- "build-amd64"
6537
- "build-aarch64"
66-
env:
67-
BUILDPIPE_SCOPE: project
6838
plugins:
6939
- seek-oss/aws-sm#v2.3.1:
7040
env:
7141
GHCR_USERNAME: ghcr-username
7242
GHCR_TOKEN: ghcr-token
7343
DOCKER_TOKEN: docker-token
44+
retry: *auto-retry
45+
46+
- label: "pre build binary"
47+
command: "ci/scripts/release.sh"
48+
plugins:
49+
- docker-compose#v3.9.0:
50+
run: release-env
51+
config: ci/docker-compose.yml
7452
retry: *auto-retry

0 commit comments

Comments
 (0)