Skip to content

Commit

Permalink
Use postgres 14 (#773)
Browse files Browse the repository at this point in the history
* 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 <kathleen.tuite@gmail.com>
  • Loading branch information
lognaturel and ktuite committed Mar 8, 2023
1 parent da0926d commit 05ebccd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/soak-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

This comment has been minimized.

Copy link
@sadiqkhoja

sadiqkhoja Mar 9, 2023

Contributor

+1


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.

Expand Down

0 comments on commit 05ebccd

Please sign in to comment.