Add jobs to run tests with pg 12 (#3033)

* Add PG12 test outputs

* Add jobs to run tests with pg 12

* use POSIX collate for compatibility between pg10/pg11/pg12

* do not override the new default value when running vanilla tests

* fix 2 problems with pg12 tests

* update pg12 images with pg12 rc1

* remove pg10 jobs

* Revert "Add PG12 test outputs"

This reverts commit f3545b92ef.

* change images to use latest instead of dev

* add missing coverage flags
pull/3063/head^2
SaitTalhaNisanci 2019-10-02 15:33:12 +03:00 committed by GitHub
parent 3f83b726e0
commit 19bdca14d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 148 additions and 92 deletions

View File

@ -30,74 +30,6 @@ jobs:
- run:
name: 'Check Snapshots'
command: "./configure && make check-sql-snapshots -C src/backend/distributed"
test-10_check-multi:
docker:
- image: 'citusdata/exttester-10:latest'
working_directory: /home/circleci/project
steps:
- attach_workspace:
at: .
- run:
name: 'Install and Test (check-multi)'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext check-multi'
- codecov/upload:
flags: 'test_10,multi'
test-10_check-tt-van-mx:
docker:
- image: 'citusdata/exttester-10:latest'
working_directory: /home/circleci/project
steps:
- attach_workspace:
at: .
- run:
name: 'Install and Test (check-tt-van-mx)'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext check-multi-task-tracker-extra check-vanilla check-multi-mx'
- codecov/upload:
flags: 'test_10,tracker,vanilla,mx'
test-10_check-iso-work-fol:
docker:
- image: 'citusdata/exttester-10:latest'
working_directory: /home/circleci/project
steps:
- attach_workspace:
at: .
- run:
name: 'Install and Test (check-iso-work-fol)'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext check-isolation check-worker'
- codecov/upload:
flags: 'test_10,isolation,worker'
test-10_check-fol:
docker:
- image: 'citusdata/exttester-10:latest'
working_directory: /home/circleci/project
steps:
- attach_workspace:
at: .
- run:
name: 'Enable core dumps'
command: 'ulimit -c unlimited'
- run:
name: 'Install and Test (fol)'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext check-follower-cluster'
- run:
command: |
mkdir -p /tmp/core_dumps
cp core.* /tmp/core_dumps
when: on_fail
- codecov/upload:
flags: 'follower'
- store_artifacts:
path: '/tmp/core_dumps'
test-10_check-failure:
docker:
- image: 'citusdata/failtester-10:latest'
working_directory: /home/circleci/project
steps:
- attach_workspace:
at: .
- run:
name: 'Install and Test (check-failure)'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext check-failure'
test-11_check-multi:
docker:
- image: 'citus/exttester-11:latest'
@ -194,7 +126,7 @@ jobs:
cp core.* /tmp/core_dumps
when: on_fail
- codecov/upload:
flags: 'follower'
flags: 'test_11,follower'
- store_artifacts:
path: '/tmp/core_dumps'
test-11_check-failure:
@ -207,6 +139,7 @@ jobs:
- run:
name: 'Install and Test (check-failure)'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext check-failure'
test-10-11_check-pg-upgrade:
docker:
- image: 'citus/pgupgradetester:latest'
@ -217,6 +150,7 @@ jobs:
- run:
name: 'Install and test postgres upgrade'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext --target check-upgrade --old-pg-version 10 --new-pg-version 11'
test-11-12_check-pg-upgrade:
docker:
- image: 'citus/pgupgradetester:latest'
@ -228,6 +162,115 @@ jobs:
name: 'Install and test postgres upgrade'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext --target check-upgrade --old-pg-version 11 --new-pg-version 12'
test-12_check-multi:
docker:
- image: 'citus/exttester-12:latest'
working_directory: /home/circleci/project
steps:
- attach_workspace:
at: .
- run:
name: 'Install and Test (check-multi)'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext check-multi'
- codecov/upload:
flags: 'test_12,multi'
test-12_check-tt-van-mx:
docker:
- image: 'citus/exttester-12:latest'
working_directory: /home/circleci/project
steps:
- attach_workspace:
at: .
- run:
name: 'Install and Test (check-tt-van-mx)'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext check-multi-task-tracker-extra check-vanilla check-multi-mx'
- codecov/upload:
flags: 'test_12,tracker,vanilla,mx'
test-12_check-iso-work-fol:
docker:
- image: 'citus/exttester-12:latest'
working_directory: /home/circleci/project
steps:
- attach_workspace:
at: .
- run:
name: 'Install and Test (check-iso-work-fol)'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext check-isolation check-worker'
- codecov/upload:
flags: 'test_12,isolation,worker'
test-12_check-fol:
docker:
- image: 'citus/exttester-12:latest'
working_directory: /home/circleci/project
steps:
- attach_workspace:
at: .
- run:
name: 'Enable core dumps'
command: 'ulimit -c unlimited'
- run:
name: 'Install and Test (fol)'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext check-follower-cluster'
- run:
command: |
mkdir -p /tmp/core_dumps
cp core.* /tmp/core_dumps
when: on_fail
- codecov/upload:
flags: 'test_12,follower'
- store_artifacts:
path: '/tmp/core_dumps'
test-12_check-non-adaptive-multi:
docker:
- image: 'citus/exttester-12:latest'
working_directory: /home/circleci/project
steps:
- attach_workspace:
at: .
- run:
name: 'Install and Test (check-non-adaptive-executors)'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext check-multi-non-adaptive'
- codecov/upload:
flags: 'test_12,multi'
test-12_check-failure:
docker:
- image: 'citus/failtester-12:latest'
working_directory: /home/circleci/project
steps:
- attach_workspace:
at: .
- run:
name: 'Install and Test (check-failure)'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext check-failure'
test-12_check-non-adaptive-failure:
docker:
- image: 'citus/failtester-12:latest'
working_directory: /home/circleci/project
steps:
- attach_workspace:
at: .
- run:
name: 'Install and Test (check-non-adaptive-executors)'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext check-failure-non-adaptive'
- codecov/upload:
flags: 'test_12,failure'
test-12_check-non-adaptive-isolation:
docker:
- image: 'citus/exttester-12:latest'
working_directory: /home/circleci/project
steps:
- attach_workspace:
at: .
- run:
name: 'Install and Test (check-non-adaptive-executors)'
command: 'chown -R circleci:circleci /home/circleci && install-and-test-ext check-isolation-non-adaptive'
- codecov/upload:
flags: 'test_12,isolation'
workflows:
version: 2
build_and_test:
@ -236,17 +279,6 @@ workflows:
- check-style
- check-sql-snapshots
- test-10_check-multi:
requires: [build]
- test-10_check-tt-van-mx:
requires: [build]
- test-10_check-iso-work-fol:
requires: [build]
- test-10_check-fol:
requires: [build]
- test-10_check-failure:
requires: [build]
- test-11_check-multi:
requires: [build]
- test-11_check-tt-van-mx:
@ -269,3 +301,21 @@ workflows:
requires: [build]
- test-11-12_check-pg-upgrade:
requires: [build]
- test-12_check-multi:
requires: [build]
- test-12_check-tt-van-mx:
requires: [build]
- test-12_check-iso-work-fol:
requires: [build]
- test-12_check-fol:
requires: [build]
- test-12_check-failure:
requires: [build]
- test-12_check-non-adaptive-multi:
requires: [build]
- test-12_check-non-adaptive-failure:
requires: [build]
- test-12_check-non-adaptive-isolation:
requires: [build]

View File

@ -83,7 +83,7 @@ SELECT count(*) FROM citus.pg_dist_object WHERE objid = 'disabled_object_propaga
1
(1 row)
ALTER TYPE tt3 ADD ATTRIBUTE c int, DROP ATTRIBUTE b, ALTER ATTRIBUTE a SET DATA TYPE text COLLATE "en_US";
ALTER TYPE tt3 ADD ATTRIBUTE c int, DROP ATTRIBUTE b, ALTER ATTRIBUTE a SET DATA TYPE text COLLATE "POSIX";
ALTER TYPE tt3 OWNER TO typeowner_for_disabled_object_propagation_guc;
ALTER TYPE tt3 RENAME ATTRIBUTE c TO d;
ALTER TYPE tt3 RENAME TO tt4;

View File

@ -255,7 +255,7 @@ SELECT run_command_on_workers($$SELECT typname FROM pg_type, pg_user where typna
(2 rows)
-- make sure attribute names are quoted correctly, no errors indicates types are propagated correctly
CREATE TYPE tc9 AS ("field-with-dashes" text COLLATE "en_US");
CREATE TYPE tc9 AS ("field-with-dashes" text COLLATE "POSIX");
ALTER TYPE tc9 ADD ATTRIBUTE "some-more" int, ADD ATTRIBUTE normal int;
ALTER TYPE tc9 RENAME ATTRIBUTE normal TO "not-so-normal";
-- test alter statements for non-distributed types, if they would be propagated they would
@ -266,7 +266,7 @@ CREATE TYPE non_distributed_enum_type AS ENUM ('a', 'c');
SET citus.enable_ddl_propagation TO on;
ALTER TYPE non_distributed_composite_type ADD ATTRIBUTE c int;
ALTER TYPE non_distributed_composite_type RENAME ATTRIBUTE c TO d;
ALTER TYPE non_distributed_composite_type ALTER ATTRIBUTE d SET DATA TYPE text COLLATE "en_US" CASCADE;
ALTER TYPE non_distributed_composite_type ALTER ATTRIBUTE d SET DATA TYPE text COLLATE "POSIX" CASCADE;
ALTER TYPE non_distributed_composite_type DROP ATTRIBUTE d;
ALTER TYPE non_distributed_composite_type OWNER TO typeuser;
ALTER TYPE non_distributed_composite_type RENAME TO non_distributed_composite_type_renamed;
@ -295,7 +295,7 @@ SELECT create_distributed_table('type_proc','a');
DROP TABLE type_proc;
ALTER TYPE distributed_composite_type ADD ATTRIBUTE c int;
ALTER TYPE distributed_composite_type RENAME ATTRIBUTE c TO d;
ALTER TYPE distributed_composite_type ALTER ATTRIBUTE d SET DATA TYPE text COLLATE "en_US" CASCADE;
ALTER TYPE distributed_composite_type ALTER ATTRIBUTE d SET DATA TYPE text COLLATE "POSIX" CASCADE;
ALTER TYPE distributed_composite_type DROP ATTRIBUTE d;
ALTER TYPE distributed_composite_type OWNER TO typeuser;
ALTER TYPE distributed_composite_type RENAME TO distributed_composite_type_renamed;

View File

@ -255,7 +255,7 @@ SELECT run_command_on_workers($$SELECT typname FROM pg_type, pg_user where typna
(2 rows)
-- make sure attribute names are quoted correctly, no errors indicates types are propagated correctly
CREATE TYPE tc9 AS ("field-with-dashes" text COLLATE "en_US");
CREATE TYPE tc9 AS ("field-with-dashes" text COLLATE "POSIX");
ALTER TYPE tc9 ADD ATTRIBUTE "some-more" int, ADD ATTRIBUTE normal int;
ALTER TYPE tc9 RENAME ATTRIBUTE normal TO "not-so-normal";
-- test alter statements for non-distributed types, if they would be propagated they would
@ -266,7 +266,7 @@ CREATE TYPE non_distributed_enum_type AS ENUM ('a', 'c');
SET citus.enable_ddl_propagation TO on;
ALTER TYPE non_distributed_composite_type ADD ATTRIBUTE c int;
ALTER TYPE non_distributed_composite_type RENAME ATTRIBUTE c TO d;
ALTER TYPE non_distributed_composite_type ALTER ATTRIBUTE d SET DATA TYPE text COLLATE "en_US" CASCADE;
ALTER TYPE non_distributed_composite_type ALTER ATTRIBUTE d SET DATA TYPE text COLLATE "POSIX" CASCADE;
ALTER TYPE non_distributed_composite_type DROP ATTRIBUTE d;
ALTER TYPE non_distributed_composite_type OWNER TO typeuser;
ALTER TYPE non_distributed_composite_type RENAME TO non_distributed_composite_type_renamed;
@ -295,7 +295,7 @@ SELECT create_distributed_table('type_proc','a');
DROP TABLE type_proc;
ALTER TYPE distributed_composite_type ADD ATTRIBUTE c int;
ALTER TYPE distributed_composite_type RENAME ATTRIBUTE c TO d;
ALTER TYPE distributed_composite_type ALTER ATTRIBUTE d SET DATA TYPE text COLLATE "en_US" CASCADE;
ALTER TYPE distributed_composite_type ALTER ATTRIBUTE d SET DATA TYPE text COLLATE "POSIX" CASCADE;
ALTER TYPE distributed_composite_type DROP ATTRIBUTE d;
ALTER TYPE distributed_composite_type OWNER TO typeuser;
ALTER TYPE distributed_composite_type RENAME TO distributed_composite_type_renamed;

View File

@ -1,6 +1,7 @@
CREATE SCHEMA with_transactions;
SET search_path TO with_transactions, public;
SET citus.shard_count TO 4;
SET citus.shard_replication_factor TO 1; -- https://github.com/citusdata/citus/issues/3061
SET citus.next_placement_id TO 800000;
CREATE TABLE with_transactions.raw_table (tenant_id int, income float, created_at timestamptz);
SELECT create_distributed_table('raw_table', 'tenant_id');

View File

@ -294,7 +294,10 @@ push(@pgOptions, '-c', "listen_addresses=${host}");
# not required, and we don't necessarily have access to the default directory
push(@pgOptions, '-c', "unix_socket_directories=");
push(@pgOptions, '-c', "fsync=off");
push(@pgOptions, '-c', "extra_float_digits=0");
if (! $vanillatest)
{
push(@pgOptions, '-c', "extra_float_digits=0");
}
my $sharedPreloadLibraries = "citus";
@ -379,6 +382,7 @@ if($isolationtester)
push(@pgOptions, '-c', "citus.shard_count=4");
push(@pgOptions, '-c', "citus.metadata_sync_interval=1000");
push(@pgOptions, '-c', "citus.metadata_sync_retry_interval=100");
push(@pgOptions, '-c', "client_min_messages=warning"); # pg12 introduced notice showing during isolation tests
}
# Add externally added options last, so they overwrite the default ones above

View File

@ -47,7 +47,7 @@ COMMIT;
-- verify the type is distributed
SELECT count(*) FROM citus.pg_dist_object WHERE objid = 'disabled_object_propagation.tt3'::regtype::oid;
ALTER TYPE tt3 ADD ATTRIBUTE c int, DROP ATTRIBUTE b, ALTER ATTRIBUTE a SET DATA TYPE text COLLATE "en_US";
ALTER TYPE tt3 ADD ATTRIBUTE c int, DROP ATTRIBUTE b, ALTER ATTRIBUTE a SET DATA TYPE text COLLATE "POSIX";
ALTER TYPE tt3 OWNER TO typeowner_for_disabled_object_propagation_guc;
ALTER TYPE tt3 RENAME ATTRIBUTE c TO d;
ALTER TYPE tt3 RENAME TO tt4;

View File

@ -138,7 +138,7 @@ SELECT typname FROM pg_type, pg_user where typname IN ('te3','tc3','tc4','tc5')
SELECT run_command_on_workers($$SELECT typname FROM pg_type, pg_user where typname IN ('te3','tc3','tc4','tc5') and typowner = usesysid ORDER BY typname;$$);
-- make sure attribute names are quoted correctly, no errors indicates types are propagated correctly
CREATE TYPE tc9 AS ("field-with-dashes" text COLLATE "en_US");
CREATE TYPE tc9 AS ("field-with-dashes" text COLLATE "POSIX");
ALTER TYPE tc9 ADD ATTRIBUTE "some-more" int, ADD ATTRIBUTE normal int;
ALTER TYPE tc9 RENAME ATTRIBUTE normal TO "not-so-normal";
@ -151,7 +151,7 @@ SET citus.enable_ddl_propagation TO on;
ALTER TYPE non_distributed_composite_type ADD ATTRIBUTE c int;
ALTER TYPE non_distributed_composite_type RENAME ATTRIBUTE c TO d;
ALTER TYPE non_distributed_composite_type ALTER ATTRIBUTE d SET DATA TYPE text COLLATE "en_US" CASCADE;
ALTER TYPE non_distributed_composite_type ALTER ATTRIBUTE d SET DATA TYPE text COLLATE "POSIX" CASCADE;
ALTER TYPE non_distributed_composite_type DROP ATTRIBUTE d;
ALTER TYPE non_distributed_composite_type OWNER TO typeuser;
@ -187,7 +187,7 @@ DROP TABLE type_proc;
ALTER TYPE distributed_composite_type ADD ATTRIBUTE c int;
ALTER TYPE distributed_composite_type RENAME ATTRIBUTE c TO d;
ALTER TYPE distributed_composite_type ALTER ATTRIBUTE d SET DATA TYPE text COLLATE "en_US" CASCADE;
ALTER TYPE distributed_composite_type ALTER ATTRIBUTE d SET DATA TYPE text COLLATE "POSIX" CASCADE;
ALTER TYPE distributed_composite_type DROP ATTRIBUTE d;
ALTER TYPE distributed_composite_type OWNER TO typeuser;

View File

@ -2,6 +2,7 @@ CREATE SCHEMA with_transactions;
SET search_path TO with_transactions, public;
SET citus.shard_count TO 4;
SET citus.shard_replication_factor TO 1; -- https://github.com/citusdata/citus/issues/3061
SET citus.next_placement_id TO 800000;
CREATE TABLE with_transactions.raw_table (tenant_id int, income float, created_at timestamptz);