-
Notifications
You must be signed in to change notification settings - Fork 759
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
[ci] add compatibility test with old metasrv and latest query #5520
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
b60e81d
[ci] add compatibility test with old metasrv and latest query
drmingdrmer 9320820
Merge branch 'main' into 4-compat
mergify[bot] 29f5818
fixup: install build tool for stateless test
drmingdrmer 6389250
[ci]: upload artifact if test-compat fails
drmingdrmer c70e57f
Merge remote-tracking branch 'ups/main' into 4-compat
drmingdrmer 7098745
[ci] compatibility test only run 05_ddl cases
drmingdrmer 17d3747
fix: test-compat: do not fail if kill-process fails
drmingdrmer b42dbcc
Merge branch 'main' into 4-compat
mergify[bot] ef0d1d4
Merge branch 'main' into 4-compat
mergify[bot] 9b355ee
Merge branch 'main' into 4-compat
mergify[bot] 326fb73
Merge branch 'main' into 4-compat
mergify[bot] 871b668
Merge branch 'main' into 4-compat
mergify[bot] c0fd8a7
Merge branch 'main' into 4-compat
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: "Test old metasrv is compatible with new query" | ||
description: "Download old binaries and current binaries, run stateless test with old `meta` and latest `query`" | ||
inputs: | ||
profile: | ||
description: "" | ||
required: true | ||
default: "debug" | ||
target: | ||
description: "" | ||
required: true | ||
default: "x86_64-unknown-linux-gnu" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Maximize build space | ||
uses: ./.github/actions/cleanup | ||
|
||
- name: Setup Build Tool | ||
uses: ./.github/actions/setup_build_tool | ||
|
||
- name: Install python dependences | ||
shell: bash | ||
run: | | ||
pip3 install --user boto3 "moto[all]" yapf shfmt-py mysql-connector pymysql sqlalchemy clickhouse_driver | ||
|
||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ inputs.profile }}-${{ github.sha }}-${{ inputs.target }} | ||
path: ./current/ | ||
|
||
- uses: dsaltares/fetch-gh-release-asset@master | ||
with: | ||
repo: 'datafuselabs/databend' | ||
# 2022-05-23 | ||
version: 'tags/v0.7.57-nightly' | ||
file: 'databend-v0.7.57-nightly-x86_64-unknown-linux-gnu.tar.gz' | ||
|
||
- shell: bash | ||
run: | | ||
mkdir ./old | ||
tar -xf databend-v0.7.57-nightly-x86_64-unknown-linux-gnu.tar.gz -C ./old | ||
|
||
- name: Test compatibility | ||
shell: bash | ||
run: | | ||
chmod +x ./tests/compat/test-compat.sh | ||
build-tool bash ./tests/compat/test-compat.sh | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: test-compat | ||
path: | | ||
_local_fs/ | ||
_logs*/ | ||
_meta*/ | ||
metasrv/_logs*/ | ||
query/_logs*/ | ||
store/_logs*/ | ||
nohup.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/bin/sh | ||
|
||
usage() | ||
{ | ||
echo "test query being compatible with old metasrv" | ||
echo "Expect current release binaries are in ./current/." | ||
echo "Expect old release binaries are in ./old/." | ||
echo "Usage: $0" | ||
} | ||
|
||
SCRIPT_PATH="$(cd "$(dirname "$0")" >/dev/null 2>&1 && pwd)" | ||
|
||
echo "SCRIPT_PATH: $SCRIPT_PATH" | ||
|
||
# go to work tree root | ||
cd "$SCRIPT_PATH/../../" | ||
|
||
pwd | ||
|
||
mkdir -p ./target/debug/ | ||
chmod +x ./current/* | ||
chmod +x ./old/* | ||
|
||
cp ./old/databend-query ./target/debug/ | ||
cp ./current/databend-meta ./target/debug/ | ||
|
||
./target/debug/databend-meta --version | ||
./target/debug/databend-query --version | ||
|
||
# Not all cases in the latest repo will pass | ||
echo "Run some specific SQL tests." | ||
|
||
echo "Starting standalone DatabendQuery(debug)" | ||
|
||
killall databend-query | ||
killall databend-meta | ||
sleep 1 | ||
|
||
for bin in databend-query databend-meta; do | ||
if test -n "$(pgrep $bin)"; then | ||
echo "The $bin is not killed. force killing." | ||
killall -9 $bin | ||
fi | ||
done | ||
|
||
BIN=debug | ||
|
||
echo 'Start databend-meta...' | ||
nohup target/${BIN}/databend-meta --single --log-level=DEBUG & | ||
echo "Waiting on databend-meta 10 seconds..." | ||
python3 scripts/ci/wait_tcp.py --timeout 5 --port 9191 | ||
|
||
echo 'Start databend-query...' | ||
nohup target/${BIN}/databend-query -c scripts/ci/deploy/config/databend-query-node-1.toml & | ||
|
||
echo "Waiting on databend-query 10 seconds..." | ||
python3 scripts/ci/wait_tcp.py --timeout 5 --port 3307 | ||
|
||
cd tests | ||
|
||
echo "Starting metasrv related test: 05_ddl" | ||
./databend-test --mode 'standalone' --run-dir 0_stateless -- 05_ |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkout should be done with extra config
to fetch all tags