Skip to content

Commit b4a11d3

Browse files
committed
chore: pgx v5
chore: restore previous behaviour of storing hstore oid and reuse chore: remove interface{}, use any chore: scripts -> testdata test: testdata migration script and tegola.dump in repo fix: pgx/v4 logger behaviour revert: keep behaviour of not forwarding primary key to tile tags
1 parent 9bac264 commit b4a11d3

File tree

337 files changed

+28725
-36704
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

337 files changed

+28725
-36704
lines changed

.github/workflows/on_pr_push.yml

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -6,80 +6,80 @@ jobs:
66
runs-on: ubuntu-22.04
77

88
steps:
9-
- name: Check out code
10-
uses: actions/checkout@v4
9+
- name: Check out code
10+
uses: actions/checkout@v4
1111

12-
- name: Set up Go
13-
uses: actions/setup-go@v5
14-
with:
15-
go-version-file: 'go.mod'
16-
check-latest: true
12+
- name: Set up Go
13+
uses: actions/setup-go@v5
14+
with:
15+
go-version-file: 'go.mod'
16+
check-latest: true
1717

18-
- name: Env Debug
19-
run: |
20-
go env
21-
pwd
22-
echo ${HOME}
23-
echo ${GITHUB_WORKSPACE}
18+
- name: Env Debug
19+
run: |
20+
go env
21+
pwd
22+
echo ${HOME}
23+
echo ${GITHUB_WORKSPACE}
2424
25-
- name: Setup test environment
26-
run: docker compose up -d
25+
- name: Setup test environment
26+
run: docker compose up -d
2727

28-
- name: Postgres Debug
29-
env:
30-
PGUSER: postgres
31-
PGHOST: localhost
32-
PGDATABASE: postgres
33-
PGPASSWORD: postgres
34-
run: |
35-
psql -c "\l"
28+
- name: Postgres Debug
29+
env:
30+
PGUSER: postgres
31+
PGHOST: localhost
32+
PGDATABASE: postgres
33+
PGPASSWORD: postgres
34+
run: |
35+
psql -c "\l"
3636
37-
- name: Run tests
38-
env:
39-
# redis tests
40-
RUN_REDIS_TESTS: yes
37+
- name: Run tests
38+
env:
39+
# redis tests
40+
RUN_REDIS_TESTS: yes
4141

42-
# AWS S3 tests
43-
RUN_S3_TESTS: yes
44-
AWS_TEST_BUCKET: tegola-ci
45-
AWS_REGION: us-east-2
42+
# AWS S3 tests
43+
RUN_S3_TESTS: yes
44+
AWS_TEST_BUCKET: tegola-ci
45+
AWS_REGION: us-east-2
4646

47-
# PostGIS tests
48-
RUN_POSTGIS_TESTS: yes
49-
PGURI: postgres://postgres:postgres@localhost:5432/tegola
50-
PGURI_NO_ACCESS: postgres://tegola_no_access:postgres@localhost:5432/tegola
51-
PGSSLMODE: disable
52-
PGSSLKEY: ""
53-
PGSSLCERT: ""
54-
PGSSLROOTCERT: ""
47+
# PostGIS tests
48+
RUN_POSTGIS_TESTS: yes
49+
PGURI: postgres://postgres:postgres@localhost:5432/tegola
50+
PGURI_NO_ACCESS: postgres://tegola_no_access:postgres@localhost:5432/tegola
51+
PGSSLMODE: disable
52+
PGSSLKEY: ""
53+
PGSSLCERT: ""
54+
PGSSLROOTCERT: ""
5555

56-
# HANA tests
57-
RUN_HANA_TESTS: yes
58-
# The credentials were exposed on purpose
59-
# more information see: https://github.com/go-spatial/tegola/pull/893#discussion_r1136602372
60-
HANA_CONNECTION_STRING: "hdb://TEGOLACI:iZgd6$nOdhf@917df316-4e01-4a10-be54-eac1b6ab15fb.hana.prod-us10.hanacloud.ondemand.com:443?TLSInsecureSkipVerify&TLSServerName=host&timeout=1000&max_connections=10"
61-
run: |
62-
go test -mod vendor -covermode atomic -coverprofile=profile.cov ./...
56+
# HANA tests
57+
RUN_HANA_TESTS: yes
58+
# The credentials were exposed on purpose
59+
# more information see: https://github.com/go-spatial/tegola/pull/893#discussion_r1136602372
60+
HANA_CONNECTION_STRING: "hdb://TEGOLACI:iZgd6$nOdhf@917df316-4e01-4a10-be54-eac1b6ab15fb.hana.prod-us10.hanacloud.ondemand.com:443?TLSInsecureSkipVerify&TLSServerName=host&timeout=1000&max_connections=10"
61+
run: |
62+
go test -mod vendor -covermode atomic -coverprofile=profile.cov ./...
6363
64-
- name: Send coverage report to Coveralls
65-
env:
66-
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67-
run: |
68-
go install -mod=vendor github.com/mattn/goveralls
69-
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github
64+
- name: Send coverage report to Coveralls
65+
env:
66+
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
run: |
68+
go install -mod=vendor github.com/mattn/goveralls
69+
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github
7070
71-
- name: Build embedded UI
72-
run: |
73-
pushd ${GITHUB_WORKSPACE}/server
74-
go generate ./...
75-
popd
71+
- name: Build embedded UI
72+
run: |
73+
pushd ${GITHUB_WORKSPACE}/server
74+
go generate ./...
75+
popd
7676
77-
- name: Tear down test environment
78-
run: docker compose down
77+
- name: Tear down test environment
78+
run: docker compose down
7979

