Skip to content

Address task timeouts on VS 2015 distros due to KMS KMIP mock server #1198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 27, 2024

Conversation

eramongodb
Copy link
Contributor

Verified by this patch.

Addresses task timeouts on VS 2015 distros since 2024-07-22 due to what appears to be an incompatibility with the Python version/environment and its relation to the cryptography package as required by the KMS KMIP mock server:

Traceback (most recent call last):
  File "kms_kmip_server.py", line 6, in <module>
    from kmip.services.server import KmipServer
  File "drivers-evergreen-tools\.evergreen\csfle\kmstlsvenv\lib\site-packages\kmip\services\server\__init__.py", line 16, in <module>
    from kmip.services.server.server import KmipServer
  File "drivers-evergreen-tools\.evergreen\csfle\kmstlsvenv\lib\site-packages\kmip\services\server\server.py", line 33, in <module>
    from kmip.services.server import engine
  File "drivers-evergreen-tools\.evergreen\csfle\kmstlsvenv\lib\site-packages\kmip\services\server\engine.py", line 47, in <module>
    from kmip.services.server.crypto import engine
  File "drivers-evergreen-tools\.evergreen\csfle\kmstlsvenv\lib\site-packages\kmip\services\server\crypto\__init__.py", line 17, in <module>
    from kmip.services.server.crypto.engine import CryptographyEngine
  File "drivers-evergreen-tools\.evergreen\csfle\kmstlsvenv\lib\site-packages\kmip\services\server\crypto\engine.py", line 19, in <module>
    from cryptography import exceptions as errors
  File "drivers-evergreen-tools\.evergreen\csfle\kmstlsvenv\lib\site-packages\cryptography\exceptions.py", line 9, in <module>
    from cryptography.hazmat.bindings._rust import exceptions as rust_exceptions
ImportError: DLL load failed while importing _rust: The specified procedure could not be found.

This led to a task timeout after 1 hour (the EVG config's max timeout) due to the wait_for_kms_server function's curl command lacking a max-time argument (no response -> wait forever?).

A brief investigation into the root cause of the ImportError exception did not yield any obvious solutions or workarounds.

Accordingly, this PR applies the following changes to the EVG config and scripts:

  • Add --max-time 1 (one second) to the curl command to correctly reflect its intended usage. (The wait_for_kms_server can be updated to use --max-time 1 --retry 60 instead if preferred over the existing loop. Not yet applied due to not being entirely confident that the combination of flags is actually correct.)
  • Replace the old CXX-2628 workaround (which applied to all Windows distros; no longer applicable...?) by skipping CSFLE tests entirely on VS 2015 distros only instead.
  • Drive-by improvement: use find-ccache.sh added to C Driver in mongodb/mongo-c-driver@35f3880.

@eramongodb eramongodb requested a review from kevinAlbs August 26, 2024 18:59
@eramongodb eramongodb self-assigned this Aug 26, 2024
Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test fix is much appreciated. LGTM

@eramongodb eramongodb merged commit aa0b94c into mongodb:master Aug 27, 2024
1 check was pending
@eramongodb eramongodb deleted the cxx-evg branch August 27, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants