Deprecation notice for moving session implementation to internal package

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 2.7.0
    • Affects Version/s: None
    • Component/s: Sessions
    • None
    • Fully Compatible
    • Go Drivers
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      Currently, the internal session implementation is located in /x/mongo/driver/session, which is technically accessible to users despite being experimental. According to the MongoDB Driver Sessions Specification, ServerSession (our session.Client) is explicitly described as "an implementation detail and does not need to be public."

      The public mongo.Session type correctly implements the spec-required ClientSession interface, but the underlying implementation should be moved to an internal package to prevent accidental user dependencies on internal session state (e.g. HELP-58664).

      Definition of done

      See here for deprecation examples: https://docs.google.com/document/d/1rtqAVdI6Xf3rJnLj82YD2ZRBFshlTh1E6n-nv7k0wVo/edit?tab=t.0

      MoveĀ  /x/mongo/driver/session/ to /internal/session/

      Pitfalls

      • Users who import go.mongodb.org/mongo-driver/v2/x/mongo/driver/session will get compile errors
      • Advanced users creating driver.Operation{Client: *session.Client} manually will lose access to session.Client
      • Large refactor touching many files increases merge conflict risk

            Assignee:
            Matt Dale
            Reporter:
            Preston Vasquez
            Preston Vasquez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: