Merged
Conversation
the first place that terms.getDatasetVersion() was ever called on a new TermsOfUseAndAccess object.
To support Fake and Perma providers correctly in ImportDatasetCommand.
sekmiller
requested changes
Jun 26, 2023
Contributor
sekmiller
left a comment
There was a problem hiding this comment.
Looks reasonable, except that the logging still refers to alreadyExists instead of the new alreadyRegistered in most cases. Also this branch needs to be updated from Dev
sekmiller
approved these changes
Jul 5, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it: This PR has 3 commits to address three related issues uncovered in trying to use the Dataset Migration API via the DVUploader.
Which issue(s) this PR closes:
Closes #9544
Special notes for your reviewer:
Rather than adding a boolean param, there could be two methods - I just couldn't think of reasonable names - something like conflictingPIDExists() and previouslyRegisteredPIDFound() ? The problem is that, for Handle/DOI, these just return the same thing and the names still reflect that. Perhaps a rewrite to only call alreadyRegistered() if it makes sense, e.g. a if(hasRegistry()) then check alreadyRegistered()? I think that's more work than adding a param, and potentially easier to mess up, but I'm game if that's what's requested. This is something that should be fixed for 5.14 as I think DANS will want to migrate with PermaLinks.
Suggestions on how to test this:
Any call to /api/dataverses/$DATAVERSE_ID/datasets/:startmigration would test the fix for #1, #2 could be tested by going to /citation?persistentId= with a non existent PID. To test #3, one could configure to use PermaLinks and call the Dataset Migration API as in the guides or try the DVUploader with an archival bag (which would have to be created), e.g.
java -jar DVUploader-v1.2.0.jar -key=5c0332b9-c546-4e9d-a497-2f9cf668e24e -did=perma:DANSPIDFK212 -server=http://ec2-3-215-16-135.compute-1.amazonaws.com -bag=file:/c:/NetBeansProjects/dataverse-uploader/target/perma-danspidfk212v2.0.zip -createIn=rootThe latter would also test #1 and #2. For regression, probably the basic tests of create/publish datasets is enough, perhaps just with DOIs.Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Is there a release notes update needed for this change?: The fact that the Migration API is broken in 5.13 and now fixed could be put in a release note, but this problem hasn't been noticed until now. The bigger part of the PR is fixing PermaLinks which are 5.14.
Additional documentation: