feat(fingerprint): take OS into account - #7674
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Extends OSRM’s dataset fingerprinting to include an ABI descriptor (operating system, endianness, pointer width) so that .osrm.* datasets prepared on a different platform are rejected with a clear incompatibility error, addressing #4404.
Changes:
- Add OS/endianness/pointer-size fields to
util::FingerPrint, bumping the fingerprint magic to force incompatibility with older datasets. - Treat ABI mismatches as data incompatibility and surface a descriptive error message in both
storage::ioandstorage::tarreaders. - Add unit tests validating ABI compatibility logic, stringification, and that IO/TAR readers reject foreign-ABI fingerprints.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
include/util/fingerprint.hpp |
Adds ABI descriptor enums/fields and new accessor APIs; updates fingerprint size assertion. |
src/util/fingerprint.cpp |
Implements OS/endianness detection, ABI comparison, and updates fingerprint magic/version behavior. |
include/storage/io.hpp |
Emits a dedicated, descriptive incompatibility error when ABI differs. |
include/storage/tar.hpp |
Same ABI-mismatch error handling for tar-based datasets. |
unit_tests/util/fingerprint.cpp |
New tests covering ABI compatibility semantics and reader rejection behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Unknown = 0, | ||
| Linux = 1, | ||
| Windows = 2, | ||
| macOS = 3, |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7674 +/- ##
==========================================
+ Coverage 93.83% 94.17% +0.34%
==========================================
Files 484 485 +1
Lines 41371 37845 -3526
==========================================
- Hits 38820 35642 -3178
+ Misses 2551 2203 -348 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
implements #4404