From 05ebccdea1736240ceafa929399d25920c7bdb2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9l=C3=A8ne=20Martin?= Date: Tue, 7 Mar 2023 19:12:16 -0800 Subject: [PATCH] Use postgres 14 (#773) * Use postgres 14 * Make run-docker-postgres in makefile use postgres 14 * Update postgres image in soak test * Update link to trigram concept in api docs to postgres14 --------- Co-authored-by: Kathleen Tuite --- .circleci/config.yml | 2 +- .github/workflows/soak-test.yml | 2 +- Makefile | 6 +++--- docs/api.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index db23157cf..f29a2630d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ jobs: build: docker: - image: cimg/node:16.19.1 - - image: cimg/postgres:9.6 + - image: cimg/postgres:14.6 environment: POSTGRES_PASSWORD: odktest diff --git a/.github/workflows/soak-test.yml b/.github/workflows/soak-test.yml index 1e01ff780..c3d15e8a2 100644 --- a/.github/workflows/soak-test.yml +++ b/.github/workflows/soak-test.yml @@ -12,7 +12,7 @@ jobs: services: # see: https://docs.github.com/en/enterprise-server@3.5/actions/using-containerized-services/creating-postgresql-service-containers postgres: - image: postgres:9.6 + image: postgres:14.6 env: POSTGRES_PASSWORD: odktest ports: diff --git a/Makefile b/Makefile index ad340b59b..5f4c4723d 100644 --- a/Makefile +++ b/Makefile @@ -52,15 +52,15 @@ lint: node_version .PHONY: run-docker-postgres run-docker-postgres: stop-docker-postgres - docker start odk-postgres || (docker run -d --name odk-postgres -p 5432:5432 -e POSTGRES_PASSWORD=odktest postgres:9.6 && sleep 5 && node lib/bin/create-docker-databases.js) + docker start odk-postgres14 || (docker run -d --name odk-postgres14 -p 5432:5432 -e POSTGRES_PASSWORD=odktest postgres:14.6 && sleep 5 && node lib/bin/create-docker-databases.js) .PHONY: stop-docker-postgres stop-docker-postgres: - docker stop odk-postgres || true + docker stop odk-postgres14 || true .PHONY: rm-docker-postgres rm-docker-postgres: stop-docker-postgres - docker rm odk-postgres || true + docker rm odk-postgres14 || true .PHONY: check-file-headers check-file-headers: diff --git a/docs/api.md b/docs/api.md index 974ba5c79..028eeb5cf 100644 --- a/docs/api.md +++ b/docs/api.md @@ -469,7 +469,7 @@ Presently, it is possible to create and list `User`s in the system, as well as t Currently, there are no paging or filtering options, so listing `User`s will get you every User in the system, every time. -Optionally, a `q` querystring parameter may be provided to filter the returned users by any given string. The search is performed via a [trigram similarity index](https://www.postgresql.org/docs/9.6/pgtrgm.html) over both the Email and Display Name fields, and results are ordered by match score, best matches first. Note that short search terms (less than 4 or 5 characters) may not return any results. Try a longer search if nothing is appearing. +Optionally, a `q` querystring parameter may be provided to filter the returned users by any given string. The search is performed via a [trigram similarity index](https://www.postgresql.org/docs/14/pgtrgm.html) over both the Email and Display Name fields, and results are ordered by match score, best matches first. Note that short search terms (less than 4 or 5 characters) may not return any results. Try a longer search if nothing is appearing. If a `q` parameter is given, and it exactly matches an email address that exists in the system, that user's details will always be returned, even for actors who cannot `user.list`. The request must still authenticate as a valid Actor. This allows non-Administrators to choose a user for an action (eg grant rights) without allowing full search.