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

Please make require_optional for kerberos go away...

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Not Needed

      require_optional is super sketchy… https://github.com/mongodb-js/mongodb-core/blob/master/lib/utils.js#L4

      I'm pretty sure at this point that how its being used with kerberos is the root cause of debugging an issue that has had me chasing my tail for the past 4 days.

      I now have a feeling it is also the root cause of a similar but distinct issue durran.jordan has just started chasing his tail on.

      require_optional creates a non-deterministic state that makes debugging far more complicated than it should be.

      For example, Durran is trying to confirm a Kerberos bug has been fixed in Compass. He expects his dependency updates for kerberos/driver to just work. But in his initial smoke testing, confusion abounds... The Kerberos module isn’t loading for me in Electron on Windows, but works fine in the Node REPL and no errors during the npm install. There are several likely causes of this underlying issue; electron ABI compatibility not being ensured in the build scripts, a dependency error resulting in Kerberos just not being included, etc.

      A simple console.warn would save a lot of time and frustration here... An environment variable or anything to tell the driver I expect you to be able to require kerberos here and if you cannot please die hard with a useful error message.

            Assignee:
            Unassigned Unassigned
            Reporter:
            lucas.hrabovsky Lucas Hrabovsky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: