-
Notifications
You must be signed in to change notification settings - Fork 491
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
Fix bug related to returnDatasetFieldTypes in Dataverses.listMetadataBlocks endpoint #10985
base: develop
Are you sure you want to change the base?
Conversation
📦 Pushed preview images as
🚢 See on GHCR. Use by referencing with full name as printed above, mind the registry name. |
As expected https://jenkins.dataverse.org/job/IQSS-Dataverse-Develop-PR/job/PR-10985/1/testReport/edu.harvard.iq.dataverse.api/DataversesIT/testListMetadataBlocks/ failed with this:
This is because the "fields" object is empty:
|
…k root in findAllInMetadataBlockAndDataverse
There are failing tests at https://jenkins.dataverse.org/job/IQSS-Dataverse-Develop-PR/job/PR-10985/5/testReport/ but they are expected. The tests are:
The fix is coming in this PR: There are failing tests from GitHub Actions from maven_unit_test.yml: The fix is coming in this PR: |
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.
Because I created this pull request (just adding a test and a FIXME), I can't approve it in GitHub but I would if I could!
I moved it to "ready for QA" at least.
What this PR does / why we need it:
We should be checking for inheritance of metadata blocks from parent collection to child collection.
Which issue(s) this PR closes:
Special notes for your reviewer:
@pdurbin started this pull request but @GPortas added the actual fix.
We were attempting to retrieve the metadata block fields for the requested dataverse without verifying whether isMetadataBlockRoot was set to true. See https://github.com/IQSS/dataverse/pull/10985/files#diff-171c256be8744ca0742a9570ed33a3e335eae0544d08be04545ef31fdd5328d1. Consequently, when accessing a dataverse that inherits from the root, we couldn't find a relationship with the desired metadata block, as that relationship with the block exists in the parent, not the child dataverse.
We have fixed this to always get the fields from the parent collection when isMetadataBlockRoot is false.
Suggestions on how to test this:
Make sure Jenkins reports all test passing.
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?:
No. In practice, this only affects the SPA, which is still in development.
Additional documentation:
None.