Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-5201

deprecated options with defaults emit warnings when the option is not set

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 5.3.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 2
    • Not Needed
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      https://github.com/mongodb/node-mongodb-native/pull/3621 deprecated tcp keep alive options.  These options also have defaults in the URI parser.

      Our uri parsing logic works as follows:

      • once we've accumulated all provided options, we then start assigning default values
      • to do this, we iterate over all options that have defaults provided and set them on the options object
      • When we set an option, we check if the option is deprecated.  if it is, we emit a deprecation warning

       

      Consequently, even when keepAlive and keepAliveInitialDelay are unset, we emit warnings for these options.

            Assignee:
            bailey.pearson@mongodb.com Bailey Pearson
            Reporter:
            bailey.pearson@mongodb.com Bailey Pearson
            Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: