Run citus tests on latest so, specified sql

eag/release-13.2/relax-test
eaydingol 2025-11-21 15:19:17 +03:00
parent 5b2eeeadda
commit 681b8f92bc
3 changed files with 34 additions and 8 deletions

View File

@ -132,7 +132,7 @@ jobs:
./build-${{ env.PG_MAJOR }}/* ./build-${{ env.PG_MAJOR }}/*
./install-${{ env.PG_MAJOR }}.tar ./install-${{ env.PG_MAJOR }}.tar
test-citus: test-citus:
name: PG${{ fromJson(matrix.pg_version).major }} - ${{ matrix.make }} name: PG${{ fromJson(matrix.pg_version).major }} - ${{ matrix.make }} - ${{ matrix.citus_version}}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -161,6 +161,9 @@ jobs:
- check-enterprise-isolation-logicalrep-1 - check-enterprise-isolation-logicalrep-1
- check-enterprise-isolation-logicalrep-2 - check-enterprise-isolation-logicalrep-2
- check-enterprise-isolation-logicalrep-3 - check-enterprise-isolation-logicalrep-3
citus_version:
-
- 13.2-1
include: include:
- make: check-failure - make: check-failure
pg_version: ${{ needs.params.outputs.pg15_version }} pg_version: ${{ needs.params.outputs.pg15_version }}
@ -236,12 +239,12 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: "./.github/actions/setup_extension" - uses: "./.github/actions/setup_extension"
- name: Run Test - name: Run Test
run: gosu circleci make -C src/test/${{ matrix.suite }} ${{ matrix.make }} run: CITUSVERSION=${{ matrix.citus_version }} gosu circleci make -C src/test/${{ matrix.suite }} ${{ matrix.make }}
timeout-minutes: 20 timeout-minutes: 20
- uses: "./.github/actions/save_logs_and_results" - uses: "./.github/actions/save_logs_and_results"
if: always() if: always()
with: with:
folder: ${{ fromJson(matrix.pg_version).major }}_${{ matrix.make }} folder: ${{ fromJson(matrix.pg_version).major }}_${{ matrix.make }}_${{ matrix.citus_version }}
- uses: "./.github/actions/upload_coverage" - uses: "./.github/actions/upload_coverage"
if: always() if: always()
with: with:

View File

@ -10,6 +10,9 @@ ifndef MAJORVERSION
MAJORVERSION := $(basename $(VERSION)) MAJORVERSION := $(basename $(VERSION))
endif endif
ifndef CITUSVERSION
CITUSVERSION := ""
endif
# Add ./bin to $PATH so we use our custom diff instead of the default diff tool. # Add ./bin to $PATH so we use our custom diff instead of the default diff tool.
# We do this to be able to mask shard Ids, placement Ids, node ports, etc. # We do this to be able to mask shard Ids, placement Ids, node ports, etc.
MAKEFILE_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) MAKEFILE_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
@ -28,7 +31,7 @@ export PGISOLATIONTIMEOUT = 60
## Citus regression support ## Citus regression support
## ##
MULTI_INSTALLDIR=$(CURDIR)/tmp_check/install MULTI_INSTALLDIR=$(CURDIR)/tmp_check/install
pg_regress_multi_check = $(PERL) $(citus_abs_srcdir)/pg_regress_multi.pl --pgxsdir="$(pgxsdir)" --bindir="$(bindir)" --libdir="$(libdir)" --majorversion="$(MAJORVERSION)" --postgres-builddir="$(postgres_abs_builddir)" --postgres-srcdir="$(postgres_abs_srcdir)" --citus_abs_srcdir="$(citus_abs_srcdir)" pg_regress_multi_check = $(PERL) $(citus_abs_srcdir)/pg_regress_multi.pl --pgxsdir="$(pgxsdir)" --bindir="$(bindir)" --libdir="$(libdir)" --majorversion="$(MAJORVERSION)" --postgres-builddir="$(postgres_abs_builddir)" --postgres-srcdir="$(postgres_abs_srcdir)" --citus_abs_srcdir="$(citus_abs_srcdir)" --citus-version=$(CITUSVERSION)
MULTI_REGRESS_OPTS = --inputdir=$(citus_abs_srcdir) $(pg_regress_locale_flags) --launcher="$(citus_abs_srcdir)/log_test_times" MULTI_REGRESS_OPTS = --inputdir=$(citus_abs_srcdir) $(pg_regress_locale_flags) --launcher="$(citus_abs_srcdir)/log_test_times"
pg_upgrade_check = $(citus_abs_srcdir)/citus_tests/upgrade/pg_upgrade_test.py pg_upgrade_check = $(citus_abs_srcdir)/citus_tests/upgrade/pg_upgrade_test.py
@ -157,6 +160,7 @@ check-multi: all
check-enterprise: all check-enterprise: all
$(pg_regress_multi_check) --load-extension=citus \ $(pg_regress_multi_check) --load-extension=citus \
-- $(MULTI_REGRESS_OPTS) --schedule=$(citus_abs_srcdir)/enterprise_schedule $(EXTRA_TESTS) -- $(MULTI_REGRESS_OPTS) --schedule=$(citus_abs_srcdir)/enterprise_schedule $(EXTRA_TESTS)
check-multi-1: all check-multi-1: all
$(pg_regress_multi_check) --load-extension=citus \ $(pg_regress_multi_check) --load-extension=citus \
-- $(MULTI_REGRESS_OPTS) --schedule=$(citus_abs_srcdir)/multi_1_schedule $(EXTRA_TESTS) -- $(MULTI_REGRESS_OPTS) --schedule=$(citus_abs_srcdir)/multi_1_schedule $(EXTRA_TESTS)

View File

@ -50,6 +50,7 @@ sub Usage()
print " --connection-timeout Timeout for connecting to worker nodes\n"; print " --connection-timeout Timeout for connecting to worker nodes\n";
print " --mitmproxy Start a mitmproxy for one of the workers\n"; print " --mitmproxy Start a mitmproxy for one of the workers\n";
print " --worker-count Number of workers in Citus cluster (default: 2)\n"; print " --worker-count Number of workers in Citus cluster (default: 2)\n";
print " --citus-version Citus version being tested (used for during extension create)\n";
exit 1; exit 1;
} }
@ -87,6 +88,7 @@ my $conninfo = "";
my $publicWorker1Host = "localhost"; my $publicWorker1Host = "localhost";
my $publicWorker2Host = "localhost"; my $publicWorker2Host = "localhost";
my $workerCount = 2; my $workerCount = 2;
my $citusversion = "";
my $serversAreShutdown = "TRUE"; my $serversAreShutdown = "TRUE";
my $usingWindows = 0; my $usingWindows = 0;
@ -121,6 +123,7 @@ GetOptions(
'worker-1-public-hostname=s' => \$publicWorker1Host, 'worker-1-public-hostname=s' => \$publicWorker1Host,
'worker-2-public-hostname=s' => \$publicWorker2Host, 'worker-2-public-hostname=s' => \$publicWorker2Host,
'worker-count=i' => \$workerCount, 'worker-count=i' => \$workerCount,
'citus-version=s' => \$citusversion,
'help' => sub { Usage() }); 'help' => sub { Usage() });
my $fixopen = "$bindir/postgres.fixopen"; my $fixopen = "$bindir/postgres.fixopen";
@ -590,6 +593,12 @@ if($isolationtester)
push(@pgOptions, "citus.background_task_queue_interval=-1"); push(@pgOptions, "citus.background_task_queue_interval=-1");
} }
if($citusversion)
{
push(@pgOptions, "citus.enable_version_checks=off");
push(@pgOptions, "columnar.enable_version_checks=off");
}
# Add externally added options last, so they overwrite the default ones above # Add externally added options last, so they overwrite the default ones above
for my $option (@userPgOptions) for my $option (@userPgOptions)
{ {
@ -990,10 +999,20 @@ if (!$conninfo)
for my $extension (@extensions) for my $extension (@extensions)
{ {
system(catfile($bindir, "psql"), if ($extension eq "citus" && $citusversion ne "")
('-X', '-h', $host, '-p', $port, '-U', $user, "-d", "regression", {
'-c', "CREATE EXTENSION IF NOT EXISTS $extension;")) == 0 system(catfile($bindir, "psql"),
or die "Could not create extension $extension on worker port $port."; ('-X', '-h', $host, '-p', $port, '-U', $user, "-d", "regression",
'-c', "CREATE EXTENSION IF NOT EXISTS $extension VERSION '$citusversion';")) == 0
or die "Could not create extension $extension on worker port $port.";
}
else
{
system(catfile($bindir, "psql"),
('-X', '-h', $host, '-p', $port, '-U', $user, "-d", "regression",
'-c', "CREATE EXTENSION IF NOT EXISTS $extension;")) == 0
or die "Could not create extension $extension on worker port $port.";
}
} }
foreach my $function (keys %functions) foreach my $function (keys %functions)