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

support Postgres versions 14 and 15 #9877

Merged
merged 6 commits into from
Sep 8, 2023
Merged

support Postgres versions 14 and 15 #9877

merged 6 commits into from
Sep 8, 2023

Conversation

donsizemore
Copy link
Contributor

@donsizemore donsizemore commented Sep 5, 2023

What this PR does / why we need it:

add flyway and installer support for Postgres versions 14 and 15

Which issue(s) this PR closes:

Special notes for your reviewer:

None

Suggestions on how to test this:

Install Dataverse using installer and warfile built from branch, run E2E tests.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

No

Is there a release notes update needed for this change?:

Perhaps, to explain the support (but not requirement) of the newer Postgres versions.

Additional documentation:

Added: https://dataverse-guide--9877.org.readthedocs.build/en/9877/installation/prerequisites.html#postgresql

@github-actions

This comment has been minimized.

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

I didn't test the installer but I tested in Docker. Looks good. Approved. Thanks, Don!

@pdurbin
Copy link
Member

pdurbin commented Sep 5, 2023

This is what I wrote in Slack on Friday:

To summarize, @don and I created https://github.com/gdcc/api-test-runner/actions/workflows/postgres15.yml and containerized Postgres 15 is working fine, (somewhat surprisingly) even without the "GRANT ALL ON SCHEMA public TO "+pgUser+" he added to install.py (our Docker images don’t use the installer).

The version being tested in that container is PostgreSQL 15.4 (Debian 15.4-1.pgdg120+1).

So yeah, I think we should be open to an issue and PR. His change to the installer is specific to PG 15:

if int(pg_major_version) >= 15:
   conn_cmd = "GRANT ALL ON SCHEMA public TO "+pgUser+";"

Thanks or all the legwork, Don!

Also, I looked at the docs at https://guides.dataverse.org/en/5.14/installation/prerequisites.html and we already say, "We recommend installing the latest version that is available for your OS distribution." So this PR is in line with that. All the examples use Postgres 13 and we say, "The application has been tested with PostgreSQL versions up to 13." We can change the examples when we actually are ready to move developers, test infra, and prod to Postgres 13.

@kcondon
Copy link
Contributor

kcondon commented Sep 6, 2023

Found an issue when installing on postgres 13:
Installer exits with: Is this correct? [y/n] y
performing database setup
Admin database connectivity succeeds.
PostgreSQL version: 13
Looks like the user already exists. Continuing.
Couldn't grant privileges on schema public to dvnapp

@github-actions

This comment has been minimized.

@donsizemore
Copy link
Contributor Author

Found an issue when installing on postgres 13: Installer exits with: Is this correct? [y/n] y performing database setup Admin database connectivity succeeds. PostgreSQL version: 13 Looks like the user already exists. Continuing. Couldn't grant privileges on schema public to dvnapp

Fixed (sorry).

@pdurbin
Copy link
Member

pdurbin commented Sep 7, 2023

@donsizemore the fact that API tests are passing as of the second run is great: https://jenkins.dataverse.org/job/IQSS-Dataverse-Develop-PR/job/PR-9877/2/testReport/

My understanding is that PG 13 is being used for that test.

What about a test for PG 15? Would you be able to set up a dedicated Jenkins job for that? If we can get that to pass, I'm comfortable merging this.

For the release note, I'm thinking of something along these lines:

"PostgreSQL 13 remains the tested and supported version. However, the installer and Flyway have been upgraded to support PostgreSQL 14 and 15. See PR #9877 for details."

@github-actions

This comment has been minimized.

@pdurbin pdurbin self-assigned this Sep 7, 2023
@github-actions

This comment has been minimized.

@github-actions
Copy link

github-actions bot commented Sep 7, 2023

📦 Pushed preview images as

ghcr.io/gdcc/dataverse:9717-postgres-15
ghcr.io/gdcc/configbaker:9717-postgres-15

🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name.

@kcondon
Copy link
Contributor

kcondon commented Sep 8, 2023

This looks good to me.

Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

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

Looks good to me too.

@pdurbin pdurbin removed their assignment Sep 8, 2023
@kcondon kcondon self-assigned this Sep 8, 2023
@kcondon kcondon merged commit 104166a into develop Sep 8, 2023
@kcondon kcondon deleted the 9717_postgres_15 branch September 8, 2023 16:39
@pdurbin pdurbin added this to the 6.0 milestone Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Postgres 15: permissions errors on public schema
3 participants