Skip to content

Commit f7a6356

Browse files
committed
ci: add stateful test for large data
1 parent 84d005e commit f7a6356

File tree

10 files changed

+87
-8
lines changed

10 files changed

+87
-8
lines changed

.github/actions/test_stateful_cluster_linux/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ runs:
3939
aws --endpoint-url http://127.0.0.1:9900/ s3 cp tests/data/ontime_200.parquet s3://testbucket/admin/data/ontime_200_v1.parquet
4040
aws --endpoint-url http://127.0.0.1:9900/ s3 cp tests/data/iceberg s3://testbucket/iceberg_data --recursive
4141
42-
- name: Run Stateful Tests with Cluster mode (ubuntu-latest only)
42+
- name: Run Stateful Tests with Cluster mode
4343
shell: bash
4444
run: |
45-
./scripts/ci/ci-run-stateful-tests-cluster-s3.sh
45+
./scripts/ci/ci-run-stateful-tests-cluster-minio.sh
4646
4747
- name: Upload failure
4848
if: failure() || cancelled()
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Test Stateful Large Data"
2+
description: "Running stateful with large data"
3+
inputs:
4+
profile:
5+
description: "The profile for this test"
6+
required: true
7+
default: "debug"
8+
target:
9+
description: ""
10+
required: true
11+
default: "x86_64-unknown-linux-gnu"
12+
runs:
13+
using: "composite"
14+
steps:
15+
- name: Download artifact
16+
uses: ./.github/actions/artifact_download
17+
with:
18+
profile: ${{ inputs.profile }}
19+
sha: ${{ github.sha }}
20+
target: ${{ inputs.target }}
21+
22+
- name: Run Stateful Tests with Standalone mode
23+
shell: bash
24+
env:
25+
TEST_ID: github-${{ github.run_id }}
26+
run: |
27+
./scripts/ci/ci-run-stateful-tests-large-data-s3.sh
28+
29+
- name: Upload failure
30+
if: failure() || cancelled()
31+
uses: ./.github/actions/artifact_failure
32+
with:
33+
name: test-stateful-large-data

.github/actions/test_stateful_standalone_linux/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ runs:
3939
aws --endpoint-url http://127.0.0.1:9900/ s3 cp tests/data/ontime_200.parquet s3://testbucket/admin/data/ontime_200_v1.parquet
4040
aws --endpoint-url http://127.0.0.1:9900/ s3 cp tests/data/iceberg s3://testbucket/iceberg_data --recursive
4141
42-
- name: Run Stateful Tests with Standalone mode (ubuntu-latest only)
42+
- name: Run Stateful Tests with Standalone mode
4343
shell: bash
4444
run: |
45-
./scripts/ci/ci-run-stateful-tests-standalone-s3.sh
45+
./scripts/ci/ci-run-stateful-tests-standalone-minio.sh
4646
4747
- name: Upload failure
4848
if: failure() || cancelled()

.github/workflows/dev-linux.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,10 @@ jobs:
176176
with:
177177
name: test-sqllogic-standalone-${{ matrix.handlers }}-${{ matrix.dirs }}
178178

179-
180179
test_sqllogic_management_mode_linux:
181180
timeout-minutes: 30
182181
name: test_sqllogic_${{ matrix.dirs }}_linux
183-
runs-on: [ self-hosted, X64, Linux, dev ]
182+
runs-on: [self-hosted, X64, Linux, dev]
184183
needs: build_gnu
185184
strategy:
186185
matrix:
@@ -223,7 +222,6 @@ jobs:
223222
with:
224223
name: test-sqllogic-cluster-${{ matrix.handlers }}-${{ matrix.dirs }}
225224

226-
227225
test_stateless_standalone_linux:
228226
timeout-minutes: 20
229227
runs-on: [self-hosted, X64, Linux, dev]
@@ -256,6 +254,15 @@ jobs:
256254
- uses: actions/checkout@v3
257255
- uses: ./.github/actions/test_stateful_cluster_linux
258256

257+
test_stateful_large_data:
258+
timeout-minutes: 60
259+
if: contains(github.event.pull_request.labels.*.name, 'ci-largedata')
260+
runs-on: [self-hosted, X64, Linux, dev]
261+
needs: build_gnu
262+
steps:
263+
- uses: actions/checkout@v3
264+
- uses: ./.github/actions/test_stateful_large_data
265+
259266
test_fuzz_standalone_linux:
260267
timeout-minutes: 10
261268
runs-on: [self-hosted, X64, Linux, dev]

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ jobs:
516516
asset_content_type: text/plain
517517

518518
run_benchmark:
519-
name: run benchmark
519+
name: benchmark
520520
needs: [create_release, publish_linux]
521521
uses: ./.github/workflows/trusted-benchmark.yml
522522
secrets: inherit
File renamed without changes.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
# Copyright 2020-2021 The Databend Authors.
3+
# SPDX-License-Identifier: Apache-2.0.
4+
5+
set -e
6+
7+
TEST_ID=${TEST_ID:-$(date +%s)}
8+
9+
echo "*************************************"
10+
echo "* Setting STORAGE_TYPE to S3. *"
11+
echo "* *"
12+
echo "* Please make sure that S3 backend *"
13+
echo "* is ready, and configured properly.*"
14+
echo "*************************************"
15+
export STORAGE_TYPE=s3
16+
export STORAGE_S3_BUCKET=databend-ci
17+
export STORAGE_S3_REGION=us-east-2
18+
export STORAGE_S3_ROOT="stateful/${TEST_ID}"
19+
export STORAGE_ALLOW_INSECURE=true
20+
21+
echo "Install dependencies"
22+
python3 -m pip install --quiet mysql-connector-python
23+
24+
echo "calling test suite"
25+
echo "Starting standalone DatabendQuery(debug)"
26+
./scripts/ci/deploy/databend-query-standalone.sh
27+
28+
SCRIPT_PATH="$(cd "$(dirname "$0")" >/dev/null 2>&1 && pwd)"
29+
cd "$SCRIPT_PATH/../../tests" || exit
30+
31+
echo "Starting databend-test"
32+
./databend-test "$1" --mode 'standalone' --run-dir 4_stateful_large_data
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10000
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
create table oracle (a int, b timestamp, c String) Engine = Random;
2+
create stage oracle;
3+
copy into @oracle from (select * from oracle limit 10000) file_format=(type=parquet) max_file_size=8;
4+
create table target (a int, b timestamp, c String);
5+
copy into target from @oracle file_format=(type=parquet);
6+
select count(*) from target;

0 commit comments

Comments
 (0)