Run citus tests on latest so, specified sql

eag/mvtest-workflow
eaydingol 2025-11-21 15:19:17 +03:00
parent 662b7248db
commit ce9a7b7c79
3 changed files with 34 additions and 8 deletions

View File

@ -132,7 +132,7 @@ jobs:
./build-${{ env.PG_MAJOR }}/*
./install-${{ env.PG_MAJOR }}.tar
test-citus:
name: PG${{ fromJson(matrix.pg_version).major }} - ${{ matrix.make }}
name: PG${{ fromJson(matrix.pg_version).major }} - ${{ matrix.make }} - ${{ matrix.citus_version}}
strategy:
fail-fast: false
matrix:
@ -161,6 +161,9 @@ jobs:
- check-enterprise-isolation-logicalrep-1
- check-enterprise-isolation-logicalrep-2
- check-enterprise-isolation-logicalrep-3
citus_version:
-
- 13.2-1
include:
- make: check-failure
pg_version: ${{ needs.params.outputs.pg15_version }}
@ -242,12 +245,12 @@ jobs:
- uses: actions/checkout@v4
- uses: "./.github/actions/setup_extension"
- 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
- uses: "./.github/actions/save_logs_and_results"
if: always()
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"
if: always()
with:

View File

@ -10,6 +10,9 @@ ifndef MAJORVERSION
MAJORVERSION := $(basename $(VERSION))
endif
ifndef CITUSVERSION
CITUSVERSION := ""
endif
# 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.
MAKEFILE_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
@ -28,7 +31,7 @@ export PGISOLATIONTIMEOUT = 60
## Citus regression support
##
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"
pg_upgrade_check = $(citus_abs_srcdir)/citus_tests/upgrade/pg_upgrade_test.py
@ -157,6 +160,7 @@ check-multi: all
check-enterprise: all
$(pg_regress_multi_check) --load-extension=citus \
-- $(MULTI_REGRESS_OPTS) --schedule=$(citus_abs_srcdir)/enterprise_schedule $(EXTRA_TESTS)
check-multi-1: all
$(pg_regress_multi_check) --load-extension=citus \
-- $(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 " --mitmproxy Start a mitmproxy for one of the workers\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;
}
@ -87,6 +88,7 @@ my $conninfo = "";
my $publicWorker1Host = "localhost";
my $publicWorker2Host = "localhost";
my $workerCount = 2;
my $citusversion = "";
my $serversAreShutdown = "TRUE";
my $usingWindows = 0;
@ -121,6 +123,7 @@ GetOptions(
'worker-1-public-hostname=s' => \$publicWorker1Host,
'worker-2-public-hostname=s' => \$publicWorker2Host,
'worker-count=i' => \$workerCount,
'citus-version=s' => \$citusversion,
'help' => sub { Usage() });
my $fixopen = "$bindir/postgres.fixopen";
@ -590,6 +593,12 @@ if($isolationtester)
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
for my $option (@userPgOptions)
{
@ -989,12 +998,22 @@ if (!$conninfo)
or die "Could not find citus as first library in shared_preload_libraries on worker $port.";
for my $extension (@extensions)
{
if ($extension eq "citus" && $citusversion ne "")
{
system(catfile($bindir, "psql"),
('-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)
{