Skip to content
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

MOTOR-1095 Make Rust Compiler available for Cryptography build #194

Merged
merged 13 commits into from
Feb 15, 2023

Conversation

blink1073
Copy link
Member

No description provided.

@@ -39,7 +39,7 @@ if [ "${INSTALL_TOX}" = "true" ]; then
source motorenv/Scripts/activate
fi
set -o xtrace
pip install tox>=3.18
pip install "tox>=3.18,<4"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why make this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

[2023/02/14 17:07:14.554] tornado6-py38: failed with env name tornado6-py38 conflicting with base python c:\python\Python38\python.exe
 [2023/02/14 17:07:14.561]   tornado6-py38: FAIL code 1 (0.02 seconds)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, does tox 4.0+ not support Python 3.8?

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me try removing it again, tox 4 came out in December, we most likely would have seen this before now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, it appears to be a case sensitivity issue on Windows: Python3.8 ~= python 3.8 in our basepython config.

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe this was caused by tox-dev/tox#2824, which was released on 5 Jan and first started affecting our waterfall on 11 Jan.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, separating the py37 and synchro envs allows it to work.

# Installation of cryptography requires a rust compiler on some machines
curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path
export PATH="$HOME/.cargo/bin:$PATH"
rustup toolchain install nightly -c rustc
Copy link
Member

Choose a reason for hiding this comment

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

Can we use the existing rust toolchain like we do in PyMongo instead of installing it? See https://github.com/mongodb/mongo-python-driver/blob/a4c90ae157ffcb1d4a073ceeb9177400126ad871/.evergreen/config.yml#L77-L78

Copy link
Member Author

Choose a reason for hiding this comment

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

There was no /home/admin, nor /home/ubuntu/.cargo on the host, so I followed what is done in bson-rust.

Copy link
Member

Choose a reason for hiding this comment

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

Okay then SGTM.

Copy link
Member

@ShaneHarvey ShaneHarvey left a comment

Choose a reason for hiding this comment

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

LGTM, could you open a ticket for this new synchro failure:

 [2023/02/15 03:25:48.583] ERROR: Failure: AttributeError (module 'test.test_typing' has no attribute '/data/mci/fe8df805654ae951594d8b1dfb2f6ea9/src/.tox/synchro37/tmp/mongo-python-driver/test/mypy_fails/insert_many_dict.py')
 [2023/02/15 03:25:48.583] ----------------------------------------------------------------------
 [2023/02/15 03:25:48.583] Traceback (most recent call last):
 [2023/02/15 03:25:48.583]   File "/data/mci/fe8df805654ae951594d8b1dfb2f6ea9/src/.tox/synchro37/lib/python3.7/site-packages/nose/failure.py", line 39, in runTest
 [2023/02/15 03:25:48.583]     raise self.exc_val.with_traceback(self.tb)
 [2023/02/15 03:25:48.583]   File "/data/mci/fe8df805654ae951594d8b1dfb2f6ea9/src/.tox/synchro37/lib/python3.7/site-packages/nose/loader.py", line 255, in generate
 [2023/02/15 03:25:48.583]     test_func = getattr(m, test_func)
 [2023/02/15 03:25:48.583] AttributeError: module 'test.test_typing' has no attribute '/data/mci/fe8df805654ae951594d8b1dfb2f6ea9/src/.tox/synchro37/tmp/mongo-python-driver/test/mypy_fails/insert_many_dict.py'

https://spruce.mongodb.com/task/motor_main__ssl~nossl_tox_env~synchro37_os~ubuntu_18_test_3.6_standalone_patch_8d5a8bc85b81e0682f720430fadd451d178d8958_63ec4ac73066154587d9eba0_23_02_15_03_00_24/tests?execution=0&sortBy=STATUS&sortDir=ASC

@blink1073
Copy link
Member Author

@blink1073 blink1073 merged commit 7c2f259 into mongodb:master Feb 15, 2023
@blink1073 blink1073 deleted the MOTOR-1095 branch February 15, 2023 20:15
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