Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into sts/stream_key_sink_p…
Browse files Browse the repository at this point in the history
…k_mismatch
  • Loading branch information
st1page committed Sep 26, 2023
2 parents 7e52a5d + 09a1dcb commit b86af93
Show file tree
Hide file tree
Showing 284 changed files with 9,323 additions and 3,871 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/hakari_fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}

- name: Install cargo-hakari
uses: taiki-e/install-action@v2
Expand Down
45 changes: 27 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ members = [
"src/sqlparser/test_runner",
"src/storage",
"src/storage/backup",
"src/storage/backup/cmd",
"src/storage/compactor",
"src/storage/hummock_sdk",
"src/storage/hummock_test",
Expand Down
23 changes: 22 additions & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ env_scripts = [
#!@duckscript
# only duckscript can modify env variables in cargo-make
# duckscript doc: https://github.com/sagiegurari/duckscript/blob/master/docs/sdk.md
set_env ENABLE_TELEMETRY "false"
Expand Down Expand Up @@ -70,6 +71,26 @@ else
set_env BUILD_HUMMOCK_TRACE_CMD ""
end
is_ci = get_env RISINGWAVE_CI
is_not_ci = not ${is_ci}
if ${is_not_ci}
query_log_path = get_env RW_QUERY_LOG_PATH
no_query_log_path = not ${query_log_path}
if ${no_query_log_path}
set_env RW_QUERY_LOG_PATH "${PREFIX_LOG}"
fi
rust_log = get_env RUST_LOG
no_rust_log = not ${rust_log}
if ${no_rust_log}
set_env RUST_LOG "pgwire_query_log=info"
else
set_env RUST_LOG "pgwire_query_log=info,${rust_log}"
end
end
''',
]

Expand Down Expand Up @@ -1292,7 +1313,7 @@ echo "All processes has exited."

[tasks.slt]
category = "RiseDev - SQLLogicTest"
install_crate = { version = "0.15.3", crate_name = "sqllogictest-bin", binary = "sqllogictest", test_arg = [
install_crate = { version = "0.17.0", crate_name = "sqllogictest-bin", binary = "sqllogictest", test_arg = [
"--help",
], install_command = "binstall" }
command = "sqllogictest"
Expand Down
2 changes: 1 addition & 1 deletion ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
RUN cargo binstall -y --no-symlinks cargo-llvm-cov cargo-nextest cargo-hakari cargo-sort cargo-cache cargo-audit \
[email protected] \
sqllogictest-bin@0.15.3 \
sqllogictest-bin@0.17.0 \
&& cargo install sccache \
&& cargo cache -a \
&& rm -rf "/root/.cargo/registry/index" \
Expand Down
2 changes: 1 addition & 1 deletion ci/build-ci-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cat ../rust-toolchain
# !!! CHANGE THIS WHEN YOU WANT TO BUMP CI IMAGE !!! #
# AND ALSO docker-compose.yml #
######################################################
export BUILD_ENV_VERSION=v20230914
export BUILD_ENV_VERSION=v20230919

export BUILD_TAG="public.ecr.aws/x5u3w5h6/rw-build-env:${BUILD_ENV_VERSION}"

Expand Down
27 changes: 22 additions & 5 deletions ci/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ services:
retries: 5

source-test-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230914
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230919
depends_on:
- mysql
- db
Expand All @@ -81,22 +81,23 @@ services:
- ..:/risingwave

sink-test-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230914
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230919
depends_on:
- mysql
- db
- elasticsearch
- clickhouse-server
- pulsar
volumes:
- ..:/risingwave

rw-build-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230914
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230919
volumes:
- ..:/risingwave

ci-flamegraph-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230914
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230919
# NOTE(kwannoel): This is used in order to permit
# syscalls for `nperf` (perf_event_open),
# so it can do CPU profiling.
Expand All @@ -107,7 +108,7 @@ services:
- ..:/risingwave

regress-test-env:
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230914
image: public.ecr.aws/x5u3w5h6/rw-build-env:v20230919
depends_on:
db:
condition: service_healthy
Expand Down Expand Up @@ -182,3 +183,19 @@ services:
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9093,PLAINTEXT_INTERNAL://localhost:29093
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1

pulsar:
container_name: pulsar
image: apachepulsar/pulsar:latest
command: bin/pulsar standalone
ports:
- "6650:6650"
- "6651:8080"
expose:
- "8080"
- "6650"
healthcheck:
test: [ "CMD-SHELL", "bin/pulsar-admin brokers healthcheck"]
interval: 5s
timeout: 5s
retries: 5
3 changes: 1 addition & 2 deletions ci/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,12 @@ cargo build \
-p risingwave_regress_test \
-p risingwave_sqlsmith \
-p risingwave_compaction_test \
-p risingwave_backup_cmd \
-p risingwave_e2e_extended_mode_test \
$RISINGWAVE_FEATURE_FLAGS \
--profile "$profile"


artifacts=(risingwave sqlsmith compaction-test backup-restore risingwave_regress_test risingwave_e2e_extended_mode_test risedev-dev delete-range-test)
artifacts=(risingwave sqlsmith compaction-test risingwave_regress_test risingwave_e2e_extended_mode_test risedev-dev delete-range-test)

echo "--- Show link info"
ldd target/"$profile"/risingwave
Expand Down
5 changes: 1 addition & 4 deletions ci/scripts/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,4 @@ sccache --zero-stats

echo "--- Run audit check"
cargo audit \
--ignore RUSTSEC-2023-0052 --ignore RUSTSEC-2022-0093
# https://github.com/risingwavelabs/risingwave/issues/11842
# https://github.com/risingwavelabs/risingwave/issues/11986

--ignore RUSTSEC-2023-0052 # https://github.com/risingwavelabs/risingwave/issues/11842
46 changes: 46 additions & 0 deletions ci/scripts/e2e-pulsar-sink-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash

source ci/scripts/common.sh

while getopts 'p:' opt; do
case ${opt} in
p )
profile=$OPTARG
;;
\? )
echo "Invalid Option: -$OPTARG" 1>&2
exit 1
;;
: )
echo "Invalid option: $OPTARG requires an argument" 1>&2
;;
esac
done
shift $((OPTIND -1))

download_and_prepare_rw "$profile" source

echo "--- starting risingwave cluster"
cargo make ci-start ci-pulsar-test
sleep 1

echo "--- waiting until pulsar is healthy"
HTTP_CODE=404
MAX_RETRY=20
while [[ $HTTP_CODE -ne 200 && MAX_RETRY -gt 0 ]]
do
HTTP_CODE=$(curl --connect-timeout 2 -s -o /dev/null -w ''%{http_code}'' http://pulsar:8080/admin/v2/clusters)
((MAX_RETRY--))
sleep 5
done

# Exits as soon as any line fails.
set -euo pipefail

echo "--- testing pulsar sink"
sqllogictest -p 4566 -d dev './e2e_test/sink/pulsar_sink.slt'

sleep 1

echo "--- Kill cluster"
cargo make ci-kill
3 changes: 3 additions & 0 deletions ci/scripts/e2e-sink-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ set -euo pipefail

source ci/scripts/common.sh

# prepare environment
export CONNECTOR_LIBS_PATH="./connector-node/libs"

while getopts 'p:' opt; do
case ${opt} in
p )
Expand Down
Loading

0 comments on commit b86af93

Please sign in to comment.