Update dependency org.restheart:restheart to v8.12.0 #8891
Merged
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.
This PR contains the following updates:
8.11.0->8.12.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
SoftInstigate/restheart (org.restheart:restheart)
v8.12.0Compare Source
RESTHeart 8.12.0 Release Notes
Release Date: November 24, 2025
Overview
RESTHeart 8.12.0 includes important bug fixes for MongoDB 8.0.16+ compatibility, HAL response serialization, query cache functionality, and dependency updates for improved security and performance.
🐛 Bug Fixes
MongoDB 8.0.16+ Transaction Compatibility
Issue: Karate integration test
sessions.feature:40failing with MongoDB 8.0.16+ due to changed transaction error message format.Root Cause: MongoDB 8.0.16 introduced SERVER-91503 which changed transaction error messages to include session ID information for better debugging. The new format
"1 on session <uuid> - <hash> - - using txnRetryCounter 0"was not recognized by RESTHeart's transaction number extraction logic, causingNumberFormatException.Fix: Updated
TxnsUtils.removeWithTxnNumber()to detect and parse the MongoDB 8.0.16+ error format while maintaining full backward compatibility with all previous MongoDB versions (5.x, 6.x, 7.x, 8.0.0-8.0.15).Files Changed:
mongodb/src/main/java/org/restheart/mongodb/db/sessions/TxnsUtils.javamongodb/src/test/java/org/restheart/mongodb/db/sessions/TxnsUtilsTest.javaRelated:
HAL Response Empty String Serialization (Issue #578)
Issue: Empty string fields in MongoDB documents were inconsistently returned as
nullin HAL (Hypertext Application Language) format responses instead of their actual empty string value"".Root Cause: The
BsonUtils.toJson()method left trailing whitespace when serializing BSON string values. MongoDB's JSON serialization produces formatted output like{"x" : ""}with spaces around the colon. After removing the structural JSON characters, a leading space remained (" ""), causing empty strings to be misrepresented.Fix: Added
.strip()call inBsonUtils.toJson()method (line 760) to remove leading and trailing whitespace from the final string representation.Impact:
Files Changed:
commons/src/main/java/org/restheart/utils/BsonUtils.javacommons/src/test/java/org/restheart/utils/BsonUtilsTest.javaRelated: GitHub Issue #578
Query Cache Not Working (Issue #575)
Issue: The
?cachequery parameter was not working correctly after MongoDB driver updates, causing performance degradation for repeated queries.Fix: Refactored
Collections.javaandGetCollectionCache.javato properly handle collection caching with the updated MongoDB driver internals. Added comprehensive integration tests inMongoDriverInternalsIT.javato verify cache functionality.Files Changed:
mongodb/src/main/java/org/restheart/mongodb/db/Collections.javamongodb/src/main/java/org/restheart/mongodb/db/GetCollectionCache.javatest-integration/src/test/java/org/restheart/test/integration/MongoDriverInternalsIT.javaRelated: GitHub Issue #575
🔧 Improvements
Enhanced Whitespace Handling
Refactored
PingServiceandMetricsServiceto replacetrim()withstrip()for improved whitespace handling, consistent with modern Java best practices and Unicode support.Files Changed:
core/src/main/java/org/restheart/handlers/PingService.javametrics/src/main/java/org/restheart/metrics/MetricsService.javaCode Quality Improvements
📦 Dependency Updates
3.9.2(security and performance improvements)1.5.21(latest stable release with bug fixes)🧪 Testing
New Test Coverage
testToJsonEmptyString()andtestToJsonDocumentWithEmptyString()inBsonUtilsTest(23 total tests)testRemoveWithTxnNumberMongo8()inTxnsUtilsTest(5 total tests)MongoDriverInternalsITfor cache functionalityTest Results
✅ All 149 tests pass across all modules:
🔄 Backward Compatibility
MongoDB Transaction Format Support
RESTHeart 8.12.0 maintains full backward compatibility with all MongoDB transaction error formats:
with txnNumber 10with { txnNumber: 10 }with txnNumberAndRetryCounter { txnNumber: 10, txnRetryCounter: 0 }1 using txnRetryCounter 01 on session <uuid> - <hash> - - using txnRetryCounter 0📋 Upgrade Notes
This is a recommended update for all users, especially those:
No configuration changes or data migration required.
🔗 Links
Full Changelog: SoftInstigate/restheart@8.11.0...8.12.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.