Skip to content

CDRIVER-4519 Replace activate_venv.sh with new hygienic scripts #1155

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 4 commits into from
Dec 5, 2022

Conversation

eramongodb
Copy link
Contributor

@eramongodb eramongodb commented Dec 1, 2022

Description

This PR resolves CDRIVER-4519. Verified by this patch.

The proposed changes are a straightforward substitution of the old activate_venv.sh scripts for kmstslvenv and authawsvenv with the exception of Python selection behavior on Windows.

CDRIVER-4530 was created in response to issues with default cipher suite incompatibilities on Windows due to use of Python 3.10. A crude but simple workaround was applied that explicitly uses Python 3.9 (windows-2017) or Python 3.8 (windows-2015) instead, as addressing the root problem (upgrading certificates to use a better signature algorithm) required an unexpectedly significant amount of effort. See CDRIVER-4530 for more info.

@eramongodb eramongodb self-assigned this Dec 1, 2022
Copy link
Contributor

@vector-of-bool vector-of-bool left a comment

Choose a reason for hiding this comment

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

LGTM, but one question about using py.

# TODO: remove this function along with the "run kms servers" function.
. ./activate_venv.sh
deactivate
if [[ "$OSTYPE" =~ cygwin && ! -d kmstlsvenv ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you tried using the py launcher to select a specific version? I believe it is installed with Windows Python by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TIL, I was not aware of the py launcher. It seems like it is available on all the Windows distros we currently use (only exception is windows-2022 which we do not currently use). However, given the purpose here is simply to behave as a distro-specific workaround, I do not think there is an advantage to using py here. It might be worth considering for the find-python3.sh DET script.

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.

3 participants