Skip to content

Commit

Permalink
ci: fix s3 source test (#16315)
Browse files Browse the repository at this point in the history
Signed-off-by: xxchan <[email protected]>
  • Loading branch information
xxchan authored Apr 16, 2024
1 parent 6a966e3 commit 2bcf892
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ci/scripts/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def format_cmd(messages):
cmd=f"""
cat <<- YAML | buildkite-agent pipeline upload
steps:
- label: "Test"
- label: "trigger failed test notification"
command: echo "running failed test notification" && exit 1
notify:
- slack:
Expand Down
11 changes: 9 additions & 2 deletions ci/scripts/s3-source-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ set -euo pipefail

source ci/scripts/common.sh

while getopts 'p:s:' opt; do
while getopts 'p:s:t:' opt; do
case ${opt} in
p )
profile=$OPTARG
;;
s )
script=$OPTARG
;;
t )
format_type=$OPTARG
;;
\? )
echo "Invalid Option: -$OPTARG" 1>&2
exit 1
Expand All @@ -30,7 +33,11 @@ risedev ci-start ci-1cn-1fe

echo "--- Run test"
python3 -m pip install minio psycopg2-binary opendal
python3 e2e_test/s3/"$script"
if [[ -v format_type ]]; then
python3 e2e_test/s3/"$script" "$format_type"
else
python3 e2e_test/s3/"$script"
fi

echo "--- Kill cluster"
risedev ci-kill
8 changes: 4 additions & 4 deletions ci/workflows/main-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ steps:

- label: "S3_v2 source check on AWS (json parser)"
key: "s3-v2-source-check-aws-json-parser"
command: "ci/scripts/s3-source-test.sh -p ci-release -s 'fs_source_v2.py json'"
command: "ci/scripts/s3-source-test.sh -p ci-release -s fs_source_v2.py -t json"
if: |
!(build.pull_request.labels includes "ci/main-cron/skip-ci") && build.env("CI_STEPS") == null
|| build.pull_request.labels includes "ci/run-s3-source-tests"
Expand All @@ -562,7 +562,7 @@ steps:

- label: "S3_v2 source batch read on AWS (json parser)"
key: "s3-v2-source-batch-read-check-aws-json-parser"
command: "ci/scripts/s3-source-test.sh -p ci-release -s 'fs_source_batch.py json'"
command: "ci/scripts/s3-source-test.sh -p ci-release -s fs_source_batch.py -t json"
if: |
!(build.pull_request.labels includes "ci/main-cron/skip-ci") && build.env("CI_STEPS") == null
|| build.pull_request.labels includes "ci/run-s3-source-tests"
Expand All @@ -584,7 +584,7 @@ steps:

- label: "S3_v2 source check on AWS (csv parser)"
key: "s3-v2-source-check-aws-csv-parser"
command: "ci/scripts/s3-source-test.sh -p ci-release -s 'fs_source_v2.py csv_without_header'"
command: "ci/scripts/s3-source-test.sh -p ci-release -s fs_source_v2.py -t csv_without_header"
if: |
!(build.pull_request.labels includes "ci/main-cron/skip-ci") && build.env("CI_STEPS") == null
|| build.pull_request.labels includes "ci/run-s3-source-tests"
Expand All @@ -606,7 +606,7 @@ steps:

- label: "PosixFs source on OpenDAL fs engine (csv parser)"
key: "s3-source-test-for-opendal-fs-engine-csv-parser"
command: "ci/scripts/s3-source-test.sh -p ci-release -s 'posix_fs_source.py csv_without_header'"
command: "ci/scripts/s3-source-test.sh -p ci-release -s posix_fs_source.py -t csv_without_header"
if: |
!(build.pull_request.labels includes "ci/main-cron/skip-ci") && build.env("CI_STEPS") == null
|| build.pull_request.labels includes "ci/run-s3-source-tests"
Expand Down

0 comments on commit 2bcf892

Please sign in to comment.