-
Notifications
You must be signed in to change notification settings - Fork 8
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
deps: update postgres docker tag to v16 #72
Conversation
07c5e3c
to
c76d926
Compare
c76d926
to
ebf3539
Compare
8dbb660
to
49fa1ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break any existing local databases as PostgreSQL cannot read the data directory of previous major versions. I want to add documentation for manual migration of the database before merging this, so I'm blocking it for now.
I think a good solution to this migration problem would be to rather create a set of test data and include the necessary scripts to automatically seed the compose database with this. It would also help in E2E testing, if we want to go there at some point. |
That would be useful but I have lots of scan results for custom tests in my local database that I do not want lose and it's probably the same for others. |
It works mostly like this, but I'm having some troubles with the Dump the database from Postgres 14: pg_dump -Fc -v -d postgres://postgres:postgres@localhost:5433/ort_server -f mydumpfile.bak Bring the Compose environment down and destroy the volumes to reset the database: docker compose down -v Update the postgres image to 16 in docker compose up -d Restore the database from the dump to the updated Postgres: pg_restore --clean -v -d postgres://postgres:postgres@localhost:5433/ort_server mydumpfile.bak |
Keycloak seems to use pg_dump -Fc -v -d -n ort_server postgres://postgres:postgres@localhost:5433/ort_server -f mydumpfile.bak |
...though then the permissions etc won't migrate, so it doesn't work that way. |
49fa1ec
to
0df4bc6
Compare
Added the migration guide to this PR.
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
@mmurto I have added a commit with a migration guide using basically the commands you provided, I have only changed them to run |
When upgrading the PostgreSQL version in the Docker Compose setup, the database data directory must be manually | ||
migrated by following these steps: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be a single line according to conventions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was not yet migrated to use one sentence per line so I wanted to keep it consistent.
README.md
Outdated
- Make a backup of the ORT Server and Keycloak databases: | ||
|
||
```shell | ||
docker compose exec postgres pg_dump -Fc -U postgres -d ort_server -n public > keycloak.dump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side remark: IMO it's a bit weird that Keycloak does not use a more speaking schema than "public".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that as well but didn't want to change it as part of this PR.
Add a migration guide for PostgreSQL major version updates in the Docker Compose environment. Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.com>
0df4bc6
to
dc09be6
Compare
Should we create a |
Restructuring of the documentation will happen as part of rendering it as a website, similar to how it's done for ORT. I want to start working on that soon, in the meantime you could provide feedback to #256 if you want. |
This PR contains the following updates:
14
->16
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.