Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-5255

OIDC test is failing due to delayed URI parsing

    • Type: Icon: Build Failure Build Failure
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.12
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Python Drivers
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      Name of Failure:

      pymongo.errors.ConfigurationError: Unknown option: ignored. Did you mean one of...

      Link to task:

      https://spruce.mongodb.com/task/mongo_python_driver_auth_oidc_macos_test_auth_oidc_default_02fc85f63505060ba5d786b5b5c274c88b7f7a80_25_04_01_00_27_56/logs?execution=0

      Context of when and why the failure occurred:

      PYTHON-3636

      Stack trace:

       [2025/03/31 22:38:50.019] pymongo/synchronous/collection.py:1755: in find_one
       [2025/03/31 22:38:50.019]     for result in cursor.limit(-1):
       [2025/03/31 22:38:50.019] pymongo/synchronous/cursor.py:1284: in __next__
       [2025/03/31 22:38:50.019]     return self.next()
       [2025/03/31 22:38:50.019] pymongo/synchronous/cursor.py:1260: in next
       [2025/03/31 22:38:50.019]     if len(self._data) or self._refresh():
       [2025/03/31 22:38:50.019] pymongo/synchronous/cursor.py:1208: in _refresh
       [2025/03/31 22:38:50.019]     self._send_message(q)
       [2025/03/31 22:38:50.019] pymongo/synchronous/cursor.py:1102: in _send_message
       [2025/03/31 22:38:50.019]     response = client._run_operation(
       [2025/03/31 22:38:50.019] pymongo/_csot.py:119: in csot_wrapper
       [2025/03/31 22:38:50.019]     return func(self, *args, **kwargs)
       [2025/03/31 22:38:50.019] pymongo/synchronous/mongo_client.py:1880: in _run_operation
       [2025/03/31 22:38:50.019]     return self._retryable_read(
       [2025/03/31 22:38:50.019] pymongo/synchronous/mongo_client.py:1989: in _retryable_read
       [2025/03/31 22:38:50.019]     return self._retry_internal(
       [2025/03/31 22:38:50.019] pymongo/_csot.py:119: in csot_wrapper
       [2025/03/31 22:38:50.019]     return func(self, *args, **kwargs)
       [2025/03/31 22:38:50.019] pymongo/synchronous/mongo_client.py:1956: in _retry_internal
       [2025/03/31 22:38:50.019]     ).run()
       [2025/03/31 22:38:50.019] pymongo/synchronous/mongo_client.py:2692: in run
       [2025/03/31 22:38:50.019]     return self._read() if self._is_read else self._write()
       [2025/03/31 22:38:50.019] pymongo/synchronous/mongo_client.py:2827: in _read
       [2025/03/31 22:38:50.019]     self._server = self._get_server()
       [2025/03/31 22:38:50.019] pymongo/synchronous/mongo_client.py:2783: in _get_server
       [2025/03/31 22:38:50.019]     return self._client._select_server(
       [2025/03/31 22:38:50.019] pymongo/synchronous/mongo_client.py:1762: in _select_server
       [2025/03/31 22:38:50.019]     topology = self._get_topology()
       [2025/03/31 22:38:50.019] pymongo/synchronous/mongo_client.py:1700: in _get_topology
       [2025/03/31 22:38:50.019]     self._resolve_srv()
       [2025/03/31 22:38:50.019] pymongo/synchronous/mongo_client.py:894: in _resolve_srv
       [2025/03/31 22:38:50.019]     res = uri_parser._parse_srv(
       [2025/03/31 22:38:50.019] pymongo/synchronous/uri_parser.py:145: in _parse_srv
       [2025/03/31 22:38:50.019]     options.update(split_options(opts, validate, warn, normalize))
       [2025/03/31 22:38:50.019] pymongo/uri_parser_shared.py:369: in split_options
       [2025/03/31 22:38:50.019]     options = cast(_CaseInsensitiveDictionary, validate_options(options, warn))
       [2025/03/31 22:38:50.019] pymongo/uri_parser_shared.py:328: in validate_options
       [2025/03/31 22:38:50.019]     return get_validated_options(opts, warn)
       [2025/03/31 22:38:50.019] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       [2025/03/31 22:38:50.019]     def get_validated_options(
       [2025/03/31 22:38:50.019]         options: Mapping[str, Any], warn: bool = True
       [2025/03/31 22:38:50.019]     ) -> MutableMapping[str, Any]:
       [2025/03/31 22:38:50.019]         """Validate each entry in options and raise a warning if it is not valid.
       [2025/03/31 22:38:50.019]         Returns a copy of options with invalid entries removed.
       [2025/03/31 22:38:50.019]         :param opts: A dict containing MongoDB URI options.
       [2025/03/31 22:38:50.019]         :param warn: If ``True`` then warnings will be logged and
       [2025/03/31 22:38:50.019]               invalid options will be ignored. Otherwise, invalid options will
       [2025/03/31 22:38:50.019]               cause errors.
       [2025/03/31 22:38:50.019]         """
       [2025/03/31 22:38:50.019]         validated_options: MutableMapping[str, Any]
       [2025/03/31 22:38:50.019]         if isinstance(options, _CaseInsensitiveDictionary):
       [2025/03/31 22:38:50.019]             validated_options = _CaseInsensitiveDictionary()
       [2025/03/31 22:38:50.019]             def get_normed_key(x: str) -> str:
       [2025/03/31 22:38:50.019]                 return x
       [2025/03/31 22:38:50.019]             def get_setter_key(x: str) -> str:
       [2025/03/31 22:38:50.019]                 return options.cased_key(x)
       [2025/03/31 22:38:50.019]         else:
       [2025/03/31 22:38:50.019]             validated_options = {}
       [2025/03/31 22:38:50.019]             def get_normed_key(x: str) -> str:
       [2025/03/31 22:38:50.019]                 return x.lower()
       [2025/03/31 22:38:50.019]             def get_setter_key(x: str) -> str:
       [2025/03/31 22:38:50.019]                 return x
       [2025/03/31 22:38:50.019]         for opt, value in options.items():
       [2025/03/31 22:38:50.019]             normed_key = get_normed_key(opt)
       [2025/03/31 22:38:50.019]             try:
       [2025/03/31 22:38:50.019]                 validator = _get_validator(opt, URI_OPTIONS_VALIDATOR_MAP, normed_key=normed_key)
       [2025/03/31 22:38:50.019]                 validated = validator(opt, value)
       [2025/03/31 22:38:50.019]             except (ValueError, TypeError, ConfigurationError) as exc:
       [2025/03/31 22:38:50.019]                 if (
       [2025/03/31 22:38:50.019]                     normed_key == "authmechanismproperties"
       [2025/03/31 22:38:50.019]                     and any(p in str(exc) for p in _MECH_PROP_MUST_RAISE)
       [2025/03/31 22:38:50.019]                     and "is not a supported auth mechanism property" not in str(exc)
       [2025/03/31 22:38:50.019]                 ):
       [2025/03/31 22:38:50.019]                     raise
       [2025/03/31 22:38:50.019]                 if warn:
       [2025/03/31 22:38:50.019] >                   warnings.warn(str(exc), stacklevel=2)
       [2025/03/31 22:38:50.019] E                   UserWarning: Unknown option: ignored. Did you mean one of (tlsinsecure, minpoolsize, retryreads) or maybe a camelCase version of one? Refer to docstring.
       [2025/03/31 22:38:50.019] pymongo/common.py:891: UserWarning
       [2025/03/31 22:38:50.019] =============================== warnings summary ===============================
      

       

       

            Assignee:
            steve.silvester@mongodb.com Steve Silvester
            Reporter:
            steve.silvester@mongodb.com Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: