From 59cb58a646844f6fba00bfadc39b4bea96357358 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Mon, 2 Mar 2026 19:37:08 +0000 Subject: all: update PostgreSQL version to 14 Update Docker configurations and documentation to use PostgreSQL 14, aligning local development and testing environments with production. There has been a change in how PostgreSQL 14 tokenizes paths. This has caused an alteration in how multi word searches are resolved. Update test case to reflect this. See golang/go#78036 for more context. To test: `tests/search/run.sh` Fixes golang/go#77903 Change-Id: I28eaa722914b2163fe962a1b4a1b8681d60b18b3 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/750740 Auto-Submit: Ethan Lee LUCI-TryBot-Result: Go LUCI Reviewed-by: Hyang-Ah Hana Kim kokoro-CI: kokoro --- devtools/docker/compose.yaml | 2 +- devtools/docker_postgres.sh | 2 +- doc/postgres.md | 2 +- tests/screentest/run.sh | 2 +- tests/search/scripts/symbolsearch.txt | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/devtools/docker/compose.yaml b/devtools/docker/compose.yaml index 6bfb8fd7..99bbd57b 100644 --- a/devtools/docker/compose.yaml +++ b/devtools/docker/compose.yaml @@ -100,7 +100,7 @@ services: - gomodcache:/gomodcache working_dir: /pkgsite db: - image: postgres:11.12 + image: postgres:14 environment: <<: *database-variables LANG: C diff --git a/devtools/docker_postgres.sh b/devtools/docker_postgres.sh index f75c7598..aa9b1671 100755 --- a/devtools/docker_postgres.sh +++ b/devtools/docker_postgres.sh @@ -9,4 +9,4 @@ docker run -d -p 5432:5432 --name local-postgres \ -e POSTGRES_DB=${GO_DISCOVERY_DATABASE_NAME:-discovery-db} \ -e POSTGRES_USER=${GO_DISCOVERY_DATABASE_USER:-postgres} \ -e POSTGRES_PASSWORD=${GO_DISCOVERY_DATABASE_PASSWORD:-postgres} \ - postgres:11.12 + postgres:14 diff --git a/doc/postgres.md b/doc/postgres.md index ffb9d71f..232b6a1a 100644 --- a/doc/postgres.md +++ b/doc/postgres.md @@ -8,7 +8,7 @@ For additional information on our architecture, see the ## Local development database -1. Install PostgreSQL (version 11 or higher) on your machine for local +1. Install PostgreSQL (version 14 or higher) on your machine for local development. It should use the default Postgres port of 5432. If you use a Mac, the easiest way to do that is through installing diff --git a/tests/screentest/run.sh b/tests/screentest/run.sh index 6d9d595e..6481e974 100755 --- a/tests/screentest/run.sh +++ b/tests/screentest/run.sh @@ -211,7 +211,7 @@ run_locally() { -e LANG=C \ -p $postgres_port:$postgres_port \ --rm \ - postgres:11.12 + postgres:14 wait_for $postgres_port # Postgres can take some time to start up even after it is listening to the port. runcmd sleep 4 diff --git a/tests/search/scripts/symbolsearch.txt b/tests/search/scripts/symbolsearch.txt index 316a17f8..e869cca0 100644 --- a/tests/search/scripts/symbolsearch.txt +++ b/tests/search/scripts/symbolsearch.txt @@ -63,6 +63,6 @@ FOO github.com/julieqiu/api-demo FoO github.com/julieqiu/api-demo Foo github.com/julieqiu/api-demo -Multi-word three word search -[symbol] bee cmd command -Command github.com/beego/bee/cmd/commands +Multi-word search +[symbol] context cancelfunc +CancelFunc context -- cgit v1.3