mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-04 20:06:35 +03:00
Upgrade Citus to v11.3.0 in tests.
Upgrades Citus to v11.3.0 in tests. This breaks an assumption made by the tests for the `get_source_tables` metadata API, in which data is expected to be ordered. We fix it by explicitly ordering rather than relying on the goodwill of the database. PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9039 GitOrigin-RevId: ee86db7e1c264d5009bb0203ac2f3fb2cda7b39f
This commit is contained in:
parent
a20c67da30
commit
397e95fc6a
@ -380,7 +380,7 @@ jobs:
|
||||
- image: *server_builder_image
|
||||
- image: hasura/postgres-13.0-alpine-postgis3:latest
|
||||
<<: *test_pg_env
|
||||
- image: citusdata/citus:11.2.1
|
||||
- image: citusdata/citus:11.3.0
|
||||
<<: *test_citus_env
|
||||
environment:
|
||||
# Setting default number of threads to 2
|
||||
|
@ -493,7 +493,7 @@ func StartCitusContainer(t TestingT) (string, func()) {
|
||||
pgopts := &dockertest.RunOptions{
|
||||
Name: fmt.Sprintf("%s-%s", uniqueName, "pg"),
|
||||
Repository: "citusdata/citus",
|
||||
Tag: "11.2.1",
|
||||
Tag: "11.3.0",
|
||||
Env: []string{
|
||||
fmt.Sprintf("POSTGRES_PASSWORD=%s", password),
|
||||
},
|
||||
|
@ -46,7 +46,7 @@ services:
|
||||
retries: 20
|
||||
|
||||
citus:
|
||||
image: citusdata/citus:11.2.1
|
||||
image: citusdata/citus:11.3.0
|
||||
platform: linux/amd64
|
||||
command:
|
||||
- -F # turn fsync off for speed
|
||||
|
@ -35,7 +35,7 @@ function citus_launch_container {
|
||||
--volume="${CITUS_VOLUME_NAME}:/var/lib/postgresql/data" \
|
||||
--env=POSTGRES_PASSWORD="$CITUS_PASSWORD" \
|
||||
--detach \
|
||||
citusdata/citus:11.2.1
|
||||
citusdata/citus:11.3.0
|
||||
}
|
||||
|
||||
function citus_wait {
|
||||
|
@ -115,11 +115,12 @@ instance PostgresMetadata 'Vanilla where
|
||||
JOIN pg_namespace nmsp_child ON nmsp_child.oid = child.relnamespace
|
||||
) as names
|
||||
)
|
||||
SELECT info_schema.table_name, info_schema.table_schema
|
||||
SELECT info_schema.table_schema, info_schema.table_name
|
||||
FROM information_schema.tables as info_schema, partitions
|
||||
WHERE
|
||||
info_schema.table_schema NOT IN ('information_schema', 'pg_catalog', 'hdb_catalog', '_timescaledb_internal')
|
||||
AND NOT (info_schema.table_name = ANY (partitions.names))
|
||||
ORDER BY info_schema.table_schema, info_schema.table_name
|
||||
|]
|
||||
|
||||
instance PostgresMetadata 'Citus where
|
||||
@ -206,12 +207,13 @@ instance PostgresMetadata 'Citus where
|
||||
JOIN pg_namespace nmsp_child ON nmsp_child.oid = child.relnamespace
|
||||
) as names
|
||||
)
|
||||
SELECT info_schema.table_name, info_schema.table_schema
|
||||
SELECT info_schema.table_schema, info_schema.table_name
|
||||
FROM information_schema.tables as info_schema, partitions
|
||||
WHERE
|
||||
info_schema.table_schema NOT IN ('pg_catalog', 'citus', 'information_schema', 'columnar', 'columnar_internal', 'guest', 'INFORMATION_SCHEMA', 'sys', 'db_owner', 'db_securityadmin', 'db_accessadmin', 'db_backupoperator', 'db_ddladmin', 'db_datawriter', 'db_datareader', 'db_denydatawriter', 'db_denydatareader', 'hdb_catalog', '_timescaledb_internal')
|
||||
AND NOT (info_schema.table_name = ANY (partitions.names))
|
||||
AND info_schema.table_name NOT IN ('citus_tables')
|
||||
ORDER BY info_schema.table_schema, info_schema.table_name
|
||||
|]
|
||||
|
||||
instance PostgresMetadata 'Cockroach where
|
||||
@ -237,11 +239,12 @@ instance PostgresMetadata 'Cockroach where
|
||||
JOIN pg_namespace nmsp_child ON nmsp_child.oid = child.relnamespace
|
||||
) as names
|
||||
)
|
||||
SELECT info_schema.table_name, info_schema.table_schema
|
||||
SELECT info_schema.table_schema, info_schema.table_name
|
||||
FROM information_schema.tables as info_schema, partitions
|
||||
WHERE
|
||||
info_schema.table_schema NOT IN ('pg_catalog', 'crdb_internal', 'information_schema', 'columnar', 'guest', 'INFORMATION_SCHEMA', 'sys', 'db_owner', 'db_securityadmin', 'db_accessadmin', 'db_backupoperator', 'db_ddladmin', 'db_datawriter', 'db_datareader', 'db_denydatawriter', 'db_denydatareader', 'hdb_catalog', '_timescaledb_internal', 'pg_extension')
|
||||
AND NOT (info_schema.table_name = ANY (partitions.names));
|
||||
AND NOT (info_schema.table_name = ANY (partitions.names))
|
||||
ORDER BY info_schema.table_schema, info_schema.table_name
|
||||
|]
|
||||
|
||||
----------------------------------------------------------------
|
||||
@ -280,4 +283,4 @@ instance
|
||||
runPgSourceReadTx sourceConfig (Query.multiQE fromPGTxErr (listAllTablesSql @pgKind))
|
||||
`onLeftM` \err -> throwError (prefixQErr "failed to fetch source tables: " err)
|
||||
|
||||
pure [QualifiedObject {..} | (qName, qSchema) <- results]
|
||||
pure [QualifiedObject {..} | (qSchema, qName) <- results]
|
||||
|
Loading…
Reference in New Issue
Block a user