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
8 changes: 7 additions & 1 deletion .evergreen/config.yml
Expand Up @@ -51,6 +51,11 @@ functions:
export PROJECT_DIRECTORY=$(cygpath -m $PROJECT_DIRECTORY)
fi

# 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.


export MONGO_ORCHESTRATION_HOME="$DRIVERS_TOOLS/.evergreen/orchestration"
export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
export UPLOAD_BUCKET="${project}"
Expand All @@ -71,9 +76,10 @@ functions:
export UPLOAD_BUCKET="$UPLOAD_BUCKET"
export PROJECT_DIRECTORY="$PROJECT_DIRECTORY"
export TMPDIR="$MONGO_ORCHESTRATION_HOME/db"
export PATH="$MONGODB_BINARIES:$PATH"
export PATH="$MONGODB_BINARIES:$HOME/.cargo/bin:$PATH"
export PROJECT="${project}"
export ASYNC_TEST_TIMEOUT=30
export CARGO_NET_GIT_FETCH_WITH_CLI=true
EOT
# See what we've done
cat expansion.yml
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/run-tox.sh
Expand Up @@ -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.

TOX_BINARY=tox
fi

Expand Down