[DRIVERS-2743] Resolve errors starting mock KMS servers with Python 3.12 Created: 04/Oct/23  Updated: 04/Oct/23

Status: Needs Triage
Project: Drivers
Component/s: Evergreen Tools
Fix Version/s: None

Type: Task Priority: Unknown
Reporter: Kevin Albertson Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Driver Changes: Not Needed

 Description   

Summary

Resolve failures to start mock KMS servers with Python 3.12

Motivation

Test failures are reported by multiple driver teams starting the mock KMIP server. Example failures in Node and Java include the tracebacks:

Traceback (most recent call last):
  File "/data/mci/874b423f0400c073b8557a88f0546518/drivers-evergreen-tools/.evergreen/csfle/kms_kmip_server.py", line 52, in <module>
    main()
  File "/data/mci/874b423f0400c073b8557a88f0546518/drivers-evergreen-tools/.evergreen/csfle/kms_kmip_server.py", line 46, in main
    with server:
  File "/data/mci/874b423f0400c073b8557a88f0546518/drivers-evergreen-tools/.evergreen/csfle/kmstlsvenv/lib/python3.12/site-packages/kmip/services/server/server.py", line 475, in __enter__
    self.start()
  File "/data/mci/874b423f0400c073b8557a88f0546518/drivers-evergreen-tools/.evergreen/csfle/kmstlsvenv/lib/python3.12/site-packages/kmip/services/server/server.py", line 290, in start
    self._socket = ssl.wrap_socket(
                   ^^^^^^^^^^^^^^^

Python 3.12 removed ssl.wrap_socket:

> Remove the ssl.wrap_socket() function

PyKMIP uses ssl.wrap_socket(). kms_http_common.py uses ssl.wrap_socket()
 

Who is the affected end user?

DBX engineers.

How does this affect the end user?

Causes test failures.

How likely is it that this problem or use case will occur?

Certain.

If the problem does occur, what are the consequences and how severe are they?

Tests fail.

Is this issue urgent?

Somewhat. A workaround was applied to skip Python 3.12. But I expect future Python version updates will cause the failures again.

Is this ticket required by a downstream team?

No,

Is this ticket only for tests?

Yes.

Acceptance Criteria

Remove the skip of Python 3.12 added in https://github.com/mongodb-labs/drivers-evergreen-tools/pull/359



 Comments   
Comment by Githook User [ 04/Oct/23 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: DRIVERS-2743 skip Python 3.12 (#359)
Branch: master
https://github.com/mongodb-labs/drivers-evergreen-tools/commit/9df8705a01fceff85168cf1cdf43ddc933842328

Comment by Steve Silvester [ 04/Oct/23 ]

I created a draft PR to PyKMIP: https://github.com/OpenKMIP/PyKMIP/pull/707

Generated at Thu Feb 08 08:26:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.