Skip to content

Conversation

@Anemy
Copy link
Member

@Anemy Anemy commented Dec 1, 2025

MONGOSH-2486

Adds the LegacyCSharpUUID, LegacyJavaUUID, and LegacyPythonUUID helpers to our shell bson package. We aren't adding a print for the subtype 3, as it could be any of them, so they are printed as Binary.createFromBase64(VALUE, 3).

Added in devtools-shared in mongodb-js/devtools-shared#594

Copilot AI review requested due to automatic review settings December 1, 2025 19:53
@Anemy Anemy requested a review from a team as a code owner December 1, 2025 19:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds three new legacy UUID helper functions (LegacyJavaUUID, LegacyCSharpUUID, and LegacyPythonUUID) to the shell-bson package for handling legacy UUID formats with BSON subtype 3. Each helper implements language-specific byte-swapping logic to match how Java, C#, and Python historically encoded UUIDs.

Key changes:

  • Implementation of three legacy UUID helpers with language-specific byte ordering
  • Comprehensive test coverage for each helper including byte-swapping verification
  • E2E tests confirming the helpers print as Binary.createFromBase64() with subtype 3

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
packages/shell-bson/src/shell-bson.ts Adds type definitions and implementations for the three legacy UUID helper functions
packages/shell-bson/src/shell-bson.spec.ts Adds comprehensive unit tests for each legacy UUID helper and comparison tests
packages/e2e-tests/test/e2e-bson.spec.ts Adds e2e tests for legacy UUID printing behavior and updates existing UUID test

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Anemy Anemy merged commit a1990e1 into main Dec 2, 2025
153 of 155 checks passed
@Anemy Anemy deleted the MONGOSH-2486-add-legacy-uuid-support branch December 2, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants