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

Test Failure - test_hello_without_speculative_authenticate_command_and_server_reply_are_not_redacted

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

      test_hello_without_speculative_authenticate_command_and_server_reply_are_not_redacted is failing on replica sets Without C Extensions RHEL 8.x:

       [2024/03/12 10:08:22.349] _ TestCommandLoggingRedactedCommands.test_hello_without_speculative_authenticate_command_and_server_reply_are_not_redacted _
       [2024/03/12 10:08:22.349] self = <test.test_command_logging.TestCommandLoggingRedactedCommands testMethod=test_hello_without_speculative_authenticate_command_and_server_reply_are_not_redacted>
       [2024/03/12 10:08:22.349]     def test_case(self):
       [2024/03/12 10:08:22.349] >       self.run_scenario(spec)
       [2024/03/12 10:08:22.349] test/unified_format.py:1854:
       [2024/03/12 10:08:22.349] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       [2024/03/12 10:08:22.349] test/unified_format.py:1801: in run_scenario
       [2024/03/12 10:08:22.349]     self._run_scenario(spec, uri)
       [2024/03/12 10:08:22.349] test/unified_format.py:1828: in _run_scenario
       [2024/03/12 10:08:22.349]     self.check_log_messages(spec["operations"], expect_log_messages)
       [2024/03/12 10:08:22.349] test/unified_format.py:1762: in check_log_messages
       [2024/03/12 10:08:22.349]     self.match_evaluator.match_result(expected_data, actual_data)
       [2024/03/12 10:08:22.349] test/unified_format.py:791: in match_result
       [2024/03/12 10:08:22.349]     return self._match_document(expectation, actual, is_root=not in_recursive_call)
       [2024/03/12 10:08:22.349] test/unified_format.py:776: in _match_document
       [2024/03/12 10:08:22.349]     if self._evaluate_if_special_operation(expectation, actual, key):
       [2024/03/12 10:08:22.349] test/unified_format.py:763: in _evaluate_if_special_operation
       [2024/03/12 10:08:22.349]     self._evaluate_special_operation(
       [2024/03/12 10:08:22.349] test/unified_format.py:728: in _evaluate_special_operation
       [2024/03/12 10:08:22.349]     method(spec, actual, key_to_compare)
       [2024/03/12 10:08:22.349] test/unified_format.py:716: in _operation_matchAsDocument
       [2024/03/12 10:08:22.349]     self._match_document(spec, json_util.loads(actual[key_to_compare]), False)
       [2024/03/12 10:08:22.349] bson/json_util.py:507: in loads
       [2024/03/12 10:08:22.349]     return json.loads(s, *args, **kwargs)
       [2024/03/12 10:08:22.349] /opt/python/3.12/lib/python3.12/json/__init__.py:359: in loads
       [2024/03/12 10:08:22.349]     return cls(**kw).decode(s)
       [2024/03/12 10:08:22.349] /opt/python/3.12/lib/python3.12/json/decoder.py:337: in decode
       [2024/03/12 10:08:22.349]     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
       [2024/03/12 10:08:22.349] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       [2024/03/12 10:08:22.349] self = <json.decoder.JSONDecoder object at 0x7fe1367a3470>
       [2024/03/12 10:08:22.349] s = '{"topologyVersion": {"processId": {"$oid": "65f089dd235e4ff7abfc5934"}, "counter": 6}, "hosts": ["localhost:27017", "... "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1710262880, "i": 23}}, "signature": {"hash": {"$binary": {"ba...'
       [2024/03/12 10:08:22.349] idx = 0
       [2024/03/12 10:08:22.349]     def raw_decode(self, s, idx=0):
       [2024/03/12 10:08:22.349]         """Decode a JSON document from ``s`` (a ``str`` beginning with
       [2024/03/12 10:08:22.349]         a JSON document) and return a 2-tuple of the Python
       [2024/03/12 10:08:22.349]         representation and the index in ``s`` where the document ended.
       [2024/03/12 10:08:22.349]         This can be used to decode a JSON document from a string that may
       [2024/03/12 10:08:22.349]         have extraneous data at the end.
       [2024/03/12 10:08:22.349]         """
       [2024/03/12 10:08:22.349]         try:
       [2024/03/12 10:08:22.350] >           obj, end = self.scan_once(s, idx)
       [2024/03/12 10:08:22.350] E           json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 998 (char 997)
       [2024/03/12 10:08:22.350] /opt/python/3.12/lib/python3.12/json/decoder.py:353: JSONDecodeError
       [2024/03/12 10:08:22.350] _ TestCommandLoggingRedactedCommands.test_legacy_hello_without_speculative_authenticate_command_and_server_reply_are_not_redacted _
       [2024/03/12 10:08:22.350] self = <test.test_command_logging.TestCommandLoggingRedactedCommands testMethod=test_legacy_hello_without_speculative_authenticate_command_and_server_reply_are_not_redacted>
       [2024/03/12 10:08:22.350]     def test_case(self):
       [2024/03/12 10:08:22.350] >       self.run_scenario(spec)
       [2024/03/12 10:08:22.350] test/unified_format.py:1854:
      

      https://evergreen.mongodb.com/task/mongo_python_driver_tests_python_version_rhel8_without_c_extensions__platform~rhel8_auth_ssl~noauth_nossl_python_version~3.12_c_extensions~without_c_extensions_coverage~coverage_test_5.0_replica_set_944bea38927e6d999076f73e297e1362c8db6242_24_03_12_16_52_27

            Assignee:
            noah.stapp@mongodb.com Noah Stapp
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: