Update JS driver to GraphBinary4#3312
Open
kirill-stepanishin wants to merge 3 commits intoapache:masterfrom
Open
Update JS driver to GraphBinary4#3312kirill-stepanishin wants to merge 3 commits intoapache:masterfrom
kirill-stepanishin wants to merge 3 commits intoapache:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3312 +/- ##
============================================
- Coverage 77.87% 75.83% -2.04%
+ Complexity 13578 13283 -295
============================================
Files 1015 1020 +5
Lines 59308 59873 +565
Branches 6835 7037 +202
============================================
- Hits 46184 45403 -781
- Misses 10817 11812 +995
- Partials 2307 2658 +351 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Cole-Greer
reviewed
Mar 3, 2026
...t/src/main/javascript/gremlin-javascript/lib/structure/io/binary/internals/ByteSerializer.js
Show resolved
Hide resolved
Cole-Greer
reviewed
Mar 4, 2026
...vascript/src/main/javascript/gremlin-javascript/test/unit/graphbinary/type-detection-test.js
Outdated
Show resolved
Hide resolved
Cole-Greer
reviewed
Mar 4, 2026
gremlin-javascript/src/main/javascript/gremlin-javascript/test/unit/graphbinary/model.js
Show resolved
Hide resolved
Contributor
|
I left some new comments which I think are worth considering but non-blocking. Overall LGTM |
cbf19aa to
9510739
Compare
9510739 to
5402938
Compare
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.
Update JS driver to GraphBinary v4
Migrates the gremlin-javascript GraphBinary serialization layer from v1 to v4 and replaces the test suite.
Serializer changes
Removed serializer files: Traverser, P, TextP, Lambda, TraversalStrategy, BulkSet, OffsetDateTime, LongSerializerNg
Removed DataType constants (had serializer implementations): Traverser (0x21), P (0x1e), TextP (0x28), Lambda (0x1d), TraversalStrategy (0x29), BulkSet (0x2a), Timestamp (0x05), Class (0x06), Barrier (0x13), Binding (0x14), Bytecode (0x15), Cardinality (0x16), Column (0x17), Operator (0x19), Order (0x1a), Pick (0x1b), Pop (0x1c), Scope (0x1f), OffsetDateTime (0x88)
Removed DataType constants (no serializer implementations existed): Metrics (0x2c), TraversalMetrics (0x2d), Merge (0x2e), DT (0x2f), GType (0x30), InetAddress (0x82), Instant (0x83), LocalDate (0x84), LocalDateTime (0x85), LocalTime (0x86), MonthDay (0x87), OffsetTime (0x89), Period (0x8a), Year (0x8b), YearMonth (0x8c), ZonedDateTime (0x8d), ZoneOffset (0x8e), Custom (0x00)
Added: Marker (0xfd), StubSerializer for Tree (0x2b), Graph (0x10), CompositePDT (0xf0), PrimitivePDT (0xf1)
Renamed: ByteBufferSerializer → BinarySerializer (0x25),
DATEconstant →DATETIME(same code 0x04)Replaced: DateSerializer and OffsetDateTimeSerializer both removed, replaced by new DateTimeSerializer (0x04) with component format (year/month/day/nanos/offset — 18 bytes) instead of epoch millis
Modified:
Test rewrite
Replaced per-serializer tests with a model-based approach:
model.js/model-test.js— validates.gbinreference files with three modes:run(byte-exact),runWriteRead(double round-trip idempotency),runRead(deserialize-only)error-cases-test.js— malformed input cases consolidated from old per-serializer teststype-detection-test.js— AnySerializer dispatch, canBeUsedFor, number routing boundaries, round-trip extrasnull-handling-test.js— null/undefined per type in both fully-qualified and bare formatsNote: GraphBinaryReader and GraphBinaryWriter are not updated in this PR. They will be migrated to the v4 message framing format in a future PR, as they depend on other changes.