Skip to content

Commit 0fa8e68

Browse files
Merge branch 'master' into 3742-fix-backpressure-tests
2 parents 8056d1b + 1f75079 commit 0fa8e68

131 files changed

Lines changed: 18370 additions & 503 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.evergreen/config.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,6 +1067,10 @@ axes:
10671067
display_name: via LMC path
10681068
variables:
10691069
FLE: path
1070+
- id: "mongocryptd"
1071+
display_name: mongocryptd (no crypt_shared)
1072+
variables:
1073+
FLE: mongocryptd
10701074

10711075
- id: ocsp-algorithm
10721076
display_name: OCSP Algorithm
@@ -1536,6 +1540,19 @@ buildvariants:
15361540
tasks:
15371541
- name: "test-fle"
15381542

1543+
- matrix_name: "fle-mongocryptd"
1544+
matrix_spec:
1545+
auth-and-ssl: "noauth-and-nossl"
1546+
ruby: "ruby-4.0"
1547+
topology: [replica-set, sharded-cluster]
1548+
mongodb-version: "8.0"
1549+
os: ubuntu2204
1550+
fle: mongocryptd
1551+
display_name: "FLE mongocryptd: ${mongodb-version} ${topology} ${ruby}"
1552+
tags: ["pr"]
1553+
tasks:
1554+
- name: "test-fle"
1555+
15391556
- matrix_name: "kerberos-unit"
15401557
matrix_spec:
15411558
ruby: "ruby-4.0"

.evergreen/config/axes.yml.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ axes:
292292
display_name: via LMC path
293293
variables:
294294
FLE: path
295+
- id: "mongocryptd"
296+
display_name: mongocryptd (no crypt_shared)
297+
variables:
298+
FLE: mongocryptd
295299

296300
- id: ocsp-algorithm
297301
display_name: OCSP Algorithm

.evergreen/config/standard.yml.erb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,19 @@ buildvariants:
358358
tasks:
359359
- name: "test-fle"
360360

361+
- matrix_name: "fle-mongocryptd"
362+
matrix_spec:
363+
auth-and-ssl: "noauth-and-nossl"
364+
ruby: <%= latest_ruby %>
365+
topology: [replica-set, sharded-cluster]
366+
mongodb-version: <%= latest_stable_mdb %>
367+
os: ubuntu2204
368+
fle: mongocryptd
369+
display_name: "FLE mongocryptd: ${mongodb-version} ${topology} ${ruby}"
370+
tags: ["pr"]
371+
tasks:
372+
- name: "test-fle"
373+
361374
- matrix_name: "kerberos-unit"
362375
matrix_spec:
363376
ruby: <%= latest_ruby %>

.evergreen/run-tests.sh

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ fi
6666

6767
# Make sure cmake is installed (in case we need to install the libmongocrypt
6868
# helper)
69-
if [ "$FLE" = "helper" ]; then
69+
if [ -n "$FLE" ]; then
7070
install_cmake
7171
fi
7272

@@ -194,23 +194,25 @@ elif test "$AUTH" = kerberos; then
194194
fi
195195

196196
if test -n "$FLE"; then
197-
# Downloading crypt shared lib
198-
if [ -z "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" ]; then
199-
crypt_shared_version=${CRYPT_SHARED_VERSION:-$("${BINDIR}"/mongod --version | grep -oP 'db version v\K.*')}
200-
python3 -u .evergreen/mongodl.py --component crypt_shared -V ${crypt_shared_version} --out $(pwd)/csfle_lib --target $(host_distro) || true
201-
if test -f $(pwd)/csfle_lib/lib/mongo_crypt_v1.so
202-
then
203-
export MONGO_RUBY_DRIVER_CRYPT_SHARED_LIB_PATH=$(pwd)/csfle_lib/lib/mongo_crypt_v1.so
197+
# Downloading crypt shared lib (skipped for mongocryptd-only configuration)
198+
if test "$FLE" != "mongocryptd"; then
199+
if [ -z "$MONGO_CRYPT_SHARED_DOWNLOAD_URL" ]; then
200+
crypt_shared_version=${CRYPT_SHARED_VERSION:-$("${BINDIR}"/mongod --version | grep -oP 'db version v\K.*')}
201+
python3 -u .evergreen/mongodl.py --component crypt_shared -V ${crypt_shared_version} --out $(pwd)/csfle_lib --target $(host_distro) || true
202+
if test -f $(pwd)/csfle_lib/lib/mongo_crypt_v1.so
203+
then
204+
export MONGO_RUBY_DRIVER_CRYPT_SHARED_LIB_PATH=$(pwd)/csfle_lib/lib/mongo_crypt_v1.so
205+
else
206+
echo 'Could not find crypt_shared library'
207+
fi
204208
else
205-
echo 'Could not find crypt_shared library'
209+
echo "Downloading crypt_shared package from $MONGO_CRYPT_SHARED_DOWNLOAD_URL"
210+
mkdir -p $(pwd)/csfle_lib
211+
cd $(pwd)/csfle_lib
212+
curl --retry 3 -fL $MONGO_CRYPT_SHARED_DOWNLOAD_URL | tar zxf -
213+
export MONGO_RUBY_DRIVER_CRYPT_SHARED_LIB_PATH=$(pwd)/lib/mongo_crypt_v1.so
214+
cd -
206215
fi
207-
else
208-
echo "Downloading crypt_shared package from $MONGO_CRYPT_SHARED_DOWNLOAD_URL"
209-
mkdir -p $(pwd)/csfle_lib
210-
cd $(pwd)/csfle_lib
211-
curl --retry 3 -fL $MONGO_CRYPT_SHARED_DOWNLOAD_URL | tar zxf -
212-
export MONGO_RUBY_DRIVER_CRYPT_SHARED_LIB_PATH=$(pwd)/lib/mongo_crypt_v1.so
213-
cd -
214216
fi
215217

