Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-6393

Investigate changes in NODE-4892: Add versioning to bson type classes and assert version in serialize and stringify

    • Type: Icon: Investigation Investigation
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • Not Needed

      Use Case

      As a node engineer
      I want to ensure BSON input types are from the same version as the serializer/stringifier using them
      So that there are no unexpected errors or silent serialization issues caused by the mixing of bson versions

      User Impact

      • BSON v5 serializer and stringify will throw if given types from a BSON version that is not v5

      Unknowns

      • Will we ship this?

      Acceptance Criteria

      Implementation Requirements

      • Add Symbol.for('@@mdb.bson.version') property to all bson type classes and set it to 5
      • Validate that if a bsontype is detected it has the version number set as expected

      Testing Requirements

      • Test that types without a version property throw errors
      • Test that type with a version property serialize as expected

      Documentation Requirements

      • Migration guide will have a section on the explicity incompatibility and what the expected support is (all 5.x.x versions work with each other)

      Follow Up Requirements

      • Release an alpha with this change and follow up with downstream teams.

            Assignee:
            Unassigned Unassigned
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: