-
Notifications
You must be signed in to change notification settings - Fork 85
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
Create vivo/home on application start-up #192
Conversation
- Add logic for untarring vivo-home Related to: https://jira.lyrasis.org/browse/VIVO-1443
* Prioritize without the prefix Related to: https://jira.lyrasis.org/browse/VIVO-1443
* This allows for deployment in both Tomcat and Jetty Related to: https://jira.lyrasis.org/browse/VIVO-1443
Properties include: - vitro/home - vitro/appName - vitro/rootUserAddress - vitro/defaultNamespace Related to: https://jira.lyrasis.org/browse/VIVO-1443
* Upgrade Jena version to 3.16.0 (vivo-project#196) Related to: https://jira.lyrasis.org/browse/VIVO-1943 * remove example-settings.xml * update home directory untar non-destructive * checksum digest to retain modified files * compare checksum from digest with existing file * overwrite files that have not changed * add command to manually generate checksum digest * simplify parsing checksum digest using pattern Co-authored-by: Andrew Woods <awoods@lyrasis.org> Co-authored-by: Andrew Woods <awoods@duraspace.org>
@wwelling Testing out the new digest logic. Seems like
I think this is the expected behavior, though it is a reversal (fix?) of the prevailing pattern in VIVO where if you mvn install'd it would overwrite the file in vivo-home, regardless if it had been updated. Can we avoid deploying all the unchanged files, too? I.e., only execute the deploy logic if vivo-home has changed between two subsequent starts? Is that tracked in digest.md or would it require a second checksum? |
@gneissone, can you be more specific with your expected behavior? I am not exactly sure I understand what you would like with the suggestion:
|
It seems superfluous for VIVO to overwrite files in vivo home if they are exactly the same between the tar'd up home and the vivo home as it was in the previous startup. I can tell they are being overwritten because the 'Date Modified' date changes on every startup. |
@gneissone the digest is the original checksums of the untarred home directory after the first startup. In subsequent startups, the files are untarred and first checked to see if they already exist in the home directory. If they do, it checks to see if the digest checksum matches the checksum of the current file in the home directory. This is essentially determining if the file in the home directory has changed since the last time the digest was generated. If we do not want to overwrite with a newly untarred file that already exists in the home directory and has not changed, we would have to do another checksum comparison between the newly untarred file and the existing file. We do not currently do this check and just assume to overwrite. We do already perform the checksum and could easily add this logic. It would be the exact same results just without new timestamps. |
I will update PR shortly to not overwrite file with exact same file. Otherwise, @gneissone was there anything else not working as expected or not doing something is should? |
* Upgrade Jena version to 3.16.0 (vivo-project#196) Related to: https://jira.lyrasis.org/browse/VIVO-1943 * remove example-settings.xml * update home directory untar non-destructive * checksum digest to retain modified files * compare checksum from digest with existing file * overwrite files that have not changed * add command to manually generate checksum digest * simplify parsing checksum digest using pattern * do not overwrite file if same as already exists Co-authored-by: Andrew Woods <awoods@lyrasis.org> Co-authored-by: Andrew Woods <awoods@duraspace.org>
We will want to squash the commits in this PR when merging into |
Tested latest iteration and it works as expected. A couple small requests to the log behavior: awoods#4 |
See details on related PR: vivo-project/VIVO#197
Related to: https://jira.lyrasis.org/browse/VIVO-1443
Interested parties
@VIVO-project/vivo-committers