spqr icon indicating copy to clipboard operation
spqr copied to clipboard

Make regress test with coordinator installation greate again

Open xelavopelk opened this issue 1 month ago • 1 comments

add regress with coordinator into CI 0) fix bugs on run_tests "console" "regress_router" "7432". Add test to CI

  1. fix bugs on every call run_tests in file test\regress\run_tests_coord.sh. remove comment on clean call to run it in CI

xelavopelk avatar Nov 09 '25 15:11 xelavopelk

current bugs

regress_tests_coord   | # The differences that caused some tests to fail can be viewed in the file "/regress/tests/console/regression.diffs".
regress_tests_coord   | # A copy of the test summary that you see above is saved in the file "/regress/tests/console/regression.out".
regress_tests_coord   | diff -U3 /regress/tests/console/expected/show_shards.out /regress/tests/console/results/show_shards.out
regress_tests_coord   | --- /regress/tests/console/expected/show_shards.out	2025-07-23 14:15:00.643038116 +0300
regress_tests_coord   | +++ /regress/tests/console/results/show_shards.out	2025-11-09 12:17:35.775718281 +0200
regress_tests_coord   | @@ -54,7 +54,7 @@
regress_tests_coord   |  (1 row)
regress_tests_coord   |  
regress_tests_coord   |  CREATE SHARD sh1 WITH HOSTS localhost:6432;
regress_tests_coord   | -ERROR:  shard with id sh1 already exists
regress_tests_coord   | +ERROR:  rpc error: code = Unknown desc = shard with id sh1 already exists
regress_tests_coord   |  SHOW shards;
regress_tests_coord   |   shard 
regress_tests_coord   |  -------
regress_tests_coord   | @@ -90,8 +90,7 @@
regress_tests_coord   |   sh2
regress_tests_coord   |   sh3
regress_tests_coord   |   sh4
regress_tests_coord   | - sh5
regress_tests_coord   | -(5 rows)
regress_tests_coord   | +(4 rows)
regress_tests_coord   |  
regress_tests_coord   |  SHOW hosts;
regress_tests_coord   |   shard |           host            |  alive  |   rw    |  time   
regress_tests_coord   | @@ -104,8 +103,7 @@
regress_tests_coord   |   sh3   | spqr_shard_3_replica:6432 | unknown | unknown | unknown
regress_tests_coord   |   sh4   | spqr_shard_4:6432         | unknown | unknown | unknown
regress_tests_coord   |   sh4   | spqr_shard_4_replica:6432 | unknown | unknown | unknown
regress_tests_coord   | - sh5   | e:6432                    | unknown | unknown | unknown
regress_tests_coord   | -(9 rows)
regress_tests_coord   | +(8 rows)
regress_tests_coord   |  
regress_tests_coord   |  DROP SHARD sh5;
regress_tests_coord   |     drop shard    
regress_tests_coord   | diff -U3 /regress/tests/console/expected/show_routers.out /regress/tests/console/results/show_routers.out
regress_tests_coord   | --- /regress/tests/console/expected/show_routers.out	2025-07-11 11:17:25.837012438 +0300
regress_tests_coord   | +++ /regress/tests/console/results/show_routers.out	2025-11-09 12:17:35.801718658 +0200
regress_tests_coord   | @@ -6,8 +6,8 @@
regress_tests_coord   |  https://github.com/pg-sharding/spqr/tree/master/docs
regress_tests_coord   |  
regress_tests_coord   |  SHOW routers;
regress_tests_coord   | -   show routers   | status 
regress_tests_coord   | -------------------+--------
regress_tests_coord   | - router -> local- | 
regress_tests_coord   | +           show routers           | status 
regress_tests_coord   | +----------------------------------+--------
regress_tests_coord   | + router -> r1-regress_router:7000 | OPENED
regress_tests_coord   |  (1 row)
regress_tests_coord   |  
regress_tests_coord   | diff -U3 /regress/tests/console/expected/show_relations.out /regress/tests/console/results/show_relations.out
regress_tests_coord   | --- /regress/tests/console/expected/show_relations.out	2025-10-21 13:01:16.641902980 +0300
regress_tests_coord   | +++ /regress/tests/console/results/show_relations.out	2025-11-09 12:17:36.099722979 +0200
regress_tests_coord   | @@ -53,10 +53,10 @@
regress_tests_coord   |  (2 rows)
regress_tests_coord   |  
regress_tests_coord   |  CREATE REFERENCE RELATION z_rf;
regress_tests_coord   | -   create reference table    
regress_tests_coord   | ------------------------------
regress_tests_coord   | + create reference table 
regress_tests_coord   | +------------------------
regress_tests_coord   |   table    -> z_rf
regress_tests_coord   | - shard id -> sh1,sh2,sh3,sh4
regress_tests_coord   | + shard id -> 
regress_tests_coord   |  (2 rows)
regress_tests_coord   |  
regress_tests_coord   |  SHOW relations;
regress_tests_coord   | diff -U3 /regress/tests/console/expected/drop.out /regress/tests/console/results/drop.out
regress_tests_coord   | --- /regress/tests/console/expected/drop.out	2025-11-07 18:49:39.771480124 +0200
regress_tests_coord   | +++ /regress/tests/console/results/drop.out	2025-11-09 12:17:36.254725227 +0200
regress_tests_coord   | @@ -42,10 +42,11 @@
regress_tests_coord   |  SHOW shards;
regress_tests_coord   |   shard 
regress_tests_coord   |  -------
regress_tests_coord   | + sh1
regress_tests_coord   |   sh2
regress_tests_coord   |   sh3
regress_tests_coord   |   sh4
regress_tests_coord   | -(3 rows)
regress_tests_coord   | +(4 rows)
regress_tests_coord   |  
regress_tests_coord   |  SHOW key_ranges;
regress_tests_coord   |   Key range ID | Shard ID | Distribution ID | Lower bound | Locked 
regress_tests_coord   | diff -U3 /regress/tests/console/expected/add.out /regress/tests/console/results/add.out
regress_tests_coord   | --- /regress/tests/console/expected/add.out	2025-10-14 12:30:56.119630420 +0300
regress_tests_coord   | +++ /regress/tests/console/results/add.out	2025-11-09 12:17:36.353726663 +0200
regress_tests_coord   | @@ -37,7 +37,7 @@
regress_tests_coord   |  (1 row)
regress_tests_coord   |  
regress_tests_coord   |  CREATE KEY RANGE krid2 FROM 11 ROUTE TO sh2 FOR DISTRIBUTION ds1;
regress_tests_coord   | -ERROR:  key range krid2 already present in qdb
regress_tests_coord   | +ERROR:  rpc error: code = Unknown desc = key range krid2 already present in qdb
regress_tests_coord   |  SHOW key_ranges;
regress_tests_coord   |   Key range ID | Shard ID | Distribution ID | Lower bound | Locked 
regress_tests_coord   |  --------------+----------+-----------------+-------------+--------
regress_tests_coord   | @@ -45,7 +45,7 @@
regress_tests_coord   |  (1 row)
regress_tests_coord   |  
regress_tests_coord   |  CREATE KEY RANGE krid2 FROM 33 ROUTE TO nonexistentshard FOR DISTRIBUTION ds1;
regress_tests_coord   | -ERROR:  unknown shard nonexistentshard
regress_tests_coord   | +ERROR:  rpc error: code = Unknown desc = shard "nonexistentshard" not found
regress_tests_coord   |  DROP DISTRIBUTION ALL CASCADE;
regress_tests_coord   |     drop distribution    
regress_tests_coord   |  ------------------------
regress_tests_coord   | diff -U3 /regress/tests/console/expected/delete_distribution.out /regress/tests/console/results/delete_distribution.out
regress_tests_coord   | --- /regress/tests/console/expected/delete_distribution.out	2025-10-14 12:30:56.119630420 +0300
regress_tests_coord   | +++ /regress/tests/console/results/delete_distribution.out	2025-11-09 12:17:36.638730797 +0200
regress_tests_coord   | @@ -44,7 +44,7 @@
regress_tests_coord   |  
regress_tests_coord   |  -- drop non-existing one
regress_tests_coord   |  DROP DISTRIBUTION ds23223;
regress_tests_coord   | -ERROR:  distribution "ds23223" not found
regress_tests_coord   | +ERROR:  rpc error: code = Unknown desc = distribution "ds23223" not found
regress_tests_coord   |  -- non-cascade drop with dependent key ranges
regress_tests_coord   |  DROP DISTRIBUTION ds1;
regress_tests_coord   |  ERROR:  cannot drop distribution ds1 because other objects depend on it
regress_tests_coord   | diff -U3 /regress/tests/console/expected/sequence.out /regress/tests/console/results/sequence.out
regress_tests_coord   | --- /regress/tests/console/expected/sequence.out	2025-11-07 18:49:39.771480124 +0200
regress_tests_coord   | +++ /regress/tests/console/results/sequence.out	2025-11-09 12:17:36.930735033 +0200
regress_tests_coord   | @@ -6,17 +6,17 @@
regress_tests_coord   |  https://github.com/pg-sharding/spqr/tree/master/docs
regress_tests_coord   |  
regress_tests_coord   |  CREATE REFERENCE TABLE t AUTO INCREMENT id;
regress_tests_coord   | -   create reference table    
regress_tests_coord   | ------------------------------
regress_tests_coord   | + create reference table 
regress_tests_coord   | +------------------------
regress_tests_coord   |   table    -> t
regress_tests_coord   | - shard id -> sh1,sh2,sh3,sh4
regress_tests_coord   | + shard id -> 
regress_tests_coord   |  (2 rows)
regress_tests_coord   |  
regress_tests_coord   |  CREATE REFERENCE TABLE t1 AUTO INCREMENT id;
regress_tests_coord   | -   create reference table    
regress_tests_coord   | ------------------------------
regress_tests_coord   | + create reference table 
regress_tests_coord   | +------------------------
regress_tests_coord   |   table    -> t1
regress_tests_coord   | - shard id -> sh1,sh2,sh3,sh4
regress_tests_coord   | + shard id -> 
regress_tests_coord   |  (2 rows)
regress_tests_coord   |  
regress_tests_coord   |  SHOW SEQUENCES;
regress_tests_coord   | @@ -27,7 +27,7 @@
regress_tests_coord   |  (2 rows)
regress_tests_coord   |  
regress_tests_coord   |  DROP SEQUENCE t1_id;
regress_tests_coord   | -ERROR:  column "t1.id" is attached to sequence
regress_tests_coord   | +ERROR:  rpc error: code = Unknown desc = column "t1.id" is attached to sequence
regress_tests_coord   |  DROP REFERENCE RELATION t1;
regress_tests_coord   |   drop reference relation 
regress_tests_coord   |  -------------------------
regress_tests_coord   | @@ -53,7 +53,7 @@
regress_tests_coord   |  (1 row)
regress_tests_coord   |  
regress_tests_coord   |  ALTER DISTRIBUTION ds ATTACH RELATION t2 DISTRIBUTION KEY id AUTO INCREMENT id1;
regress_tests_coord   | -ERROR:  sequence are supported for replicated relations only
regress_tests_coord   | +ERROR:  rpc error: code = Unknown desc = sequence are supported for replicated relations only
regress_tests_coord   |  DROP REFERENCE RELATION t;
regress_tests_coord   |   drop reference relation 
regress_tests_coord   |  -------------------------
regress_tests_coord   | diff -U3 /regress/tests/console/expected/reference_table.out /regress/tests/console/results/reference_table.out
regress_tests_coord   | --- /regress/tests/console/expected/reference_table.out	2025-11-07 18:49:39.771480124 +0200
regress_tests_coord   | +++ /regress/tests/console/results/reference_table.out	2025-11-09 12:17:37.128737906 +0200
regress_tests_coord   | @@ -6,10 +6,10 @@
regress_tests_coord   |  https://github.com/pg-sharding/spqr/tree/master/docs
regress_tests_coord   |  
regress_tests_coord   |  CREATE REFERENCE TABLE zz;
regress_tests_coord   | -   create reference table    
regress_tests_coord   | ------------------------------
regress_tests_coord   | + create reference table 
regress_tests_coord   | +------------------------
regress_tests_coord   |   table    -> zz
regress_tests_coord   | - shard id -> sh1,sh2,sh3,sh4
regress_tests_coord   | + shard id -> 
regress_tests_coord   |  (2 rows)
regress_tests_coord   |  
regress_tests_coord   |  CREATE REFERENCE TABLE zz2 ON sh3, sh4;
regress_tests_coord   | @@ -20,11 +20,11 @@
regress_tests_coord   |  (2 rows)
regress_tests_coord   |  
regress_tests_coord   |  CREATE REFERENCE RELATION zz2;
regress_tests_coord   | -ERROR:  reference relation zz2 already exists
regress_tests_coord   | +ERROR:  rpc error: code = Unknown desc = reference relation zz2 already exists
regress_tests_coord   |  SYNC REFERENCE TABLES ON sh1;
regress_tests_coord   |  ERROR:  SYNC REFERENCE TABLES/RELATIONS currently unsupported
regress_tests_coord   |  SYNC REFERENCE TABLE zz2 ON sh1;
regress_tests_coord   | -ERROR:  request is unprocessable in router
regress_tests_coord   | +ERROR:  rpc error: code = Unimplemented desc = method SyncReferenceRelations not implemented
regress_tests_coord   |  ALTER DISTRIBUTION 'REPLICATED' ALTER RELATION zz2 SCHEMA my_schema;
regress_tests_coord   |            alter relation          
regress_tests_coord   |  ----------------------------------
regress_tests_coord   | @@ -33,7 +33,7 @@
regress_tests_coord   |  (2 rows)
regress_tests_coord   |  
regress_tests_coord   |  ALTER DISTRIBUTION 'REPLICATED' ALTER RELATION zz2 DISTRIBUTION KEY id;
regress_tests_coord   | -ERROR:  setting distribution key is forbidden for reference relations
regress_tests_coord   | +ERROR:  rpc error: code = Unknown desc = setting distribution key is forbidden for reference relations
regress_tests_coord   |  DROP REFERENCE RELATION zz2;
regress_tests_coord   |   drop reference relation 
regress_tests_coord   |  -------------------------
regress_tests_coord   | @@ -42,7 +42,7 @@
regress_tests_coord   |  
regress_tests_coord   |  --should fail
regress_tests_coord   |  DROP REFERENCE RELATION zz2;
regress_tests_coord   | -ERROR:  reference relation "zz2" not found
regress_tests_coord   | +ERROR:  rpc error: code = Unknown desc = no such reference relation present in qdb
regress_tests_coord   |  DROP DISTRIBUTION ALL CASCADE;
regress_tests_coord   |         drop distribution       
regress_tests_coord   |  -------------------------------
regress_tests_coord   | kill cluster
regress_tests_coord   | # using postmaster on regress_coordinator, port 7002
regress_tests_coord   | ok 1         - kill                                       17 ms
regress_tests_coord   | 1..1
regress_tests_coord   | # All 1 tests passed.
regress_tests_coord   | go test!
time="2025-11-09T13:17:57+03:00" level=debug msg="container regress_tests_coord exited with code 1"
regress_tests_coord exited with code 1

xelavopelk avatar Nov 09 '25 15:11 xelavopelk