Skip to content

Commit

Permalink
unify 3 backends in main-cron
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Nov 26, 2024
1 parent 89abcba commit 773526b
Showing 1 changed file with 30 additions and 42 deletions.
72 changes: 30 additions & 42 deletions ci/workflows/main-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,32 @@ auto-retry: &auto-retry
- signal_reason: agent_stop
limit: 3

sql-backend: &sql-backend
setup:
backend: [""]
endpoint: [""]
adjustments:
- with:
backend: ""
endpoint: ""
skip: true # hack
- with:
backend: "sqlite"
# sqlite3 /tmp/rwmeta.db
endpoint: "sqlite:///tmp/rwmeta.db?mode=rwc"
- with:
backend: "postgres"
# PGPASSWORD=postgres psql -h db -p 5432 -U postgres -d rwmeta
endpoint: "postgres://postgres:postgres@db:5432/rwmeta"
- with:
backend: "mysql"
# mysql -h mysql -P 3306 -u root -p123456 -D rwmeta
endpoint: "mysql://root:123456@mysql:3306/rwmeta"

sql-backend-env: &sql-backend-env
- "RISEDEV_SQL_ENDPOINT={{matrix.endpoint}}"


steps:
- label: "build"
command: "ci/scripts/build.sh -p ci-release"
Expand Down Expand Up @@ -62,7 +88,8 @@ steps:
timeout_in_minutes: 10
retry: *auto-retry

- label: "end-to-end test (release)"
- label: "end-to-end test (release, {{matrix.backend}} backend)"
matrix: *sql-backend
key: "e2e-test-release"
command: "ci/scripts/cron-e2e-test.sh -p ci-release -m ci-3streaming-2serving-3fe"
if: |
Expand All @@ -75,9 +102,10 @@ steps:
- "docslt"
plugins:
- docker-compose#v5.1.0:
run: rw-build-env
run: pg-mysql-backend-test-env
config: ci/docker-compose.yml
mount-buildkite-agent: true
env: *sql-backend-env
- ./ci/plugins/upload-failure-logs
timeout_in_minutes: 25
retry: *auto-retry
Expand Down Expand Up @@ -725,46 +753,6 @@ steps:
timeout_in_minutes: 25
retry: *auto-retry

- label: "end-to-end test (postgres backend)"
key: e2e-test-postgres-backend
command: "ci/scripts/e2e-test.sh -p ci-release -m ci-3streaming-2serving-3fe-pg-backend"
if: |
!(build.pull_request.labels includes "ci/main-cron/run-selected") && build.env("CI_STEPS") == null
|| build.pull_request.labels includes "ci/run-e2e-test-other-backends"
|| build.env("CI_STEPS") =~ /(^|,)e2e-test-other-backends?(,|$$)/
depends_on:
- "build"
- "build-other"
- "docslt"
plugins:
- docker-compose#v5.1.0:
run: pg-mysql-backend-test-env
config: ci/docker-compose.yml
mount-buildkite-agent: true
- ./ci/plugins/upload-failure-logs
timeout_in_minutes: 25
retry: *auto-retry

- label: "end-to-end test (mysql backend)"
key: e2e-test-mysql-backend
command: "ci/scripts/e2e-test.sh -p ci-release -m ci-3streaming-2serving-3fe-mysql-backend"
if: |
!(build.pull_request.labels includes "ci/main-cron/run-selected") && build.env("CI_STEPS") == null
|| build.pull_request.labels includes "ci/run-e2e-test-other-backends"
|| build.env("CI_STEPS") =~ /(^|,)e2e-test-other-backends?(,|$$)/
depends_on:
- "build"
- "build-other"
- "docslt"
plugins:
- docker-compose#v5.1.0:
run: pg-mysql-backend-test-env
config: ci/docker-compose.yml
mount-buildkite-agent: true
- ./ci/plugins/upload-failure-logs
timeout_in_minutes: 25
retry: *auto-retry

- label: "end-to-end test for opendal (parallel)"
key: "e2e-test-opendal-parallel"
command: "ci/scripts/e2e-test-parallel-for-opendal.sh -p ci-release"
Expand Down

0 comments on commit 773526b

Please sign in to comment.