Skip to content

Commit ebfb3ab

Browse files
RUST-2219 Cherrypick domain name parsing fix into 3.2.x (#1404)
Co-authored-by: Isabel Atkinson <[email protected]>
1 parent 34653fa commit ebfb3ab

36 files changed

+6446
-147
lines changed

.evergreen/MSRV-Cargo.toml.diff

Whitespace-only changes.

.evergreen/check-clippy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -o errexit
55
source ./.evergreen/env.sh
66

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

1010
rustup install $CLIPPY_VERSION
1111

.evergreen/compile-only.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ set -o xtrace
55

66
source ./.evergreen/env.sh
77

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

1515
# Test with default features.

.evergreen/config.yml

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -271,16 +271,16 @@ buildvariants:
271271
tasks:
272272
- test-plain-auth
273273

274-
- name: serverless
275-
display_name: "Serverless"
276-
run_on:
277-
- rhel80-small
278-
expansions:
279-
LIBMONGOCRYPT_OS: rhel-80-64-bit
280-
AUTH: auth
281-
SSL: ssl
282-
tasks:
283-
- serverless-task-group
274+
# - name: serverless
275+
# display_name: "Serverless"
276+
# run_on:
277+
# - rhel80-small
278+
# expansions:
279+
# LIBMONGOCRYPT_OS: rhel-80-64-bit
280+
# AUTH: auth
281+
# SSL: ssl
282+
# tasks:
283+
# - serverless-task-group
284284

285285
- name: oidc-linux
286286
display_name: "OIDC Linux"
@@ -675,13 +675,21 @@ task_groups:
675675
- func: init test-results
676676
- func: make files executable
677677
- func: install rust
678+
- command: ec2.assume_role
679+
params:
680+
role_arn: ${aws_test_secrets_role}
681+
duration_seconds: 3600
678682
- command: subprocess.exec
679683
params:
680684
binary: bash
681685
env:
682686
AZUREOIDC_VMNAME_PREFIX: "RUST_DRIVER"
683687
args:
684688
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/azure/create-and-setup-vm.sh
689+
include_expansions_in_env:
690+
- AWS_ACCESS_KEY_ID
691+
- AWS_SECRET_ACCESS_KEY
692+
- AWS_SESSION_TOKEN
685693
teardown_task:
686694
- command: subprocess.exec
687695
params:
@@ -702,13 +710,21 @@ task_groups:
702710
- func: init test-results
703711
- func: make files executable
704712
- func: install rust
713+
- command: ec2.assume_role
714+
params:
715+
role_arn: ${aws_test_secrets_role}
716+
duration_seconds: 3600
705717
- command: subprocess.exec
706718
params:
707719
binary: bash
708720
env:
709721
GCPOIDC_VMNAME_PREFIX: "RUST_DRIVER"
710722
args:
711723
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/gcp/setup.sh
724+
include_expansions_in_env:
725+
- AWS_ACCESS_KEY_ID
726+
- AWS_SECRET_ACCESS_KEY
727+
- AWS_SESSION_TOKEN
712728
teardown_task:
713729
- command: subprocess.exec
714730
params:
@@ -729,11 +745,19 @@ task_groups:
729745
- func: init test-results
730746
- func: make files executable
731747
- func: install rust
748+
- command: ec2.assume_role
749+
params:
750+
role_arn: ${aws_test_secrets_role}
751+
duration_seconds: 3600
732752
- command: subprocess.exec
733753
params:
734754
binary: bash
735755
args:
736756
- ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
757+
include_expansions_in_env:
758+
- AWS_ACCESS_KEY_ID
759+
- AWS_SECRET_ACCESS_KEY
760+
- AWS_SESSION_TOKEN
737761
teardown_task:
738762
- command: subprocess.exec
739763
params:

.evergreen/install-dependencies.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ for arg; do
2121
if [ $arg == "rust" ]; then
2222
curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path $DEFAULT_HOST_OPTIONS
2323

24+
# Cygwin has a bug with reporting symlink paths that breaks rustup; see
25+
# https://github.com/rust-lang/rustup/issues/4239. This works around it by replacing the
26+
# symlinks with copies.
27+
if [ "Windows_NT" == "$OS" ]; then
28+
pushd ${CARGO_HOME}/bin
29+
python3 ../../.evergreen/unsymlink.py
30+
popd
31+
fi
32+
2433
# This file is not created by default on Windows
2534
echo 'export PATH="$PATH:${CARGO_HOME}/bin"' >>${CARGO_HOME}/env
2635
echo "export CARGO_NET_GIT_FETCH_WITH_CLI=true" >>${CARGO_HOME}/env

.evergreen/unsymlink.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import os
2+
import shutil
3+
4+
found = []
5+
for entry in os.scandir():
6+
if not entry.is_symlink():
7+
print(f"Skipping {entry.name}: not a symlink")
8+
continue
9+
target = os.readlink(entry.name)
10+
if target != "rustup.exe":
11+
print(f"Skipping {entry.name}: not rustup.exe")
12+
continue
13+
print(f"Found {entry.name}")
14+
found.append(entry.name)
15+
16+
for name in found:
17+
print(f"Replacing {name} symlink with copy")
18+
os.remove(name)
19+
shutil.copy2("rustup.exe", name)

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*~
55
/target/
66
**/*.rs.bk
7-
Cargo.lock
87
.idea
98
*.iml
109
.vscode
@@ -14,4 +13,4 @@ Cargo.lock
1413
.rustup
1514
mongocryptd.pid
1615
semgrep/
17-
sarif.json
16+
sarif.json

0 commit comments

Comments
 (0)