Fix upgrade tests (#7413)

Adding upgrade_basic_before_non_mixed.sql file because while
upgrade_basic_after_non_mixed exist, its before variation didn't exist
as we don't have any "before" steps. However, run_test.py assumes that
all "after" files do have a "before" variation as well. So this PR adds
an empty upgrade_basic_before_non_mixed.sql file.

Also, given that we don't have such a version called as 12.1devel
anymore, change it to 12.1.1.

And finally, let CI skip testing flakyness for upgrade tests both
because it's quite hard to get flaky-test-detection job working for
upgrade tests and also because in the end it is not much useful to test
upgrade tests against flakyness.
pull/7423/head
Onur Tirtir 2024-01-16 15:37:18 +03:00 committed by GitHub
parent 739c6d26df
commit 04b374fc01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 7 deletions

View File

@ -471,14 +471,30 @@ jobs:
run: |- run: |-
detected_changes=$(git diff origin/main... --name-only --diff-filter=AM | (grep 'src/test/regress/sql/.*\.sql\|src/test/regress/spec/.*\.spec\|src/test/regress/citus_tests/test/test_.*\.py' || true)) detected_changes=$(git diff origin/main... --name-only --diff-filter=AM | (grep 'src/test/regress/sql/.*\.sql\|src/test/regress/spec/.*\.spec\|src/test/regress/citus_tests/test/test_.*\.py' || true))
tests=${detected_changes} tests=${detected_changes}
if [ -z "$tests" ]; then
echo "No test found." # split the tests to be skipped --today we only skip upgrade tests
skipped_tests=""
not_skipped_tests=""
for test in $tests; do
if [[ $test =~ ^src/test/regress/sql/upgrade_ ]]; then
skipped_tests="$skipped_tests $test"
else else
echo "Detected tests " $tests not_skipped_tests="$not_skipped_tests $test"
fi
done
if [ ! -z "$skipped_tests" ]; then
echo "Skipped tests " $skipped_tests
fi
if [ -z "$not_skipped_tests" ]; then
echo "Not detected any tests that flaky test detection should run"
else
echo "Detected tests " $not_skipped_tests
fi fi
echo 'tests<<EOF' >> $GITHUB_OUTPUT echo 'tests<<EOF' >> $GITHUB_OUTPUT
echo "$tests" >> "$GITHUB_OUTPUT" echo "$not_skipped_tests" >> "$GITHUB_OUTPUT"
echo 'EOF' >> $GITHUB_OUTPUT echo 'EOF' >> $GITHUB_OUTPUT
test-flakyness: test-flakyness:
if: ${{ needs.test-flakyness-pre.outputs.tests != ''}} if: ${{ needs.test-flakyness-pre.outputs.tests != ''}}

View File

@ -1,5 +1,5 @@
# this schedule is to be run on only coordinators # this schedule is to be run on only coordinators
test: upgrade_basic_before test: upgrade_basic_before upgrade_basic_before_non_mixed
test: upgrade_pg_dist_cleanup_before test: upgrade_pg_dist_cleanup_before
test: upgrade_post_11_before test: upgrade_post_11_before

View File

@ -1,5 +1,5 @@
# The basic tests runs analyze which depends on shard numbers # The basic tests runs analyze which depends on shard numbers
test: multi_test_helpers multi_test_helpers_superuser test: multi_test_helpers multi_test_helpers_superuser upgrade_basic_before_non_mixed
test: multi_test_catalog_views test: multi_test_catalog_views
test: upgrade_basic_before test: upgrade_basic_before
test: upgrade_ref2ref_before test: upgrade_ref2ref_before

View File

@ -92,7 +92,7 @@ PG_MAJOR_VERSION = get_pg_major_version()
OLDEST_SUPPORTED_CITUS_VERSION_MATRIX = { OLDEST_SUPPORTED_CITUS_VERSION_MATRIX = {
14: "10.2.0", 14: "10.2.0",
15: "11.1.5", 15: "11.1.5",
16: "12.1devel", 16: "12.1.1",
} }
OLDEST_SUPPORTED_CITUS_VERSION = OLDEST_SUPPORTED_CITUS_VERSION_MATRIX[PG_MAJOR_VERSION] OLDEST_SUPPORTED_CITUS_VERSION = OLDEST_SUPPORTED_CITUS_VERSION_MATRIX[PG_MAJOR_VERSION]