Skip to content

Added Dataset.getGlobalIdForFileStorage for direct upload URLs that support legacy lowercase DOIs#12268

Merged
stevenwinship merged 5 commits into
IQSS:developfrom
janvanmansum:direct-upload-to-mixed-case-pids
Apr 8, 2026
Merged

Added Dataset.getGlobalIdForFileStorage for direct upload URLs that support legacy lowercase DOIs#12268
stevenwinship merged 5 commits into
IQSS:developfrom
janvanmansum:direct-upload-to-mixed-case-pids

Conversation

@janvanmansum

@janvanmansum janvanmansum commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
Adds Dataset.getGlobalIdForFileStorage() and uses it in the calls to s3io.generateTemporaryS3UploadUrls() instead of Dataset.getGlobalId().toString(). When Dataverse contains datasets with DOIs which were added before Dataverse started enforcing uppercase DOIs, the upload URLs didn't match the actually keys in the object store for those datasets, causing direct upload to fail at the "completion" step (with multi-part uploads, not sure if single part uploads failed). This changed fixes the problem.

Which issue(s) this PR closes:
N/a

Special notes for your reviewer:
I have tested this with new datasets (all uppercase DOIs) and with legacy DOIs from our system, which contain lowercase letters. Both work. I have only been able to test through the API, although the UI-code has also been updated.

Suggestions on how to test this:
(Jim:) Minimally, one could edit the db to set a dataset identifier to lower/mixed case. (Not sure if using a lower case shoulder still results in a lowercase entry in the db.) One could also find/configure a dataset with an alternate identifier and configure it for use in file storage. In either case, direct uploads via the UI should work. Same for the API but in that case one could also inspect the results of the /api/datasets/{id}/uploadurls call and verify that the case used in the abort and complete URLs match the URLs for parts w.r.t. case.

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?:
See: https://github.com/IQSS/dataverse/pull/12268/changes#diff-3187604c28e828f652f43814550e9271409b81a62db28527c71fdd3c08cf9344

Additional documentation:
N/a

…the original casing, so it does not uppercase

DOIs. It is called when generating the upload URLs for direct upload instead of using dataset.getGlobalId().asString().
The latter gave a mismatch between the complete URL and the actual object keys in object store when DOIs contained
lowercase letters (which is possible when they were created before Dataverse started enforcing uppercase DOIs).
@janvanmansum janvanmansum changed the title Added Dataset.getGlobalIdForFileStorage which gives the global ID in … Added Dataset.getGlobalIdForFileStorage for direct upload URLs that support legacy lowercase DOIs Mar 31, 2026
@janvanmansum
janvanmansum marked this pull request as ready for review March 31, 2026 12:47
Clarified the issue addressed with S3 direct upload regarding PID authority and alternative identifiers.

@qqmyers qqmyers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. Note that DANS tested this on DOIs using lowercase from their early migrations.

Comment thread src/main/java/edu/harvard/iq/dataverse/api/Datasets.java Outdated
Comment thread src/main/java/edu/harvard/iq/dataverse/Dataset.java Outdated
@qqmyers qqmyers moved this from Ready for QA ⏩ to Ready for Triage in IQSS Dataverse Project Mar 31, 2026
@github-project-automation github-project-automation Bot moved this to Ready for QA ⏩ in IQSS Dataverse Project Mar 31, 2026
@qqmyers qqmyers added Size: 3 A percentage of a sprint. 2.1 hours. GDCC: DANS related to GDCC work for DANS labels Mar 31, 2026
@qqmyers qqmyers added this to the 6.11 milestone Mar 31, 2026
@scolapasta scolapasta moved this from Ready for Triage to Ready for Review ⏩ in IQSS Dataverse Project Mar 31, 2026
@qqmyers qqmyers self-assigned this Mar 31, 2026
@qqmyers qqmyers moved this from Ready for Review ⏩ to In Review 🔎 in IQSS Dataverse Project Mar 31, 2026
…FileStorageAsString() to clarify that it does not return a GlobalId object

@qqmyers qqmyers left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

reapproving after change

@github-project-automation github-project-automation Bot moved this from In Review 🔎 to Ready for QA ⏩ in IQSS Dataverse Project Apr 1, 2026
@qqmyers qqmyers removed their assignment Apr 6, 2026
@stevenwinship stevenwinship self-assigned this Apr 6, 2026
@stevenwinship stevenwinship moved this from Ready for QA ⏩ to QA ✅ in IQSS Dataverse Project Apr 6, 2026
@cmbz cmbz added the FY26 Sprint 20 FY26 Sprint 20 (2026-03-26 - 2026-04-08) label Apr 8, 2026
@stevenwinship
stevenwinship merged commit 512e97f into IQSS:develop Apr 8, 2026
14 checks passed
@github-project-automation github-project-automation Bot moved this from QA ✅ to Merged 🚀 in IQSS Dataverse Project Apr 8, 2026
@stevenwinship

Copy link
Copy Markdown
Contributor

tested develop and this branch. get upload urls and"abort" upload. Was able to see the errors in develop branch and verify that this fix worked. I wasn't able to test "complete"

@stevenwinship stevenwinship removed their assignment Apr 8, 2026
@cmbz cmbz added the FY26 Sprint 21 FY26 Sprint 21 (2026-04-08 - 2026-04-22) label Apr 8, 2026
@scolapasta scolapasta moved this from Merged 🚀 to Done 🧹 in IQSS Dataverse Project Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 20 FY26 Sprint 20 (2026-03-26 - 2026-04-08) FY26 Sprint 21 FY26 Sprint 21 (2026-04-08 - 2026-04-22) GDCC: DANS related to GDCC work for DANS Size: 3 A percentage of a sprint. 2.1 hours.

Projects

Status: Done 🧹

Development

Successfully merging this pull request may close these issues.

5 participants