Conversation
|
@tuannx thanks for the PR! We'll discuss it at Triage Tuesday and get back to you! 😄 |
08252d7 to
5152e19
Compare
|
[ERROR] Failures: Solr index: Remote error message: ERROR: [doc=dataset_4_draft] Error adding field 'geolocation'='ENVELOPE(-71.0,-70.0,42.001000,42.001001)' |
There was a problem hiding this comment.
🟡 Changes recommended
Add aggregation regression coverage and assert BAD_REQUEST explicitly in the integration test.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR fixes geographic bounding-box precision loss using BigDecimal, with regression tests and release notes.
Changes:
- Updates validation and bounding-box aggregation precision.
- Adds unit and REST integration coverage.
- Documents the fix in release notes.
File summaries
| File | Summary |
|---|---|
src/test/java/edu/harvard/iq/dataverse/DatasetFieldValueValidatorTest.java |
Tests high-precision validation cases. |
src/test/java/edu/harvard/iq/dataverse/api/DatasetsIT.java |
Adds REST regression coverage. |
src/main/java/edu/harvard/iq/dataverse/search/IndexServiceBean.java |
Uses precise bounding-box aggregation. |
src/main/java/edu/harvard/iq/dataverse/DatasetFieldValueValidator.java |
Uses BigDecimal coordinate validation. |
doc/release-notes/11559-bbox-bigdecimal.md |
Documents the fix. |
Review details
Suppressed comments (1)
src/test/java/edu/harvard/iq/dataverse/api/DatasetsIT.java:7555
- Allowing
FORBIDDENhere can let this regression test pass for an authorization/setup failure instead of proving that metadata validation rejected the reversed coordinates. This user just created the dataverse and the invalid payload should produceBAD_REQUEST, so assert that status explicitly.
.statusCode(anyOf(equalTo(BAD_REQUEST.getStatusCode()), equalTo(FORBIDDEN.getStatusCode())))
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
What this PR does / why we need it:
testGeographicBoundingBoxHighPrecisionValidationinDatasetsIT) exercising the bounding box precision bug The validateBoundingBox method fails with values having more than 5 decimal places. #11559.DatasetFieldValueValidatorby parsing and comparing bounding box coordinates withBigDecimal.IndexServiceBeanto useBigDecimal.DatasetFieldValueValidatorTestcovering high-precision edge cases.doc/release-notes/11559-bbox-bigdecimal.md.Which issue(s) this PR closes:
Special notes for your reviewer:
This PR includes both the REST Assured reproduction test in
DatasetsITand theBigDecimalprecision fix inDatasetFieldValueValidator/IndexServiceBean.Suggestions on how to test this:
mvn test -Dtest=DatasetFieldValueValidatorTestmvn test -Dtest=DatasetsIT#testGeographicBoundingBoxHighPrecisionValidationDoes this PR introduce a user interface change?: No
Is there a release notes update needed for this change?: Yes (included)