Skip to content

Commit

Permalink
Upgrade to PostgreSQL 14 (#552)
Browse files Browse the repository at this point in the history
## Description

Upgrade to PostgreSQL 14.

## Why is this needed

Besides all the major improvements made from PostgreSQL 10 to 14, there is one particular feature that I wanted to use:

[A nicer way to work with JSON](https://www.postgresql.org/docs/14/datatype-json.html#JSONB-SUBSCRIPTING), like the hardware data model :-)

Fixes: #551

The sandbox MR is at tinkerbell/playground#110.

## How Has This Been Tested?

Besides the unit tests executed by CI, I've successfully tested this locally in a sandbox, and PostgreSQL 14 is now running:

```console
root@provisioner:~# docker exec -i compose-db-1 psql -U tinkerbell -A -c 'select version()'
version
PostgreSQL 14.0 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit
(1 row)
```

## How are existing users impacted? What migration steps/scripts do we need?

<!--- Fixes a bug, unblocks installation, removes a component of the stack etc -->
<!--- Requires a DB migration script, etc. -->

## Checklist:

I have:

- [ ] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
  • Loading branch information
mergify[bot] committed Nov 2, 2021
2 parents 8208713 + 6424388 commit 187a3c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func NewPostgresDatabaseClient(ctx context.Context, t *testing.T, req NewPostgre
testcontainers.SkipIfProviderIsNotHealthy(t)
postgresC, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{
ContainerRequest: testcontainers.ContainerRequest{
Image: "postgres:13.1",
Image: "postgres:14-alpine",
ExposedPorts: []string{"5432/tcp"},
WaitingFor: wait.ForLog("database system is ready to accept connections"),
Env: map[string]string{
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ services:
condition: service_healthy

db:
image: postgres:10-alpine
image: postgres:14-alpine
restart: unless-stopped
environment:
POSTGRES_DB: tinkerbell
Expand Down

0 comments on commit 187a3c7

Please sign in to comment.