Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update postgres docker to 16 #351

Merged
merged 11 commits into from
Nov 30, 2023
4 changes: 2 additions & 2 deletions postgres/lib/PostgresService.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ GROUP BY k
`)
await this.exec(`CREATE DATABASE "${creds.database}" OWNER="${creds.user}" TEMPLATE=template0`)
} catch (e) {
// Failed to reset database
// Failed to reset database
SamuelBrucksch marked this conversation as resolved.
Show resolved Hide resolved
} finally {
await this.dbc.end()
delete this.dbc
Expand All @@ -485,7 +485,7 @@ GROUP BY k
await this.tx(async tx => {
// await tx.run(`DROP USER IF EXISTS "${creds.user}"`)
await tx
.run(`CREATE USER "${creds.user}" IN GROUP "${creds.usergroup}" PASSWORD '${creds.password}'`)
.run(`CREATE USER "${creds.user}" PASSWORD '${creds.user}'`)
.catch(e => {
if (e.code === '42710') return
throw e
Expand Down
2 changes: 1 addition & 1 deletion postgres/pg-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3.1'

services:
db:
image: postgres:15-alpine
image: postgres:16-alpine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
image: postgres:16-alpine
image: postgres:alpine

Copy link
Contributor

@BobdenOs BobdenOs Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you can see in this PR it is not always compatible to take the latest version. So please keep the exact version in the PRs. To keep the builds reproducible.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally in production they latest version is still 13. So there is no rush to test using the latest and greatest version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also fine for me.
I ask myself whether we should use the "latest" version on BTP instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think that the productive Postgres version should be tested. Whether that is in additional to the latest version or instead of the latest version is both fine with me. The advantage of also testing the latest version would give a timely heads up for things breaking in the future (around 2-3 years warning period).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the documentation page for Parameters for the PostgreSQL on SAP BTP, Hyperscaler Option, the latest available version is 14. So I would think the tests should run with 14, 15 and 16.

restart: always
environment:
POSTGRES_PASSWORD: postgres
Expand Down