Skip to content

RUST-2219 Cherrypick domain name parsing fix into 3.2.x #1404

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 11 commits into from
Jun 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed .evergreen/MSRV-Cargo.toml.diff
Empty file.
2 changes: 1 addition & 1 deletion .evergreen/check-clippy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o errexit
source ./.evergreen/env.sh

# Pin clippy to the latest version. This should be updated when new versions of Rust are released.
CLIPPY_VERSION=1.83.0
CLIPPY_VERSION=1.85.0

rustup install $CLIPPY_VERSION

Expand Down
4 changes: 2 additions & 2 deletions .evergreen/compile-only.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ set -o xtrace

source ./.evergreen/env.sh

# Install the MSRV and pin dependencies who have bumped their MSRVs to > ours in recent releases.
# Install the MSRV and generate a new lockfile with MSRV-compatible dependencies.
if [ "$RUST_VERSION" != "" ]; then
rustup toolchain install $RUST_VERSION
TOOLCHAIN="+${RUST_VERSION}"
patch Cargo.toml .evergreen/MSRV-Cargo.toml.diff
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback cargo +nightly -Zmsrv-policy generate-lockfile
fi

# Test with default features.
Expand Down
44 changes: 34 additions & 10 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,16 +271,16 @@ buildvariants:
tasks:
- test-plain-auth

- name: serverless
display_name: "Serverless"
run_on:
- rhel80-small
expansions:
LIBMONGOCRYPT_OS: rhel-80-64-bit
AUTH: auth
SSL: ssl
tasks:
- serverless-task-group
# - name: serverless
# display_name: "Serverless"
# run_on:
# - rhel80-small
# expansions:
# LIBMONGOCRYPT_OS: rhel-80-64-bit
# AUTH: auth
# SSL: ssl
# tasks:
# - serverless-task-group

- name: oidc-linux
display_name: "OIDC Linux"
Expand Down Expand Up @@ -675,13 +675,21 @@ task_groups:
- func: init test-results
- func: make files executable
- func: install rust
- command: ec2.assume_role
params:
role_arn: ${aws_test_secrets_role}
duration_seconds: 3600
- command: subprocess.exec
params:
binary: bash
env:
AZUREOIDC_VMNAME_PREFIX: "RUST_DRIVER"
args:
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/azure/create-and-setup-vm.sh
include_expansions_in_env:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
teardown_task:
- command: subprocess.exec
params:
Expand All @@ -702,13 +710,21 @@ task_groups:
- func: init test-results
- func: make files executable
- func: install rust
- command: ec2.assume_role
params:
role_arn: ${aws_test_secrets_role}
duration_seconds: 3600
- command: subprocess.exec
params:
binary: bash
env:
GCPOIDC_VMNAME_PREFIX: "RUST_DRIVER"
args:
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/gcp/setup.sh
include_expansions_in_env:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
teardown_task:
- command: subprocess.exec
params:
Expand All @@ -729,11 +745,19 @@ task_groups:
- func: init test-results
- func: make files executable
- func: install rust
- command: ec2.assume_role
params:
role_arn: ${aws_test_secrets_role}
duration_seconds: 3600
- command: subprocess.exec
params:
binary: bash
args:
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
include_expansions_in_env:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
teardown_task:
- command: subprocess.exec
params:
Expand Down
9 changes: 9 additions & 0 deletions .evergreen/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ for arg; do
if [ $arg == "rust" ]; then
curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path $DEFAULT_HOST_OPTIONS

# Cygwin has a bug with reporting symlink paths that breaks rustup; see
# https://github.com/rust-lang/rustup/issues/4239. This works around it by replacing the
# symlinks with copies.
if [ "Windows_NT" == "$OS" ]; then
pushd ${CARGO_HOME}/bin
python3 ../../.evergreen/unsymlink.py
popd
fi

# This file is not created by default on Windows
echo 'export PATH="$PATH:${CARGO_HOME}/bin"' >>${CARGO_HOME}/env
echo "export CARGO_NET_GIT_FETCH_WITH_CLI=true" >>${CARGO_HOME}/env
Expand Down
19 changes: 19 additions & 0 deletions .evergreen/unsymlink.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import os
import shutil

found = []
for entry in os.scandir():
if not entry.is_symlink():
print(f"Skipping {entry.name}: not a symlink")
continue
target = os.readlink(entry.name)
if target != "rustup.exe":
print(f"Skipping {entry.name}: not rustup.exe")
continue
print(f"Found {entry.name}")
found.append(entry.name)

for name in found:
print(f"Replacing {name} symlink with copy")
os.remove(name)
shutil.copy2("rustup.exe", name)
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*~
/target/
**/*.rs.bk
Cargo.lock
.idea
*.iml
.vscode
Expand All @@ -14,4 +13,4 @@ Cargo.lock
.rustup
mongocryptd.pid
semgrep/
sarif.json
sarif.json
Loading