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

4980 upgrades across versions #5317

Merged
merged 14 commits into from
Nov 27, 2018
Merged

4980 upgrades across versions #5317

merged 14 commits into from
Nov 27, 2018

Conversation

landreev
Copy link
Contributor

@landreev landreev commented Nov 15, 2018

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

@coveralls
Copy link

coveralls commented Nov 15, 2018

Coverage Status

Coverage remained the same at 16.215% when pulling f44c62b on 4980-upgrades-across-versions into 1e470bf on develop.

[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
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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?


echo "ok"
else
echo "(there is no database upgrade script for version ${version}...)"
Copy link
Member

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.

Copy link
Contributor Author

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)

Copy link
Member

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]
Copy link
Member

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

Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Contributor Author

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?

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.

5 participants