Skip to content

Commit

Permalink
Use a test PostgreSQL image based on Debian, not Alpine.
Browse files Browse the repository at this point in the history
Alpine is often slower than Debian (because musl is sometimes slower than glibc) and not how anyone actually deploys PostgreSQL in production.

Most notably, some floating-point computations result in slightly different values, and Debian ships with better support for different locales so sorting text (e.g. with `ORDER BY`) behaves differently.

Let's test against an environment that people are likely to actually use.

As a result, there are slight changes to the results of PostGIS computations in a couple of test cases.

PR-URL: hasura/graphql-engine-mono#10942
GitOrigin-RevId: 4caed19def23a372fc3930c409514b1c9b385026
  • Loading branch information
SamirTalwar authored and hasura-bot committed Jul 19, 2024
1 parent 5a59887 commit b8d7c60
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker-compose/databases.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
postgres:
image: postgis/postgis:16-3.4-alpine
image: postgis/postgis:16-3.4
platform: linux/amd64
command:
- -F # turn fsync off for speed
Expand Down
2 changes: 1 addition & 1 deletion scripts/containers/postgres
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fi

PG_PASSWORD=postgres
PG_VOLUME_NAME='hasura-dev-postgres'
PG_CONTAINER_IMAGE='postgis/postgis:16-3.4-alpine'
PG_CONTAINER_IMAGE='postgis/postgis:16-3.4'
PG_CONTAINER_NAME="hasura-dev-postgres-$PG_PORT"
PG_DB_URL="postgresql://postgres:$PG_PASSWORD@127.0.0.1:$PG_PORT/postgres"
PG_DOCKER="docker exec -u postgres $PG_CONTAINER_NAME psql $PG_DB_URL"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ dbContainer :: TC.Network -> TC.TestContainer Database
dbContainer network = do
container <-
TC.run
$ TC.containerRequest (TC.fromTag ("postgis/postgis:16-3.4-alpine"))
$ TC.containerRequest (TC.fromTag ("postgis/postgis:16-3.4"))
& TC.setSuffixedName "hge-test-upgrade-db"
& TC.withNetwork network
& TC.withNetworkAlias "db"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ response:
- rid: 1
rast: 01000001009A9999999999E93F9A9999999999E9BF000000000000F0BF000000000000104000000000000000000000000000000000E610000005000500440000010101000101010101010101010101010101010001010100
- rid: 2
rast: 0100000100156C8E335B91F13FE2385B00285EF6BF350EE40064EBFFBF8D033900D9FA134000000000000000000000000000000000E610000005000500440000000101010001010101010101010101010101000101010000
rast: 0100000100166C8E335B91F13FE2385B00285EF6BF360EE40064EBFFBF8D033900D9FA134000000000000000000000000000000000E610000005000500440000000101010001010101010101010101010101000101010000
query:
variables:
point:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ response:
- rid: 1
rast: 01000001009A9999999999E93F9A9999999999E9BF000000000000F0BF000000000000104000000000000000000000000000000000E610000005000500440000010101000101010101010101010101010101010001010100
- rid: 2
rast: 0100000100156C8E335B91F13FE2385B00285EF6BF350EE40064EBFFBF8D033900D9FA134000000000000000000000000000000000E610000005000500440000000101010001010101010101010101010101000101010000
rast: 0100000100166C8E335B91F13FE2385B00285EF6BF360EE40064EBFFBF8D033900D9FA134000000000000000000000000000000000E610000005000500440000000101010001010101010101010101010101000101010000
query:
variables:
rast: 0100000100000000000000004000000000000000C00000000000000000000000000000084000000000000000000000000000000000E610000001000100440001
Expand Down

0 comments on commit b8d7c60

Please sign in to comment.