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

Prevent NPE in MyData when all dataverses are harvested dataverses #11086

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

plecor
Copy link
Contributor

@plecor plecor commented Dec 11, 2024

What this PR does / why we need it:
As discussed in #11083, MyData was checking for empty results and then filtering against harvested dataverses, producing a NullPointerException later on when all the results are harvested dataverses.

This moves the empty results check after filtering against harvested dataverses, resulting in a 'Sorry, no results were found." API response instead of the previous server error.

Which issue(s) this PR closes:
This improves #11083 but does not close it (non-harvested datasets in harvested dataverses are still filtered).

Special notes for your reviewer:
See the issue for steps to reproduce.

Suggestions on how to test this:

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No interface change

Is there a release notes update needed for this change?:
This could be mentioned (see snippet) but has no major impact.

Additional documentation:

I updated the IT test with some extra use cases. I'm not actually testing the harvested dataverse case as I am not sure if the expected result is truly the same as the current result.

Bug mentioned at https://dataverse-guide--11086.org.readthedocs.build/en/11086/api/native-api.html#mydata

@coveralls
Copy link

coveralls commented Dec 11, 2024

Coverage Status

coverage: 22.571%. remained the same
when pulling 40a2080 on plecor:11083-mydata-npe-with-harvested-dataverses
into a4d0127 on IQSS:develop.

@pdurbin pdurbin added Type: Bug a defect Size: 3 A percentage of a sprint. 2.1 hours. labels Dec 11, 2024
@pdurbin
Copy link
Member

pdurbin commented Dec 11, 2024

@plecor thanks for the PR! ❤️ We'll talk about it soon in a bug triage meeting. I went ahead and threw a small size (3) on it.

testDeleteFile is failing but please don't worry about that. It's unrelated and we plan to fix it in #11081.

@plecor plecor force-pushed the 11083-mydata-npe-with-harvested-dataverses branch from 6bddf8c to 40a2080 Compare December 12, 2024 17:02
@cmbz cmbz added the FY25 Sprint 12 FY25 Sprint 12 (2024-12-04 - 2024-12-18) label Dec 17, 2024
@sekmiller sekmiller self-assigned this Dec 18, 2024
@sekmiller
Copy link
Contributor

Hi @plecor, Thanks for this PR. We have recently released version 6.5 of the Dataverse Software so please update your branch so that it will be ready for QA. Thanks again. (I am in the process of reviewing your submission, but it is likely that we won't be able to merge it until early in the coming year.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 12 FY25 Sprint 12 (2024-12-04 - 2024-12-18) Size: 3 A percentage of a sprint. 2.1 hours. Type: Bug a defect
Projects
Status: In Review 🔎
Development

Successfully merging this pull request may close these issues.

5 participants