-
Notifications
You must be signed in to change notification settings - Fork 492
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
4980 upgrades across versions #5317
Conversation
… (and checking in the first scripts, for the 4.9* versions). (#4980)
[PG_HOST] is the server running PostgresQL used by your Dataverse | ||
[PG_PORT] the port on the PostgresQL server | ||
[PG_DB] the name of the PostgresQL database used by your Dataverse | ||
[PG_USER] the name of the PostgresQL user used by your Dataverse |
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.
Sorry to nitpick, but the proper capitalization is PostgreSQL.
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 keep forgetting that, yes.
v4.9.1 | ||
v4.9.2 | ||
v4.9.3 | ||
v4.9.4 |
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 long list of releases reminds me of doc/sphinx-guides/source/versions.rst and I wonder if there's an opportunity to consolidate these or have the rst file be build from the txt file?
scripts/database/upgrade.sh
Outdated
|
||
echo "ok" | ||
else | ||
echo "(there is no database upgrade script for version ${version}...)" |
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'm a little concerned that no one but @landreev will know how to create create_v4.10.sql or create_v5.0.sql or whatever. It would be great to have something in doc/sphinx-guides/source/developers/making-releases.rst describing the process for making new database upgrade scripts. I assume the process is manual right now.
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 brought this up before, on slack:
(and I will add it to the "making releases" section in the dev guide)
There will also be a procedure for saving the auto-generated database create script, and adding it to the branch, for every release.
It'll be very straightforward; since it needs to happen when a release is finalized, it'll be one of the last steps on the release checklist. Then we take the <GLASSFISH_ROOT>/domains/domain1/generated/ejb/dataverse/dataverse_VDCNet-ejbPU_createDDL.jdbc file on a node where the release candidate is deployed, and save it as scripts/database/create_vN.M.K.sql in the github tree.
(or that has been my idea... if anyone has objections/different ideas - please share; here or in the issue 4980)
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.
@landreev sounds good. Thanks.
|
||
The script, upgrade.sh, must be run in this directory, as follows: | ||
|
||
./upgrade.sh [VERSION_1] [VERSION_2] [PG_HOST] [PG_PORT] [PG_DB] [PG_USER] |
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.
How will users get upgrade.sh? By cloning the git repo for now? Some day it might be nice to make it downloadable from the guides like we do with clear_timer.sh from http://guides.dataverse.org/en/4.9.4/admin/troubleshooting.html or ec2-create-instance.sh from http://guides.dataverse.org/en/4.9.4/developers/deployment.html
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 think you can use a github raw url for direct downloads.
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.
The target audience for this script definitely is advanced Dataverse admins. Let's assume that figuring out how to obtain the script is an "exercise for the reader", purposefully left there in order to weed out those who have no business trying to run this script. :)
[PG_HOST] is the server running PostgresQL used by your Dataverse | ||
[PG_PORT] the port on the PostgresQL server | ||
[PG_DB] the name of the PostgresQL database used by your Dataverse | ||
[PG_USER] the name of the PostgresQL user used by your Dataverse |
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.
From reading (vs testing), it looks like PG_USER does not need administrative access to the database (just to PG_DB). If this is inaccurate, it might be worth clarifying.
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 say down below "just copy the values from your domain.xml and you'll be fine" - so it should probably be ok?
New Contributors
Welcome! New contributors should at least glance at CONTRIBUTING.md, especially the section on pull requests where we encourage you to reach out to other developers before you start coding. Also, please note that we measure code coverage and prefer you write unit tests. Pull requests can still be reviewed without tests or completion of the checklist outlined below. Thanks!
Related Issues
Pull Request Checklist