From 7933c3b973e7b5ba684a2bbfd7be7e215c5da3d0 Mon Sep 17 00:00:00 2001 From: August Date: Thu, 21 Nov 2024 17:21:24 +0800 Subject: [PATCH 1/2] test: try to enable backwards compat tests --- Makefile.toml | 8 ++-- ci/scripts/backwards-compat-test.sh | 5 ++- ci/workflows/main-cron.yml | 68 ++++++++++++++--------------- ci/workflows/pull-request.yml | 65 ++++++++++++++------------- 4 files changed, 73 insertions(+), 73 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index a0544239d4e12..a7c45d363e8fd 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -1438,10 +1438,10 @@ script = ''' UPDATE_EXPECT=1 cargo test -p risingwave_connector tests::test_with_options_yaml_up_to_date ''' -#[tasks.backwards-compat-test] -#category = "RiseDev - Test - Backwards Compatibility Test" -#description = "Run backwards compatibility test" -#script = "./e2e_test/backwards-compat-tests/scripts/run_local.sh" +[tasks.backwards-compat-test] +category = "RiseDev - Test - Backwards Compatibility Test" +description = "Run backwards compatibility test" +script = "./e2e_test/backwards-compat-tests/scripts/run_local.sh" # For debugging. # To show the env for a specific task, use `run_task = "show-env"` for that task. diff --git a/ci/scripts/backwards-compat-test.sh b/ci/scripts/backwards-compat-test.sh index d6b64d91e6e39..03ab3576b2d39 100755 --- a/ci/scripts/backwards-compat-test.sh +++ b/ci/scripts/backwards-compat-test.sh @@ -46,7 +46,7 @@ echo "--- Setting up cluster config" full-without-monitoring: steps: - use: minio - - use: etcd + - use: sqlite - use: meta-node - use: compute-node - use: frontend @@ -59,9 +59,10 @@ EOF full-without-monitoring: steps: - use: minio + - use: sqlite - use: etcd - use: meta-node - meta-backend: etcd + meta-backend: sqlite - use: compute-node - use: frontend - use: compactor diff --git a/ci/workflows/main-cron.yml b/ci/workflows/main-cron.yml index df022c8fb9279..f1fffc51dcabb 100644 --- a/ci/workflows/main-cron.yml +++ b/ci/workflows/main-cron.yml @@ -615,40 +615,40 @@ steps: timeout_in_minutes: 5 # Backwards compatibility tests - # - label: "Backwards compatibility tests version_offset={{matrix.version_offset}}" - # key: "backwards-compat-tests" - # command: "VERSION_OFFSET={{matrix.version_offset}} RW_COMMIT=$BUILDKITE_COMMIT ci/scripts/backwards-compat-test.sh -p ci-release" - # if: | - # !(build.pull_request.labels includes "ci/main-cron/run-selected") && build.env("CI_STEPS") == null - # || build.pull_request.labels includes "ci/run-backwards-compat-tests" - # || build.env("CI_STEPS") =~ /(^|,)backwards?-compat-tests?(,|$$)/ - # depends_on: - # - "build" - # plugins: - # - docker-compose#v5.1.0: - # run: source-test-env - # config: ci/docker-compose.yml - # mount-buildkite-agent: true - # environment: - # - BUILDKITE_BRANCH - # - ./ci/plugins/upload-failure-logs - # matrix: - # setup: - # # Test the 4 latest versions against the latest main. - # # e.g. - # # 1: 2.0.0 - # # 2: 1.1.1 - # # 3: 1.0.1 - # # 4: 1.0.0 - # # It is ordered by the full version number, rather than minor / major version. - # # We can change to just be on major version in the future. - # version_offset: - # - "1" - # - "2" - # - "3" - # - "4" - # timeout_in_minutes: 30 - # retry: *auto-retry + - label: "Backwards compatibility tests version_offset={{matrix.version_offset}}" + key: "backwards-compat-tests" + command: "VERSION_OFFSET={{matrix.version_offset}} RW_COMMIT=$BUILDKITE_COMMIT ci/scripts/backwards-compat-test.sh -p ci-release" + if: | + !(build.pull_request.labels includes "ci/main-cron/run-selected") && build.env("CI_STEPS") == null + || build.pull_request.labels includes "ci/run-backwards-compat-tests" + || build.env("CI_STEPS") =~ /(^|,)backwards?-compat-tests?(,|$$)/ + depends_on: + - "build" + plugins: + - docker-compose#v5.1.0: + run: source-test-env + config: ci/docker-compose.yml + mount-buildkite-agent: true + environment: + - BUILDKITE_BRANCH + - ./ci/plugins/upload-failure-logs + matrix: + setup: + # Test the 4 latest versions against the latest main. + # e.g. + # 1: 2.0.0 + # 2: 1.1.1 + # 3: 1.0.1 + # 4: 1.0.0 + # It is ordered by the full version number, rather than minor / major version. + # We can change to just be on major version in the future. + version_offset: + - "1" + - "2" + - "3" + - "4" + timeout_in_minutes: 30 + retry: *auto-retry # Sqlsmith differential testing - label: "Sqlsmith Differential Testing" diff --git a/ci/workflows/pull-request.yml b/ci/workflows/pull-request.yml index e10ffb2d0091f..8b852b6bb0b0a 100644 --- a/ci/workflows/pull-request.yml +++ b/ci/workflows/pull-request.yml @@ -698,39 +698,38 @@ steps: timeout_in_minutes: 60 # ~3-4 queries can run # Backwards compatibility tests - # TODO: support backwards compatibility tests for sql backend - # - label: "Backwards compatibility tests" - # command: "VERSION_OFFSET={{matrix.version_offset}} RW_COMMIT=$BUILDKITE_COMMIT ci/scripts/backwards-compat-test.sh -p ci-dev" - # if: | - # build.pull_request.labels includes "breaking-change" || - # build.pull_request.labels includes "ci/run-backwards-compat-tests" || - # build.env("CI_STEPS") =~ /(^|,)backwards?-compat-tests?(,|$$)/ - # depends_on: - # - "build" - # plugins: - # - docker-compose#v5.1.0: - # run: source-test-env - # config: ci/docker-compose.yml - # mount-buildkite-agent: true - # environment: - # - BUILDKITE_BRANCH - # - ./ci/plugins/upload-failure-logs - # matrix: - # setup: - # # Test the 4 latest versions against the latest main. - # # e.g. - # # 1: 2.0.0 - # # 2: 1.1.1 - # # 3: 1.0.1 - # # 4: 1.0.0 - # # It is ordered by the full version number, rather than minor / major version. - # # We can change to just be on major version in the future. - # version_offset: - # - "1" - # - "2" - # - "3" - # - "4" - # timeout_in_minutes: 25 + - label: "Backwards compatibility tests" + command: "VERSION_OFFSET={{matrix.version_offset}} RW_COMMIT=$BUILDKITE_COMMIT ci/scripts/backwards-compat-test.sh -p ci-dev" + if: | + build.pull_request.labels includes "breaking-change" || + build.pull_request.labels includes "ci/run-backwards-compat-tests" || + build.env("CI_STEPS") =~ /(^|,)backwards?-compat-tests?(,|$$)/ + depends_on: + - "build" + plugins: + - docker-compose#v5.1.0: + run: source-test-env + config: ci/docker-compose.yml + mount-buildkite-agent: true + environment: + - BUILDKITE_BRANCH + - ./ci/plugins/upload-failure-logs + matrix: + setup: + # Test the 4 latest versions against the latest main. + # e.g. + # 1: 2.0.0 + # 2: 1.1.1 + # 3: 1.0.1 + # 4: 1.0.0 + # It is ordered by the full version number, rather than minor / major version. + # We can change to just be on major version in the future. + version_offset: + - "1" + - "2" + - "3" + - "4" + timeout_in_minutes: 25 # Sqlsmith differential testing - label: "Sqlsmith Differential Testing" From e420f691666f5fff08260c906f99448cbdabc7b5 Mon Sep 17 00:00:00 2001 From: August Date: Thu, 21 Nov 2024 17:45:23 +0800 Subject: [PATCH 2/2] fix config --- ci/scripts/backwards-compat-test.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ci/scripts/backwards-compat-test.sh b/ci/scripts/backwards-compat-test.sh index 03ab3576b2d39..c6bae012f7ad6 100755 --- a/ci/scripts/backwards-compat-test.sh +++ b/ci/scripts/backwards-compat-test.sh @@ -53,14 +53,13 @@ full-without-monitoring: - use: compactor EOF else - # For versions >= 1.9.0, the default config will default to sql backend, - # breaking backwards compat, so we must specify meta-backend: etcd + # For versions >= 1.9.0, we have support for different sql meta-backend, + # so we need to specify the meta-backend: sqlite cat < risedev-profiles.user.yml full-without-monitoring: steps: - use: minio - use: sqlite - - use: etcd - use: meta-node meta-backend: sqlite - use: compute-node