216218
# Start the KMS servers first so that they are launching while we are
@@ -237,7 +239,7 @@ if test -n "$FLE"; then
237239
# Obtain temporary AWS credentials
238240
PYTHON=python3 . .evergreen/csfle/set-temp-creds.sh
239241

240-
if test "$FLE" = helper; then
242+
if [[ "$FLE" == "helper" || "$FLE" == "mongocryptd" ]]; then
241243
echo "Using helper gem"
242244
elif test "$FLE" = path; then
243245
if false; then
@@ -344,7 +346,6 @@ if test "$COMPRESSOR" = zstd; then
344346
add_uri_option compressors=zstd
345347
fi
346348

347-
348349
echo "Running tests"
349350
set +e
350351
if test -n "$TEST_CMD"; then

.rubocop.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
require:
1+
plugins:
22
- rubocop-performance
33
- rubocop-rake
44
- rubocop-rspec
55

66
AllCops:
7-
TargetRubyVersion: 2.5
7+
TargetRubyVersion: 2.7
88
NewCops: enable
99
Exclude:
1010
- 'spec/shared/**/*'
@@ -51,6 +51,9 @@ Layout/SpaceInsideArrayLiteralBrackets:
5151
Layout/SpaceInsidePercentLiteralDelimiters:
5252
Enabled: false
5353

54+
Lint/UselessConstantScoping:
55+
Enabled: false
56+
5457
Metrics/ClassLength:
5558
Max: 200
5659

@@ -60,9 +63,16 @@ Metrics/ModuleLength:
6063
Metrics/MethodLength:
6164
Max: 20
6265

66+
Naming/FileName:
67+
Exclude:
68+
- 'gemfiles/bson_4-stable.gemfile'
69+
6370
Naming/MethodParameterName:
6471
AllowedNames: [ id, op ]
6572

73+
Naming/PredicateMethod:
74+
Enabled: false
75+
6676
RSpec/BeforeAfterAll:
6777
Enabled: false
6878

@@ -71,12 +81,24 @@ RSpec/BeforeAfterAll:
7181
RSpec/DescribeClass:
7282
Enabled: false
7383

84+
RSpec/Eq:
85+
Enabled: false
86+
7487
Style/FetchEnvVar:
7588
Enabled: false
7689

7790
RSpec/ImplicitExpect:
7891
EnforcedStyle: is_expected
7992

93+
RSpec/IncludeExamples:
94+
Enabled: false
95+
96+
RSpec/IndexedLet:
97+
Enabled: false
98+
99+
RSpec/ExpectInLet:
100+
Enabled: false
101+
80102
RSpec/MultipleExpectations:
81103
Enabled: false
82104

@@ -86,6 +108,9 @@ RSpec/MultipleMemoizedHelpers:
86108
RSpec/NestedGroups:
87109
Enabled: false
88110

111+
RSpec/ReceiveMessages:
112+
Enabled: false
113+
89114
Style/Documentation:
90115
Exclude:
91116
- 'spec/**/*'

Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# frozen_string_literal: true
2-
# rubocop:todo all
32

43
source 'https://rubygems.org'
54

65
gemspec
76

8-
require_relative './gemfiles/standard'
7+
require_relative 'gemfiles/standard'
98

109
standard_dependencies

0 commit comments

Comments
 (0)