From a43d77e4636100564f3396979e8ad0182a124d5a Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Tue, 26 Nov 2024 16:37:33 +0800 Subject: [PATCH] unify 3 backends in main-cron Signed-off-by: Bugen Zhao --- ci/workflows/main-cron.yml | 72 ++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 42 deletions(-) diff --git a/ci/workflows/main-cron.yml b/ci/workflows/main-cron.yml index f1fffc51dcabb..7d99f9c36c43d 100644 --- a/ci/workflows/main-cron.yml +++ b/ci/workflows/main-cron.yml @@ -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" @@ -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: | @@ -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 @@ -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"