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

feat: integrated regress-test into risedev tools #13255

Open
thexiay opened this issue Nov 6, 2023 · 3 comments
Open

feat: integrated regress-test into risedev tools #13255

thexiay opened this issue Nov 6, 2023 · 3 comments
Labels
help wanted Issues that need help from contributors no-issue-activity type/feature

Comments

@thexiay
Copy link
Contributor

thexiay commented Nov 6, 2023

Is your feature request related to a problem? Please describe.

Is there any way to test regress test in risedev tools?
For example, if i issue a pull request,i found my regress test fail, is there a quick and easy way to verify it locally?
For now,if i want to regress test locally, i should do this,

pg regress test

# 1. build risingwave_regress_test(default debug mode)
cargo build -p risingwave_regress_test
# 2. manual lanuch postgres in docker
docker run -d \
  --name pgsqlserver \
  -p 5432:5432 \
  -e POSTGRES_USER=postgres \
  -e POSTGRES_PASSWORD=postgres \
  -e POSTGRES_INITDB_ARGS="--encoding=UTF-8 --lc-collate=C --lc-ctype=C" \
  postgres:15-alpine \
  postgres -c wal_level=logical
# 3. prepare (dpkg-reconfigure dependes on debian or ubuntu system)
locale-gen C
export LANGUAGE=C
export LANG=C
export LC_ALL=C
export LC_COLLATE=C
locale-gen C
dpkg-reconfigure --frontend=noninteractive locales
export PGPASSWORD='postgres';
export PGSERVERHOST=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pgsqlserver) 
# 4. start regress test
rm -rf `pwd`/src/tests/regress/output
RUST_BACKTRACE=1 target/debug/risingwave_regress_test --host ${PGSERVERHOST} \
  -p 5432 \
  -u postgres \
  --database postgres \
  --input `pwd`/src/tests/regress/data \
  --output `pwd`/src/tests/regress/output \
  --schedule `pwd`/src/tests/regress/data/schedule \
  --mode postgres

risingwave regress test

# 1. build risingwave_regress_test(default debug mode)
cargo build -p risingwave_regress_test
# 2. manual lanuch postgres in docker
./risedev ci-start ci-3cn-1fe
# 3. prepare (dpkg-reconfigure dependes on debian or ubuntu system)
locale-gen C
export LANGUAGE=C
export LANG=C
export LC_ALL=C
export LC_COLLATE=C
locale-gen C
dpkg-reconfigure --frontend=noninteractive locales
# 4. start regress test
rm -rf `pwd`/src/tests/regress/output
RUST_BACKTRACE=1 target/debug/risingwave_regress_test --host 127.0.0.1 \
  -p 4566 \
  -u root \
  --input `pwd`/src/tests/regress/data \
  --output `pwd`/src/tests/regress/output \
  --schedule `pwd`/src/tests/regress/data/schedule \
  --mode risingwave

I think there must be another easier way to integrated it into risedev tools,just like:
./risedev regress-test array
./risedev regress-test boolean varchar text int2 int4 int8 float4 float8 comments

I hope to hear your suggestions or other better ways.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

@github-actions github-actions bot added this to the release-1.5 milestone Nov 6, 2023
@thexiay
Copy link
Contributor Author

thexiay commented Nov 8, 2023

Here is this test tool workflow:

1. Prepare test env

for test pg:

./risedev ci-start pg

for test risingwave:

./risedev ci-start ci-3cn-1fe

I will add a template configuration for start a pgserver .
The meaning of long parameters:
--mode:test target. Moreover,it can be optional, it will automatically detect whether the environment starts pg or risingwave to read different configurations
--test:schedule test

2. Do regress test

for pg:

./risedev do-regress-test --mode pg --test array binary

for risingwave

./risedev do-regress-test --mode risingwave --test array binary

Either output the test result to screen or output to a directory is all ok.

3. teardown test env

./risedev down

@thexiay
Copy link
Contributor Author

thexiay commented Nov 8, 2023

Why here use local mode to start dependcy compoment like grafana,minio,kafka but not in docker?
It's easily affected by the environment and we will not debug or change those dependent components code.😕

@fuyufjh fuyufjh removed this from the release-1.5 milestone Dec 6, 2023
@fuyufjh fuyufjh added the help wanted Issues that need help from contributors label Dec 6, 2023
Copy link
Contributor

This issue has been open for 60 days with no activity. Could you please update the status? Feel free to continue discussion or close as not planned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues that need help from contributors no-issue-activity type/feature
Projects
None yet
Development

No branches or pull requests

2 participants