diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2021-11-24 13:25:39 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2021-11-24 13:25:39 +0300 |
commit | 518670d57d1a6527aaf46b5b9bf5cb00f2e8f11b (patch) | |
tree | 69542647ab4c7a7a1f3e9f0612fe282abbaf6b50 | |
parent | 2bb4f2314215873901f008ca8520370a117fff41 (diff) | |
parent | ff35680a672c0e7d3cf8a6756b4ae2ce3159106d (diff) |
Merge branch 'pks-test-postgres-11' into 'master'
ci: Add job testing against minimum Postgres version
See merge request gitlab-org/gitaly!4129
-rw-r--r-- | .gitlab-ci.yml | 14 | ||||
-rw-r--r-- | internal/praefect/datastore/postgres.go | 4 |
2 files changed, 10 insertions, 8 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cfe49d78c..3eff79849 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -134,11 +134,9 @@ build: # These definitions are for the non-default Git versions. #- GO_VERSION: [ "1.16", "1.17" ] # GIT_VERSION: [ ] - # RUBY_VERSION: [ "2.7" ] # These definitions are for the default Git version where we want to # apply our default set of Git patches. - GO_VERSION: [ "1.16", "1.17" ] - RUBY_VERSION: [ "2.7" ] binaries: <<: *cache_definition @@ -187,8 +185,13 @@ test: # apply our default set of Git patches. - GO_VERSION: [ "1.16", "1.17" ] TARGET: test - - GO_VERSION: "1.17" - TARGET: [ test-with-proxies, test-with-praefect, race-go ] + - TARGET: [ test-with-proxies, test-with-praefect, race-go ] + # Execute tests with our minimum required Postgres version, as well. If + # the minimum version changes, please change this to the new minimum + # version. Furthermore, please make sure to update the minimum required + # version in `datastore.CheckPostgresVersion()`. + - POSTGRES_VERSION: "11.14-alpine" + TARGET: [ test, test-with-praefect ] nightly:git: <<: *test_definition @@ -199,8 +202,7 @@ nightly:git: - make all ${TARGET} parallel: matrix: - - GO_VERSION: "1.17" - GIT_VERSION: [ "master", "next" ] + - GIT_VERSION: [ "master", "next" ] TARGET: [ test, test-with-proxies, test-with-praefect ] rules: - if: '$CI_PIPELINE_SOURCE == "schedule"' diff --git a/internal/praefect/datastore/postgres.go b/internal/praefect/datastore/postgres.go index 6fcbd718f..3b4cdd035 100644 --- a/internal/praefect/datastore/postgres.go +++ b/internal/praefect/datastore/postgres.go @@ -32,8 +32,8 @@ func CheckPostgresVersion(db *sql.DB) error { return fmt.Errorf("get postgres server version: %v", err) } - const minimumServerVersion = 90600 // Postgres 9.6 - if serverVersion < minimumServerVersion { + // The minimum required Postgres server version is v11.0. + if serverVersion < 11_00_00 { return fmt.Errorf("postgres server version too old: %d", serverVersion) } |