Skip to content

Commit bf3489d

Browse files
authored
RUST-1621 Remove most uses of the soon-to-be-unsupported ubuntu-18.04 (#870)
1 parent e7b80ea commit bf3489d

File tree

3 files changed

+37
-34
lines changed

3 files changed

+37
-34
lines changed

.evergreen/config.yml

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ functions:
5555
export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
5656
export UPLOAD_BUCKET="${project}"
5757
export PROJECT_DIRECTORY="$(pwd)"
58-
export MONGOCRYPT_LIB_DIR="$PROJECT_DIRECTORY/libmongocrypt/${LIBMONGOCRYPT_OS}/lib"
58+
LIBMONGOCRYPT_SUFFIX_DIR="lib"
59+
# The RHEL path is 'lib64', not 'lib'
60+
if [ "${LIBMONGOCRYPT_OS}" = "rhel-80-64-bit" ]; then
61+
LIBMONGOCRYPT_SUFFIX_DIR="lib64"
62+
fi
63+
export MONGOCRYPT_LIB_DIR="$PROJECT_DIRECTORY/libmongocrypt/${LIBMONGOCRYPT_OS}/$LIBMONGOCRYPT_SUFFIX_DIR"
5964
export LD_LIBRARY_PATH="$MONGOCRYPT_LIB_DIR:$LD_LIBRARY_PATH"
6065
6166
cat <<EOT > expansion.yml
@@ -1736,18 +1741,24 @@ axes:
17361741
variables:
17371742
VENV_BIN_DIR: "bin"
17381743
LIBMONGOCRYPT_OS: "ubuntu1804-64"
1744+
- id: rhel-8.0
1745+
display_name: "RHEL 8.0"
1746+
run_on: rhel80-test
1747+
variables:
1748+
VENV_BIN_DIR: "bin"
1749+
LIBMONGOCRYPT_OS: "rhel-80-64-bit"
17391750
- id: ubuntu-20.04
17401751
display_name: "Ubuntu 20.04"
17411752
run_on: ubuntu2004-test
17421753
variables:
17431754
VENV_BIN_DIR: "bin"
17441755
LIBMONGOCRYPT_OS: "ubuntu2004-64"
1745-
- id: ubuntu-18.04-arm64
1746-
display_name: "ARM64 Ubuntu 18.04"
1747-
run_on: ubuntu1804-arm64-test
1756+
- id: ubuntu-20.04-arm64
1757+
display_name: "ARM64 Ubuntu 20.04"
1758+
run_on: ubuntu2004-arm64-test
17481759
variables:
17491760
VENV_BIN_DIR: "bin"
1750-
LIBMONGOCRYPT_OS: "ubuntu1804-arm64"
1761+
LIBMONGOCRYPT_OS: "ubuntu2004-arm64"
17511762
- id: macos-11.00
17521763
display_name: "MacOS 11.00"
17531764
run_on: macos-1100
@@ -1833,9 +1844,9 @@ buildvariants:
18331844
matrix_name: "tests"
18341845
matrix_spec:
18351846
os:
1836-
- ubuntu-18.04
1847+
- rhel-8.0
18371848
- ubuntu-20.04
1838-
- ubuntu-18.04-arm64
1849+
- ubuntu-20.04-arm64
18391850
- macos-11.00
18401851
- windows-64-vs2017
18411852
auth-and-tls: "*"
@@ -1866,30 +1877,15 @@ buildvariants:
18661877
# generic Linux builds on them. These do not link to OpenSSL, so we have to skip
18671878
# the SSL tests on them.
18681879
- if:
1869-
os: "ubuntu-20.04"
1880+
os: ["ubuntu-20.04", "ubuntu-20.04-arm64"]
18701881
auth-and-tls: "*"
18711882
async-runtime: "*"
18721883
compressor: "*"
18731884
then:
18741885
remove_tasks: [".3.6", ".4.0", ".4.2"]
1875-
- if:
1876-
os: "ubuntu-18.04"
1877-
auth-and-tls: "auth-and-tls"
1878-
async-runtime: "*"
1879-
compressor: "*"
1880-
then:
1881-
remove_tasks: ".3.6"
1882-
# ubuntu 1804 ARM64 only has downloads for 4.2+
1883-
- if:
1884-
os: ["ubuntu-18.04-arm64"]
1885-
auth-and-tls: "*"
1886-
async-runtime: "*"
1887-
compressor: "*"
1888-
then:
1889-
remove_tasks: [".3.6", ".4.0"]
18901886
# haproxy isn't installed on windows / ubuntu-arm / macos 11
18911887
- if:
1892-
os: ["ubuntu-18.04-arm64", "windows-64-vs2017", "macos-11.00"]
1888+
os: ["ubuntu-20.04-arm64", "windows-64-vs2017", "macos-11.00"]
18931889
auth-and-tls: "*"
18941890
async-runtime: "*"
18951891
compressor: "*"
@@ -1899,7 +1895,7 @@ buildvariants:
18991895
matrix_spec:
19001896
os:
19011897
- ubuntu-20.04
1902-
- ubuntu-18.04-arm64
1898+
- ubuntu-20.04-arm64
19031899
- macos-11.00
19041900
- windows-64-vs2017
19051901
auth-and-tls:
@@ -1914,7 +1910,7 @@ buildvariants:
19141910
matrix_spec:
19151911
os:
19161912
- ubuntu-20.04
1917-
- ubuntu-18.04-arm64
1913+
- ubuntu-20.04-arm64
19181914
- macos-11.00
19191915
- windows-64-vs2017
19201916
async-runtime: "*"
@@ -1925,7 +1921,7 @@ buildvariants:
19251921
- matrix_name: "serverless"
19261922
matrix_spec:
19271923
os:
1928-
- ubuntu-18.04
1924+
- ubuntu-20.04
19291925
async-runtime: "*"
19301926
crypt-shared:
19311927
- "enabled"
@@ -1956,11 +1952,11 @@ buildvariants:
19561952
tasks:
19571953
- "test-csfle"
19581954

1959-
# There's no 4.2 build for ubuntu-20.04, so drop down to -18.04.
1955+
# There's no 4.2 build for ubuntu-20.04, so switch to rhel.
19601956
- matrix_name: "csfle-mongodb-version-old"
19611957
matrix_spec:
19621958
os:
1963-
- ubuntu-18.04
1959+
- rhel-8.0
19641960
mongodb-version:
19651961
- "4.2"
19661962
topology:
@@ -2028,11 +2024,11 @@ buildvariants:
20282024
tasks:
20292025
- "test-csfle"
20302026

2031-
# There's no 4.2 build for ubuntu-20.04, so drop down to -18.04.
2027+
# There's no 4.2 build for ubuntu-20.04, so switch to rhel.
20322028
- matrix_name: "csfle-mongocryptd-old"
20332029
matrix_spec:
20342030
os:
2035-
- ubuntu-18.04
2031+
- rhel-8.0
20362032
mongodb-version:
20372033
- "4.2"
20382034
topology:
@@ -2067,7 +2063,7 @@ buildvariants:
20672063
matrix_spec:
20682064
os:
20692065
- ubuntu-20.04
2070-
- ubuntu-18.04-arm64
2066+
- ubuntu-20.04-arm64
20712067
- macos-11.00
20722068
- windows-64-vs2017
20732069
async-runtime: "*"
@@ -2130,7 +2126,7 @@ buildvariants:
21302126
- matrix_name: "compile-only"
21312127
matrix_spec:
21322128
os:
2133-
- ubuntu-18.04
2129+
- ubuntu-20.04
21342130
extra-rust-versions: "*"
21352131
display_name: "! Compile on Rust ${extra-rust-versions}"
21362132
tasks:
@@ -2139,7 +2135,7 @@ buildvariants:
21392135
- matrix_name: "versioned-api-tests"
21402136
matrix_spec:
21412137
os:
2142-
- ubuntu-18.04
2138+
- ubuntu-20.04
21432139
async-runtime: "tokio"
21442140
versioned-api: "*"
21452141
display_name: "Versioned API ${versioned-api}"

src/client/auth/aws.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,14 +349,17 @@ impl AwsCredential {
349349
Ok(auth_header)
350350
}
351351

352+
#[cfg(feature = "in-use-encryption-unstable")]
352353
pub(crate) fn access_key(&self) -> &str {
353354
&self.access_key
354355
}
355356

357+
#[cfg(feature = "in-use-encryption-unstable")]
356358
pub(crate) fn secret_key(&self) -> &str {
357359
&self.secret_key
358360
}
359361

362+
#[cfg(feature = "in-use-encryption-unstable")]
360363
pub(crate) fn session_token(&self) -> Option<&str> {
361364
self.session_token.as_deref()
362365
}

src/test/csfle.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3455,6 +3455,10 @@ async fn fle2_example() -> Result<()> {
34553455
log_uncaptured("skipping fle2 example: cannot run on standalone");
34563456
return Ok(());
34573457
}
3458+
if *SERVERLESS {
3459+
log_uncaptured("skipping fle2 example: cannot run on serverless");
3460+
return Ok(());
3461+
}
34583462

34593463
// Drop data from prior test runs.
34603464
test_client

0 commit comments

Comments
 (0)