8080
govulncheck:
8181
name: Run govulncheck
82-
runs-on: ubuntu-22.04
82+
runs-on: ubuntu-22.04
8383
steps:
8484
- name: Check out code
8585
uses: actions/checkout@v4

docker-compose.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# this file is used to bootstrap services to run tegola tests against
2-
version: "3"
3-
42
services:
53
redis:
64
image: redis:6.2.6
75
container_name: redis
86
ports:
9-
- 6379:6379
7+
- 6379:6379
108

119
postgis:
1210
image: postgis/postgis:12-3.0-alpine
@@ -21,7 +19,7 @@ services:
2119
POSTGRES_PASSWORD: postgres
2220
POSTGRES_DB: postgres
2321
ports:
24-
- 5432:5432
22+
- 5432:5432
2523

2624
migration:
2725
image: postgis/postgis:12-3.0-alpine
@@ -32,14 +30,21 @@ services:
3230
environment:
3331
PGUSER: postgres
3432
PGPASSWORD: postgres
35-
command:
36-
- /bin/bash
37-
- -c
38-
- |
39-
wget "https://github.com/go-spatial/tegola-testdata/raw/master/tegola.dump"
40-
psql -h postgis -p 5432 -U postgres -d postgres -c "DROP DATABASE IF EXISTS tegola;"
41-
pg_restore -h postgis -p 5432 -U postgres -d postgres -C tegola.dump
42-
psql -h postgis -U postgres -d postgres -c "DROP ROLE IF EXISTS tegola_no_access;CREATE ROLE tegola_no_access LOGIN PASSWORD 'postgres'"
43-
rm tegola.dump
44-
33+
volumes:
34+
- ./testdata:/testdata
35+
command: ["/bin/bash", "-c", "testdata/postgis/migration.sh"]
4536

37+
# NOTE: useful for debugging
38+
# does not run by default, only when you run with:
39+
# docker-compose --profile pgadmin up (-d)
40+
# afterwards navigate to localhost:5555 in the browser
41+
pgadmin:
42+
image: dpage/pgadmin4
43+
container_name: pgadmin
44+
environment:
45+
PGADMIN_DEFAULT_EMAIL: "[email protected]"
46+
PGADMIN_DEFAULT_PASSWORD: "admin"
47+
ports:
48+
- "5555:80"
49+
profiles:
50+
- pgadmin

go.mod

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ require (
1717
github.com/go-spatial/proj v0.3.0
1818
github.com/go-test/deep v1.1.1
1919
github.com/golang/protobuf v1.5.3
20-
github.com/jackc/pgproto3/v2 v2.3.3
21-
github.com/jackc/pgtype v1.14.0
22-
github.com/jackc/pgx/v4 v4.18.2
20+
github.com/jackc/pgx-gofrs-uuid v0.0.0-20230224015001-1d428863c2e2
21+
github.com/jackc/pgx/v5 v5.7.2
2322
github.com/mattn/go-sqlite3 v1.14.22
2423
github.com/mattn/goveralls v0.0.5
2524
github.com/pborman/uuid v1.2.0
@@ -41,24 +40,22 @@ require (
4140
github.com/beorn7/perks v1.0.1 // indirect
4241
github.com/cespare/xxhash/v2 v2.3.0 // indirect
4342
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
44-
github.com/gofrs/uuid v4.0.0+incompatible // indirect
43+
github.com/gofrs/uuid/v5 v5.0.0 // indirect
4544
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
4645
github.com/google/go-cmp v0.6.0 // indirect
4746
github.com/google/uuid v1.3.0 // indirect
4847
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
4948
github.com/googleapis/gax-go/v2 v2.7.1 // indirect
5049
github.com/inconshreveable/mousetrap v1.0.0 // indirect
51-
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
52-
github.com/jackc/pgconn v1.14.3 // indirect
53-
github.com/jackc/pgio v1.0.0 // indirect
5450
github.com/jackc/pgpassfile v1.0.0 // indirect
55-
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
56-
github.com/jackc/puddle v1.3.0 // indirect
51+
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
52+
github.com/jackc/puddle/v2 v2.2.2 // indirect
5753
github.com/jmespath/go-jmespath v0.3.0 // indirect
5854
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
5955
github.com/prometheus/client_model v0.3.0 // indirect
6056
github.com/prometheus/common v0.39.0 // indirect
6157
github.com/prometheus/procfs v0.9.0 // indirect
58+
github.com/rogpeppe/go-internal v1.14.0 // indirect
6259
github.com/spf13/pflag v1.0.1 // indirect
6360
go.opencensus.io v0.24.0 // indirect
6461
go.uber.org/atomic v1.7.0 // indirect
@@ -67,9 +64,10 @@ require (
6764
golang.org/x/exp v0.0.0-20230116083435-1de6713980de // indirect
6865
golang.org/x/net v0.33.0 // indirect
6966
golang.org/x/oauth2 v0.7.0 // indirect
67+
golang.org/x/sync v0.10.0 // indirect
7068
golang.org/x/sys v0.28.0 // indirect
7169
golang.org/x/text v0.21.0 // indirect
72-
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
70+
golang.org/x/tools v0.26.0 // indirect
7371
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
7472
google.golang.org/api v0.114.0 // indirect
7573
google.golang.org/appengine v1.6.7 // indirect

0 commit comments

Comments
 (0)