Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-3434

Revert options pattern for ClientOptions

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • 2.0.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Go Drivers

      Background: We received the following feedback from Dennis Kuczynski on the Cloud Automation team:

      Consider options.{type}Builder.Build() or Merge() for easy access to underlying options

      Slack discussion:

      Go Driver team discussion:

      • PV: Just need to export this function: https://github.com/mongodb/mongo-go-driver/blob/master/mongo/options/lister.go#L15
      • PV: Best solution might be reverting options pattern specifically for ClientOptions, deferring to the original v1 pattern.
      • This particular issue has been coming up a lot. We originally decided to change this since maintenance was expensive.
      • Try to build a test that uses reflection to tell us we made a bug when merging structs.

      Bottom line: We need to figure out what to do with this pattern and testing out whether we can use a test to prevent bugs (scope is ClientOptions not other options).

            Assignee:
            preston.vasquez@mongodb.com Preston Vasquez
            Reporter:
            julia.tazin@mongodb.com Julia Tazin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: