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

bump to Postgres 17, Flyway 10.19, allows earlier versions of PostgreSQL #10912

Merged
merged 10 commits into from
Nov 6, 2024

Conversation

donsizemore
Copy link
Contributor

@donsizemore donsizemore commented Oct 8, 2024

What this PR does / why we need it:

Bumps Postgres to version 17 and Flyway to version 10.19. The Flyway version change is significant, as version 10 removes the requirement that users purchase licenses to use older/non-supported versions of Postgres.

Which issue(s) this PR closes:

Special notes for your reviewer:

None

Suggestions on how to test this:

Standard test suite run.

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?:

Might be nice to note the removal of the Flyway restriction? Don't want to encourage older versions, tho.

Additional documentation:

None

@coveralls
Copy link

coveralls commented Oct 8, 2024

Coverage Status

coverage: 21.224%. remained the same
when pulling d1f9970 on uncch-rdmc:10889_bump_PG17_FlyWay10
into 6a00ce5 on IQSS:develop.

@poikilotherm
Copy link
Contributor

@donsizemore IIRC you needed to add a Postgres Package for Flyway with 10.x. Is this no longer true?

@donsizemore
Copy link
Contributor Author

@poikilotherm I thought that was this? https://github.com/IQSS/dataverse/pull/10912/files#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8R182
End-to-end tests passed on develop.

@pdurbin pdurbin added the Type: Feature a feature request label Oct 9, 2024
@pdurbin pdurbin added the Size: 10 A percentage of a sprint. 7 hours. label Oct 10, 2024
@pdurbin pdurbin changed the title #10889 bump to Postgres 17, Flyway 10.19 bump to Postgres 17, Flyway 10.19, allows earlier versions of PostgreSQL Oct 10, 2024
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.

Looking great overall. I left a couple comments.

@cmbz cmbz added the FY25 Sprint 8 FY25 Sprint 8 (2024-10-09 - 2024-10-23) label Oct 15, 2024
@donsizemore donsizemore removed their assignment Oct 16, 2024
@cmbz cmbz added the FY25 Sprint 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) label Oct 23, 2024
@pdurbin
Copy link
Member

pdurbin commented Oct 31, 2024

As a sanity check, I went to https://github.com/gdcc/dataverse-ansible/blob/51587e7231ffca474ad2b751f2e4508f7f9f8c7d/tests/group_vars/jenkins.yml#L277 which is the latest, to see that we're still going to test with Postgres 13. That's great because we still say "PostgreSQL 13 is recommended because it’s the version we test against" as of this PR at https://dataverse-guide--10912.org.readthedocs.build/en/10912/installation/prerequisites.html#postgresql

The docs seem fine and accurate as-is.

This PR will have the effect of upgrading the Docker images to Postgres 17. I'll go add a suggestion to the release notes about that. It will mean the Docker images will be out of step with the classic installation. This is probably ok as the Docker image is already at 16 (psql (16.3 (Debian 16.3-1.pgdg120+1)) as of this writing) while the classic instructions for production suggest using 13 and for dev suggest using 13 as well.

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.

A new suggestion.


While we don't encourage the use of older Postgres versions, this flexibility may benefit some of our long-standing installations in their upgrade paths. Postgres 13 remains the version used with automated testing.

As part of this update, the containerized development environment now uses Postgres 17 instead of 16. Worst case, developers can start with a fresh database, if necessary.
Copy link
Member

@pdurbin pdurbin Nov 1, 2024

Choose a reason for hiding this comment

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

I was curious what would happen if I do the following:

  • Spin up containers on the develop branch (dev compose file), let Dataverse configure itself
  • Stop containers (don't delete data)
  • Switch to this branch
  • Spin up containers

I got these errors:

dev_dataverse> 2024-11-01T19:06:18Z INF [TCP] Checking the postgres:5432 ...
dev_dataverse> 2024-11-01T19:06:18Z ERR Expectation failed error="failed to establish a tcp connection, caused by: dial tcp: lookup postgres on 127.0.0.11:53: no such host"

Next I'll try blowing the data away.

Time passes...

Yes, that worked fine. I rm -rf'd docker-dev-volumes and everything spun up fine.

I think we need to tell developers they need to blow away their data. I'll add a suggestion to the release note (and when the time comes, we should email the dev list).

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'm pretty sure developers need to blow away their database, so I added a suggestion to the release note for that.

I also tested the demo use case (spin up a new demo env) and it worked fine. PG 17 is correctly used:

pdurbin@beamish dataverse % docker exec -it postgres bash
root@postgres:/# export PGPASSWORD=secret
root@postgres:/# psql -h localhost -U dataverse dataverse
psql (17.0 (Debian 17.0-1.pgdg120+1))

describe zapping database in Docker environment

Co-authored-by: Philip Durbin <philip_durbin@harvard.edu>
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.

@pdurbin pdurbin removed their assignment Nov 5, 2024
@ofahimIQSS ofahimIQSS self-assigned this Nov 6, 2024
@ofahimIQSS
Copy link
Contributor

Performed regression testing on Internal. No issues uncovered - Merging PR.

postgres.mov

@ofahimIQSS ofahimIQSS merged commit 62d6aa6 into IQSS:develop Nov 6, 2024
10 checks passed
@ofahimIQSS ofahimIQSS removed their assignment Nov 6, 2024
@pdurbin pdurbin added this to the 6.5 milestone Nov 6, 2024
@pdurbin
Copy link
Member

pdurbin commented Nov 7, 2024

I'm pretty sure developers need to blow away their database

I sent a note about this: https://groups.google.com/g/dataverse-dev/c/ffoNj5UXyzU/m/nE5oGY_sAQAJ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 8 FY25 Sprint 8 (2024-10-09 - 2024-10-23) FY25 Sprint 9 FY25 Sprint 9 (2024-10-23 - 2024-11-06) Size: 10 A percentage of a sprint. 7 hours. Type: Feature a feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support Postgres 17
6 participants