mongo 2.18.1 → 2.18.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.md +1 -1
- data/lib/mongo/bulk_write.rb +6 -4
- data/lib/mongo/client.rb +1 -1
- data/lib/mongo/collection/view/iterable.rb +15 -0
- data/lib/mongo/collection/view/writable.rb +0 -2
- data/lib/mongo/collection/view.rb +1 -0
- data/lib/mongo/collection.rb +150 -45
- data/lib/mongo/crypt/auto_encrypter.rb +1 -0
- data/lib/mongo/crypt/explicit_encrypter.rb +1 -0
- data/lib/mongo/crypt/kms.rb +0 -1
- data/lib/mongo/crypt.rb +11 -0
- data/lib/mongo/error/invalid_read_option.rb +1 -1
- data/lib/mongo/grid/file/chunk.rb +2 -1
- data/lib/mongo/grid/file/info.rb +2 -1
- data/lib/mongo/operation/aggregate.rb +1 -2
- data/lib/mongo/operation/collections_info.rb +3 -15
- data/lib/mongo/operation/command.rb +1 -2
- data/lib/mongo/operation/count.rb +1 -2
- data/lib/mongo/operation/create.rb +1 -2
- data/lib/mongo/operation/create_index.rb +1 -2
- data/lib/mongo/operation/create_user.rb +1 -2
- data/lib/mongo/operation/delete.rb +0 -1
- data/lib/mongo/operation/distinct.rb +1 -2
- data/lib/mongo/operation/drop.rb +1 -2
- data/lib/mongo/operation/drop_database.rb +1 -2
- data/lib/mongo/operation/drop_index.rb +1 -2
- data/lib/mongo/operation/explain.rb +1 -3
- data/lib/mongo/operation/find/builder.rb +0 -1
- data/lib/mongo/operation/find.rb +1 -3
- data/lib/mongo/operation/get_more.rb +1 -3
- data/lib/mongo/operation/indexes.rb +1 -17
- data/lib/mongo/operation/insert.rb +0 -1
- data/lib/mongo/operation/kill_cursors.rb +1 -2
- data/lib/mongo/operation/list_collections.rb +1 -2
- data/lib/mongo/operation/map_reduce.rb +1 -2
- data/lib/mongo/operation/parallel_scan.rb +1 -2
- data/lib/mongo/operation/remove_user.rb +1 -2
- data/lib/mongo/operation/shared/{polymorphic_operation.rb → op_msg_executable.rb} +11 -6
- data/lib/mongo/operation/update.rb +0 -1
- data/lib/mongo/operation/update_user.rb +1 -2
- data/lib/mongo/operation/users_info.rb +1 -2
- data/lib/mongo/operation/write_command.rb +1 -2
- data/lib/mongo/operation.rb +1 -3
- data/lib/mongo/protocol/bit_vector.rb +3 -1
- data/lib/mongo/protocol/caching_hash.rb +3 -20
- data/lib/mongo/protocol/message.rb +4 -8
- data/lib/mongo/protocol/msg.rb +1 -0
- data/lib/mongo/protocol/serializers.rb +24 -17
- data/lib/mongo/protocol.rb +0 -3
- data/lib/mongo/query_cache.rb +20 -20
- data/lib/mongo/server/app_metadata/environment.rb +255 -0
- data/lib/mongo/server/app_metadata/truncator.rb +142 -0
- data/lib/mongo/server/app_metadata.rb +29 -42
- data/lib/mongo/session.rb +1 -1
- data/lib/mongo/version.rb +1 -1
- data/spec/integration/command_spec.rb +1 -23
- data/spec/integration/connection/faas_env_spec.rb +63 -0
- data/spec/integration/find_options_spec.rb +227 -0
- data/spec/integration/ocsp_verifier_spec.rb +1 -1
- data/spec/lite_spec_helper.rb +9 -0
- data/spec/mongo/address_spec.rb +1 -1
- data/spec/mongo/client_construction_spec.rb +7 -7
- data/spec/mongo/client_spec.rb +1 -9
- data/spec/mongo/cluster_spec.rb +2 -2
- data/spec/mongo/collection_crud_spec.rb +56 -0
- data/spec/mongo/collection_spec.rb +11 -1
- data/spec/mongo/crypt/kms_spec.rb +12 -9
- data/spec/mongo/crypt_spec.rb +21 -0
- data/spec/mongo/index/view_spec.rb +1 -0
- data/spec/mongo/protocol/caching_hash_spec.rb +0 -45
- data/spec/mongo/protocol/msg_spec.rb +2 -4
- data/spec/mongo/server/app_metadata/environment_spec.rb +193 -0
- data/spec/mongo/server/app_metadata/truncator_spec.rb +158 -0
- data/spec/mongo/server/app_metadata_spec.rb +33 -47
- data/spec/mongo/socket/ssl_spec.rb +2 -8
- data/spec/runners/crud/requirement.rb +2 -2
- data/spec/shared/lib/mrss/docker_runner.rb +4 -0
- data/spec/shared/lib/mrss/lite_constraints.rb +8 -0
- data/spec/shared/lib/mrss/server_version_registry.rb +16 -23
- data/spec/shared/share/Dockerfile.erb +24 -19
- data/spec/shared/shlib/server.sh +31 -7
- data/spec/shared/shlib/set_env.sh +4 -4
- data/spec/solo/clean_exit_spec.rb +3 -10
- data/spec/spec_tests/data/change_streams_unified/change-streams-showExpandedEvents.yml +15 -6
- data/spec/spec_tests/data/command_monitoring_unified/redacted-commands.yml +8 -0
- data/spec/support/aws_utils.rb +3 -3
- data/spec/support/certificates/atlas-ocsp-ca.crt +67 -67
- data/spec/support/certificates/atlas-ocsp.crt +103 -103
- data/spec/support/shared/app_metadata.rb +14 -2
- data.tar.gz.sig +0 -0
- metadata +1203 -1239
- metadata.gz.sig +0 -0
- data/lib/mongo/operation/aggregate/command.rb +0 -55
- data/lib/mongo/operation/collections_info/command.rb +0 -48
- data/lib/mongo/operation/command/command.rb +0 -41
- data/lib/mongo/operation/count/command.rb +0 -47
- data/lib/mongo/operation/create/command.rb +0 -47
- data/lib/mongo/operation/create_index/command.rb +0 -61
- data/lib/mongo/operation/create_user/command.rb +0 -46
- data/lib/mongo/operation/delete/command.rb +0 -52
- data/lib/mongo/operation/distinct/command.rb +0 -47
- data/lib/mongo/operation/drop/command.rb +0 -41
- data/lib/mongo/operation/drop_database/command.rb +0 -41
- data/lib/mongo/operation/drop_index/command.rb +0 -45
- data/lib/mongo/operation/explain/command.rb +0 -58
- data/lib/mongo/operation/explain/legacy.rb +0 -52
- data/lib/mongo/operation/find/builder/legacy.rb +0 -123
- data/lib/mongo/operation/find/command.rb +0 -51
- data/lib/mongo/operation/find/legacy/result.rb +0 -46
- data/lib/mongo/operation/find/legacy.rb +0 -52
- data/lib/mongo/operation/get_more/command.rb +0 -43
- data/lib/mongo/operation/get_more/legacy.rb +0 -39
- data/lib/mongo/operation/indexes/command.rb +0 -42
- data/lib/mongo/operation/indexes/legacy.rb +0 -48
- data/lib/mongo/operation/insert/command.rb +0 -55
- data/lib/mongo/operation/kill_cursors/command.rb +0 -48
- data/lib/mongo/operation/list_collections/command.rb +0 -46
- data/lib/mongo/operation/map_reduce/command.rb +0 -51
- data/lib/mongo/operation/parallel_scan/command.rb +0 -57
- data/lib/mongo/operation/remove_user/command.rb +0 -46
- data/lib/mongo/operation/shared/op_msg_or_command.rb +0 -41
- data/lib/mongo/operation/shared/op_msg_or_find_command.rb +0 -44
- data/lib/mongo/operation/update/command.rb +0 -53
- data/lib/mongo/operation/update_user/command.rb +0 -45
- data/lib/mongo/operation/users_info/command.rb +0 -46
- data/lib/mongo/operation/write_command/command.rb +0 -51
- data/lib/mongo/protocol/delete.rb +0 -172
- data/lib/mongo/protocol/insert.rb +0 -181
- data/lib/mongo/protocol/update.rb +0 -214
- data/spec/mongo/operation/delete/command_spec.rb +0 -115
- data/spec/mongo/operation/find/legacy_spec.rb +0 -131
- data/spec/mongo/operation/get_more_spec.rb +0 -63
- data/spec/mongo/operation/insert/command_spec.rb +0 -118
- data/spec/mongo/operation/update/command_spec.rb +0 -122
- data/spec/mongo/protocol/delete_spec.rb +0 -185
- data/spec/mongo/protocol/insert_spec.rb +0 -179
- data/spec/mongo/protocol/update_spec.rb +0 -204
@@ -209,6 +209,14 @@ module Mrss
|
|
209
209
|
end
|
210
210
|
end
|
211
211
|
|
212
|
+
def require_no_fallbacks
|
213
|
+
before(:all) do
|
214
|
+
if %w(yes true 1).include?((ENV['TEST_I18N_FALLBACKS'] || '').downcase)
|
215
|
+
skip 'Set TEST_I18N_FALLBACKS=0 environment variable to run these tests'
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
212
220
|
# This is a macro for retrying flaky tests on CI that occasionally fail.
|
213
221
|
# Note that the tests will only be retried on CI.
|
214
222
|
#
|
@@ -24,6 +24,21 @@ module Mrss
|
|
24
24
|
|
25
25
|
attr_reader :desired_version, :arch
|
26
26
|
|
27
|
+
def target_arch
|
28
|
+
# can't use RbConfig::CONFIG["arch"] because JRuby doesn't
|
29
|
+
# return anything meaningful there.
|
30
|
+
#
|
31
|
+
# also, need to use `uname -a` instead of (e.g.) `uname -p`
|
32
|
+
# because debian (at least) does not return anything meaningful
|
33
|
+
# for `uname -p`.
|
34
|
+
uname = `uname -a`.strip
|
35
|
+
@target_arch ||= case uname
|
36
|
+
when /aarch/ then "aarch64"
|
37
|
+
when /x86/ then "x86_64"
|
38
|
+
else raise "unsupported architecture #{uname.inspect}"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
27
42
|
def download_url
|
28
43
|
@download_url ||= begin
|
29
44
|
version, version_ok = detect_version(current_catalog)
|
@@ -40,35 +55,13 @@ module Mrss
|
|
40
55
|
end
|
41
56
|
dl = version['downloads'].detect do |dl|
|
42
57
|
dl['archive']['url'].index("enterprise-#{arch}") &&
|
43
|
-
dl['arch'] ==
|
58
|
+
dl['arch'] == target_arch
|
44
59
|
end
|
45
60
|
unless dl
|
46
61
|
raise MissingDownloadUrl, "No download for #{arch} for #{version['version']}"
|
47
62
|
end
|
48
63
|
url = dl['archive']['url']
|
49
64
|
end
|
50
|
-
rescue MissingDownloadUrl
|
51
|
-
if %w(2.6 3.0).include?(desired_version) && arch == 'ubuntu1604'
|
52
|
-
# 2.6 and 3.0 are only available for ubuntu1204 and ubuntu1404.
|
53
|
-
# Those ubuntus have ancient Pythons that don't work due to not
|
54
|
-
# implementing recent TLS protocols.
|
55
|
-
# Because of this we test on ubuntu1604 which has a newer Python.
|
56
|
-
# But we still need to retrieve ubuntu1404-targeting builds.
|
57
|
-
url = self.class.new('3.2', arch).download_url
|
58
|
-
unless url.include?('3.2.')
|
59
|
-
raise 'URL not in expected format'
|
60
|
-
end
|
61
|
-
url = case desired_version
|
62
|
-
when '2.6'
|
63
|
-
url.sub(/\b3\.2\.\d+/, '2.6.12')
|
64
|
-
when '3.0'
|
65
|
-
url.sub(/\b3\.2\.\d+/, '3.0.15')
|
66
|
-
else
|
67
|
-
raise NotImplementedError
|
68
|
-
end.sub('ubuntu1604', 'ubuntu1404')
|
69
|
-
else
|
70
|
-
raise
|
71
|
-
end
|
72
65
|
end
|
73
66
|
|
74
67
|
private
|
@@ -7,13 +7,13 @@
|
|
7
7
|
<%
|
8
8
|
|
9
9
|
python_toolchain_url = "https://s3.amazonaws.com//mciuploads/mongo-python-driver-toolchain/#{distro}/ba92de2700c04ee2d4f82c3ffdfc33105140cb04/mongo_python_driver_toolchain_#{distro.gsub('-', '_')}_ba92de2700c04ee2d4f82c3ffdfc33105140cb04_19_11_14_15_33_33.tar.gz"
|
10
|
-
server_version = '4.3.3'
|
10
|
+
# server_version = '4.3.3'
|
11
11
|
server_url = "http://downloads.10gen.com/linux/mongodb-linux-x86_64-enterprise-#{distro}-#{server_version}.tgz"
|
12
12
|
server_archive_basename = File.basename(server_url)
|
13
13
|
server_extracted_dir = server_archive_basename.sub(/\.(tar\.gz|tgz)$/, '')
|
14
14
|
|
15
15
|
# When changing, also update the hash in shlib/set_env.sh.
|
16
|
-
TOOLCHAIN_VERSION='
|
16
|
+
TOOLCHAIN_VERSION='e8c60866f54bed7e336a37df3a97d6ae1b971b7d'
|
17
17
|
|
18
18
|
def ruby_toolchain_url(ruby)
|
19
19
|
"http://boxes.10gen.com/build/toolchain-drivers/mongo-ruby-driver/#{TOOLCHAIN_VERSION}/#{distro}/#{ruby}.tar.xz"
|
@@ -77,12 +77,12 @@ ENV DOCKER=1
|
|
77
77
|
# therefore install python-pip in all configurations here.
|
78
78
|
|
79
79
|
<% packages = %w(
|
80
|
-
procps lsb-release bzip2 curl zsh
|
80
|
+
procps lsb-release bzip2 curl wget gpg zsh
|
81
81
|
git make gcc libyaml-0-2 libgmp-dev zlib1g-dev libsnappy-dev
|
82
82
|
krb5-user krb5-kdc krb5-admin-server libsasl2-dev libsasl2-modules-gssapi-mit
|
83
83
|
haproxy
|
84
84
|
python3-pip
|
85
|
-
tzdata shared-mime-info
|
85
|
+
tzdata shared-mime-info software-properties-common
|
86
86
|
) %>
|
87
87
|
|
88
88
|
<% if distro =~ /ubuntu2004/ %>
|
@@ -120,16 +120,22 @@ ENV DOCKER=1
|
|
120
120
|
<% end %>
|
121
121
|
|
122
122
|
RUN apt-get update && apt-get install -y <%= packages.join(' ') %>
|
123
|
-
|
123
|
+
|
124
|
+
<% if ubuntu? %>
|
125
|
+
RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
|
126
|
+
RUN echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/kitware.list >/dev/null
|
127
|
+
<% end %>
|
128
|
+
RUN apt-get update && apt-get install -y cmake
|
129
|
+
|
124
130
|
<% else %>
|
125
131
|
|
126
132
|
<% if distro =~ /rhel6/ %>
|
127
|
-
|
133
|
+
|
128
134
|
# CentOS 6 is dead - to use it retrieve the packages from vault:
|
129
135
|
# https://stackoverflow.com/questions/53562691/error-cannot-retrieve-repository-metadata-repomd-xml-for-repository-base-pl
|
130
|
-
|
136
|
+
|
131
137
|
<%
|
132
|
-
|
138
|
+
|
133
139
|
cfg = <<-CFG
|
134
140
|
[base]
|
135
141
|
name=CentOS-$releasever - Base
|
@@ -141,11 +147,11 @@ gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
|
|
141
147
|
CFG
|
142
148
|
|
143
149
|
%>
|
144
|
-
|
150
|
+
|
145
151
|
RUN printf "<%= cfg.gsub("\n", "\\n") %>" >/etc/yum.repos.d/CentOS-Base.repo
|
146
|
-
|
152
|
+
|
147
153
|
<% end %>
|
148
|
-
|
154
|
+
|
149
155
|
# Enterprise server: net-snmp
|
150
156
|
# lsb_release: redhat-lsb-core
|
151
157
|
# our runner scripts: which
|
@@ -162,7 +168,7 @@ CFG
|
|
162
168
|
|
163
169
|
RUN yum install -y redhat-lsb-core which git gcc libyaml krb5-server \
|
164
170
|
krb5-workstation cyrus-sasl-devel cyrus-sasl-gssapi java-1.8.0-openjdk \
|
165
|
-
net-snmp python3
|
171
|
+
net-snmp python3 cmake
|
166
172
|
|
167
173
|
<% if distro =~ /rhel6/ %>
|
168
174
|
|
@@ -178,7 +184,7 @@ CFG
|
|
178
184
|
RUN yum install -y python-devel
|
179
185
|
|
180
186
|
<% end %>
|
181
|
-
|
187
|
+
|
182
188
|
<% end %>
|
183
189
|
|
184
190
|
<% if preload? %>
|
@@ -220,7 +226,7 @@ CFG
|
|
220
226
|
<% when 'git' %>
|
221
227
|
# dateutil dependency is missing in mtools: https://github.com/rueckstiess/mtools/issues/864
|
222
228
|
RUN python3 -m pip install virtualenv 'pymongo>=4' python-dateutil psutil
|
223
|
-
|
229
|
+
|
224
230
|
# Install mtools from git because released versions do not work with pymongo 4.0
|
225
231
|
RUN git clone https://github.com/p-mongodb/mtools && \
|
226
232
|
cd mtools && \
|
@@ -243,7 +249,7 @@ CFG
|
|
243
249
|
# boto3~=1.19 cryptography~=3.4.8 pykmip~=0.10.0
|
244
250
|
# cryptography does not install due to lacking setuptools_rust
|
245
251
|
# (either that version or anything that isn't part of system packages)
|
246
|
-
RUN python3 -mpip install boto3~=1.19 cryptography pykmip~=0.10.0
|
252
|
+
RUN python3 -mpip install boto3~=1.19 cryptography pykmip~=0.10.0 'sqlalchemy<2.0.0'
|
247
253
|
<% end %>
|
248
254
|
|
249
255
|
<% unless ruby_head? || system_ruby? %>
|
@@ -255,10 +261,6 @@ CFG
|
|
255
261
|
|
256
262
|
<% end %>
|
257
263
|
|
258
|
-
RUN curl --retry 3 -fL <%= server_download_url %> |tar xzf - && \
|
259
|
-
mv mongo*/ /opt/mongodb
|
260
|
-
ENV USE_OPT_MONGODB=1 USE_SYSTEM_PYTHON_PACKAGES=1
|
261
|
-
|
262
264
|
<% end %>
|
263
265
|
|
264
266
|
<% if distro =~ /debian|ubuntu/ %>
|
@@ -308,6 +310,9 @@ ENV MONGO_ORCHESTRATION_HOME=/tmpfs \
|
|
308
310
|
|
309
311
|
COPY . .
|
310
312
|
|
313
|
+
RUN bash -c '. .evergreen/download-mongodb.sh && get_distro && get_mongodb_download_url_for "$DISTRO" "<%= server_version %>" && curl --retry 3 -fL $MONGODB_DOWNLOAD_URL |tar xzf - && mv mongo*/ /opt/mongodb'
|
314
|
+
ENV USE_OPT_MONGODB=1 USE_SYSTEM_PYTHON_PACKAGES=1
|
315
|
+
|
311
316
|
<% if expose? %>
|
312
317
|
|
313
318
|
<% ports = [] %>
|
data/spec/shared/shlib/server.sh
CHANGED
@@ -71,12 +71,18 @@ prepare_server_from_url() {
|
|
71
71
|
export PATH="$BINDIR":$PATH
|
72
72
|
}
|
73
73
|
|
74
|
-
|
74
|
+
install_mlaunch_venv() {
|
75
75
|
python3 -V || true
|
76
|
-
if ! python3 -m
|
76
|
+
if ! python3 -m venv -h >/dev/null; then
|
77
77
|
# Current virtualenv fails with
|
78
78
|
# https://github.com/pypa/virtualenv/issues/1630
|
79
|
-
python3 -m pip install
|
79
|
+
python3 -m pip install venv --user
|
80
|
+
fi
|
81
|
+
if ! python3 -m ensurepip -h > /dev/null; then
|
82
|
+
# Debian11/Ubuntu2204 have venv installed, but it is nonfunctional unless
|
83
|
+
# the python3-venv package is also installed (it lacks the ensurepip
|
84
|
+
# module).
|
85
|
+
sudo apt-get install --yes python3-venv
|
80
86
|
fi
|
81
87
|
if test "$USE_SYSTEM_PYTHON_PACKAGES" = 1 &&
|
82
88
|
python3 -m pip list |grep mtools
|
@@ -84,14 +90,19 @@ install_mlaunch_virtualenv() {
|
|
84
90
|
# Use the existing mtools-legacy
|
85
91
|
:
|
86
92
|
else
|
87
|
-
|
88
|
-
|
89
|
-
|
93
|
+
# Spawn a virtual environment, but only if one is not already
|
94
|
+
# active...
|
95
|
+
if test -z "$VIRTUAL_ENV"; then
|
96
|
+
venvpath="$MONGO_ORCHESTRATION_HOME"/venv
|
97
|
+
python3 -m venv $venvpath
|
98
|
+
. $venvpath/bin/activate
|
99
|
+
fi
|
100
|
+
|
90
101
|
# [mlaunch] does not work:
|
91
102
|
# https://github.com/rueckstiess/mtools/issues/856
|
92
103
|
# dateutil dependency is missing in mtools: https://github.com/rueckstiess/mtools/issues/864
|
93
104
|
#pip install 'mtools==1.7' 'pymongo==4.1' python-dateutil psutil
|
94
|
-
|
105
|
+
|
95
106
|
# dateutil dependency is missing in mtools: https://github.com/rueckstiess/mtools/issues/864
|
96
107
|
pip install 'mtools-legacy[mlaunch]' 'pymongo<4' python-dateutil
|
97
108
|
fi
|
@@ -158,6 +169,19 @@ install_mlaunch_git() {
|
|
158
169
|
fi
|
159
170
|
}
|
160
171
|
|
172
|
+
install_cmake() {
|
173
|
+
if ! command -v cmake &> /dev/null; then
|
174
|
+
if ! command -v apt-get &> /dev/null; then
|
175
|
+
# no apt-get; assume RHEL
|
176
|
+
sudo yum -y install cmake libarchive
|
177
|
+
else
|
178
|
+
sudo apt-get install --yes cmake
|
179
|
+
fi
|
180
|
+
else
|
181
|
+
echo 'cmake is present'
|
182
|
+
fi
|
183
|
+
}
|
184
|
+
|
161
185
|
# This function sets followong global variables:
|
162
186
|
# server_cert_path
|
163
187
|
# server_ca_path
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# When changing, also update the hash in share/Dockerfile.
|
2
|
-
TOOLCHAIN_VERSION=
|
2
|
+
TOOLCHAIN_VERSION=e8c60866f54bed7e336a37df3a97d6ae1b971b7d
|
3
3
|
|
4
4
|
set_env_java() {
|
5
5
|
ls -l /opt || true
|
@@ -53,7 +53,7 @@ set_env_python() {
|
|
53
53
|
curl -fL --retry 3 https://github.com/p-mongodb/deps/raw/main/"$arch"-python37.tar.xz | \
|
54
54
|
tar xfJ - -C /opt
|
55
55
|
fi
|
56
|
-
|
56
|
+
|
57
57
|
if test -d /opt/python/3.7/bin; then
|
58
58
|
# Most Evergreen configurations.
|
59
59
|
export PATH=/opt/python/3.7/bin:$PATH
|
@@ -61,7 +61,7 @@ set_env_python() {
|
|
61
61
|
# Configurations that use Docker in Evergreen - these don't preload.
|
62
62
|
export PATH=/opt/python37/bin:$PATH
|
63
63
|
fi
|
64
|
-
|
64
|
+
|
65
65
|
python3 -V
|
66
66
|
fi
|
67
67
|
}
|
@@ -78,7 +78,7 @@ set_env_node() {
|
|
78
78
|
# Node from toolchain in Evergreen
|
79
79
|
export PATH=/opt/node/bin:$PATH
|
80
80
|
fi
|
81
|
-
|
81
|
+
|
82
82
|
node -v
|
83
83
|
}
|
84
84
|
|
@@ -2,18 +2,11 @@
|
|
2
2
|
# encoding: utf-8
|
3
3
|
|
4
4
|
require 'mongo'
|
5
|
+
require 'lite_spec_helper'
|
5
6
|
|
6
7
|
describe 'Clean exit' do
|
7
|
-
|
8
|
-
|
9
|
-
unless %w(1 true yes).include?(ENV['SOLO'])
|
10
|
-
skip 'Set SOLO=1 in environment to run solo tests'
|
11
|
-
end
|
12
|
-
|
13
|
-
if %w(1 true yes).include?(ENV['EXTERNAL_DISABLED'])
|
14
|
-
skip "Test requires external connectivity"
|
15
|
-
end
|
16
|
-
end
|
8
|
+
require_external_connectivity
|
9
|
+
require_solo
|
17
10
|
|
18
11
|
context 'with SRV URI' do
|
19
12
|
|
@@ -2,7 +2,8 @@ description: "change-streams-showExpandedEvents"
|
|
2
2
|
schemaVersion: "1.7"
|
3
3
|
runOnRequirements:
|
4
4
|
- minServerVersion: "6.0.0"
|
5
|
-
topologies: [ replicaset, sharded
|
5
|
+
topologies: [ replicaset, sharded ]
|
6
|
+
serverless: forbid
|
6
7
|
createEntities:
|
7
8
|
- client:
|
8
9
|
id: &client0 client0
|
@@ -160,7 +161,15 @@ tests:
|
|
160
161
|
- name: createChangeStream
|
161
162
|
object: *collection0
|
162
163
|
arguments:
|
163
|
-
pipeline:
|
164
|
+
pipeline:
|
165
|
+
# On sharded clusters, the create command run when loading initial
|
166
|
+
# data sometimes is still reported in the change stream. To avoid
|
167
|
+
# this, we exclude the create command when creating the change
|
168
|
+
# stream, but specifically don't exclude other events to still catch
|
169
|
+
# driver errors.
|
170
|
+
- $match:
|
171
|
+
operationType:
|
172
|
+
$ne: create
|
164
173
|
showExpandedEvents: true
|
165
174
|
saveResultAsEntity: &changeStream0 changeStream0
|
166
175
|
- name: createIndex
|
@@ -259,9 +268,7 @@ tests:
|
|
259
268
|
arguments:
|
260
269
|
command:
|
261
270
|
collMod: *collection0
|
262
|
-
|
263
|
-
# do anything with it.
|
264
|
-
commandName: modify_collection
|
271
|
+
commandName: collMod
|
265
272
|
- name: iterateUntilDocumentOrError
|
266
273
|
object: *changeStream0
|
267
274
|
expectResult:
|
@@ -269,7 +276,8 @@ tests:
|
|
269
276
|
|
270
277
|
- description: "when showExpandedEvents is true, shardCollection events are reported"
|
271
278
|
runOnRequirements:
|
272
|
-
|
279
|
+
# Note: minServerVersion is specified in top-level runOnRequirements
|
280
|
+
- topologies: [ sharded ]
|
273
281
|
operations:
|
274
282
|
- name: dropCollection
|
275
283
|
object: *shardedDb
|
@@ -292,6 +300,7 @@ tests:
|
|
292
300
|
shardCollection: shardedDb.shardedCollection
|
293
301
|
key:
|
294
302
|
_id: 1
|
303
|
+
commandName: shardCollection
|
295
304
|
- name: iterateUntilDocumentOrError
|
296
305
|
object: *changeStream0
|
297
306
|
expectResult:
|
@@ -93,6 +93,8 @@ tests:
|
|
93
93
|
payload: { $$exists: false }
|
94
94
|
|
95
95
|
- description: "getnonce"
|
96
|
+
runOnRequirements:
|
97
|
+
- maxServerVersion: 6.1.99 # getnonce removed as of 6.2 via SERVER-71007
|
96
98
|
operations:
|
97
99
|
- name: runCommand
|
98
100
|
object: *database
|
@@ -159,6 +161,8 @@ tests:
|
|
159
161
|
roles: { $$exists: false }
|
160
162
|
|
161
163
|
- description: "copydbgetnonce"
|
164
|
+
runOnRequirements:
|
165
|
+
- maxServerVersion: 3.6.99 # copydbgetnonce was removed as of 4.0 via SERVER-32276
|
162
166
|
operations:
|
163
167
|
- name: runCommand
|
164
168
|
object: *database
|
@@ -176,6 +180,8 @@ tests:
|
|
176
180
|
command: { copydbgetnonce: { $$exists: false } }
|
177
181
|
|
178
182
|
- description: "copydbsaslstart"
|
183
|
+
runOnRequirements:
|
184
|
+
- maxServerVersion: 4.0.99 # copydbsaslstart was removed as of 4.2 via SERVER-36211
|
179
185
|
operations:
|
180
186
|
- name: runCommand
|
181
187
|
object: *database
|
@@ -193,6 +199,8 @@ tests:
|
|
193
199
|
command: { copydbsaslstart: { $$exists: false } }
|
194
200
|
|
195
201
|
- description: "copydb"
|
202
|
+
runOnRequirements:
|
203
|
+
- maxServerVersion: 4.0.99 # copydb was removed as of 4.2 via SERVER-36257
|
196
204
|
operations:
|
197
205
|
- name: runCommand
|
198
206
|
object: *database
|
data/spec/support/aws_utils.rb
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
# encoding: utf-8
|
3
2
|
|
4
3
|
autoload :Byebug, 'byebug'
|
5
4
|
autoload :Paint, 'paint'
|
6
5
|
|
6
|
+
require 'aws-sdk-core'
|
7
|
+
|
7
8
|
module Aws
|
8
9
|
autoload :CloudWatchLogs, 'aws-sdk-cloudwatchlogs'
|
9
|
-
autoload :Credentials, 'aws-sdk-core'
|
10
10
|
autoload :EC2, 'aws-sdk-ec2'
|
11
11
|
autoload :ECS, 'aws-sdk-ecs'
|
12
12
|
autoload :IAM, 'aws-sdk-iam'
|
13
|
-
autoload :STS, 'aws-sdk-
|
13
|
+
autoload :STS, 'aws-sdk-sts'
|
14
14
|
end
|
15
15
|
|
16
16
|
module AwsUtils
|
@@ -2,53 +2,53 @@ Certificate:
|
|
2
2
|
Data:
|
3
3
|
Version: 3 (0x2)
|
4
4
|
Serial Number:
|
5
|
-
|
5
|
+
0c:f5:bd:06:2b:56:02:f4:7a:b8:50:2c:23:cc:f0:66
|
6
6
|
Signature Algorithm: sha256WithRSAEncryption
|
7
|
-
Issuer: C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root
|
7
|
+
Issuer: C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root G2
|
8
8
|
Validity
|
9
|
-
Not Before:
|
10
|
-
Not After :
|
11
|
-
Subject: C = US, O = DigiCert Inc, CN = DigiCert TLS RSA SHA256 2020 CA1
|
9
|
+
Not Before: Mar 30 00:00:00 2021 GMT
|
10
|
+
Not After : Mar 29 23:59:59 2031 GMT
|
11
|
+
Subject: C = US, O = DigiCert Inc, CN = DigiCert Global G2 TLS RSA SHA256 2020 CA1
|
12
12
|
Subject Public Key Info:
|
13
13
|
Public Key Algorithm: rsaEncryption
|
14
14
|
Public-Key: (2048 bit)
|
15
15
|
Modulus:
|
16
|
-
00:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
16
|
+
00:cc:f7:10:62:4f:a6:bb:63:6f:ed:90:52:56:c5:
|
17
|
+
6d:27:7b:7a:12:56:8a:f1:f4:f9:d6:e7:e1:8f:bd:
|
18
|
+
95:ab:f2:60:41:15:70:db:12:00:fa:27:0a:b5:57:
|
19
|
+
38:5b:7d:b2:51:93:71:95:0e:6a:41:94:5b:35:1b:
|
20
|
+
fa:7b:fa:bb:c5:be:24:30:fe:56:ef:c4:f3:7d:97:
|
21
|
+
e3:14:f5:14:4d:cb:a7:10:f2:16:ea:ab:22:f0:31:
|
22
|
+
22:11:61:69:90:26:ba:78:d9:97:1f:e3:7d:66:ab:
|
23
|
+
75:44:95:73:c8:ac:ff:ef:5d:0a:8a:59:43:e1:ac:
|
24
|
+
b2:3a:0f:f3:48:fc:d7:6b:37:c1:63:dc:de:46:d6:
|
25
|
+
db:45:fe:7d:23:fd:90:e8:51:07:1e:51:a3:5f:ed:
|
26
|
+
49:46:54:7f:2c:88:c5:f4:13:9c:97:15:3c:03:e8:
|
27
|
+
a1:39:dc:69:0c:32:c1:af:16:57:4c:94:47:42:7c:
|
28
|
+
a2:c8:9c:7d:e6:d4:4d:54:af:42:99:a8:c1:04:c2:
|
29
|
+
77:9c:d6:48:e4:ce:11:e0:2a:80:99:f0:43:70:cf:
|
30
|
+
3f:76:6b:d1:4c:49:ab:24:5e:c2:0d:82:fd:46:a8:
|
31
|
+
ab:6c:93:cc:62:52:42:75:92:f8:9a:fa:5e:5e:b2:
|
32
|
+
b0:61:e5:1f:1f:b9:7f:09:98:e8:3d:fa:83:7f:47:
|
33
|
+
69:a1
|
34
34
|
Exponent: 65537 (0x10001)
|
35
35
|
X509v3 extensions:
|
36
36
|
X509v3 Basic Constraints: critical
|
37
37
|
CA:TRUE, pathlen:0
|
38
38
|
X509v3 Subject Key Identifier:
|
39
|
-
|
39
|
+
74:85:80:C0:66:C7:DF:37:DE:CF:BD:29:37:AA:03:1D:BE:ED:CD:17
|
40
40
|
X509v3 Authority Key Identifier:
|
41
|
-
|
41
|
+
4E:22:54:20:18:95:E6:E3:6E:E6:0F:FA:FA:B9:12:ED:06:17:8F:39
|
42
42
|
X509v3 Key Usage: critical
|
43
43
|
Digital Signature, Certificate Sign, CRL Sign
|
44
44
|
X509v3 Extended Key Usage:
|
45
45
|
TLS Web Server Authentication, TLS Web Client Authentication
|
46
46
|
Authority Information Access:
|
47
47
|
OCSP - URI:http://ocsp.digicert.com
|
48
|
-
CA Issuers - URI:http://cacerts.digicert.com/
|
48
|
+
CA Issuers - URI:http://cacerts.digicert.com/DigiCertGlobalRootG2.crt
|
49
49
|
X509v3 CRL Distribution Points:
|
50
50
|
Full Name:
|
51
|
-
URI:http://crl3.digicert.com/
|
51
|
+
URI:http://crl3.digicert.com/DigiCertGlobalRootG2.crl
|
52
52
|
X509v3 Certificate Policies:
|
53
53
|
Policy: 2.16.840.1.114412.2.1
|
54
54
|
Policy: 2.23.140.1.1
|
@@ -57,47 +57,47 @@ Certificate:
|
|
57
57
|
Policy: 2.23.140.1.2.3
|
58
58
|
Signature Algorithm: sha256WithRSAEncryption
|
59
59
|
Signature Value:
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
60
|
+
90:f1:70:cb:28:97:69:97:7c:74:fd:c0:fa:26:7b:53:ab:ad:
|
61
|
+
cd:65:fd:ba:9c:06:9c:8a:d7:5a:43:87:ed:4d:4c:56:5f:ad:
|
62
|
+
c1:c5:b5:05:20:2e:59:d1:ff:4a:f5:a0:2a:d8:b0:95:ad:c9:
|
63
|
+
2e:4a:3b:d7:a7:f6:6f:88:29:fc:30:3f:24:84:bb:c3:b7:7b:
|
64
|
+
93:07:2c:af:87:6b:76:33:ed:00:55:52:b2:59:9e:e4:b9:d0:
|
65
|
+
f3:df:e7:0f:fe:dd:f8:c4:b9:10:72:81:09:04:5f:cf:97:9e:
|
66
|
+
2e:32:75:8e:cf:9a:58:d2:57:31:7e:37:01:81:b2:66:6d:29:
|
67
|
+
1a:b1:66:09:6d:d1:6e:90:f4:b9:fa:2f:01:14:c5:5c:56:64:
|
68
|
+
01:d9:7d:87:a8:38:53:9f:8b:5d:46:6d:5c:c6:27:84:81:d4:
|
69
|
+
7e:8c:8c:a3:9b:52:e7:c6:88:ec:37:7c:2a:fb:f0:55:5a:38:
|
70
|
+
72:10:d8:00:13:cf:4c:73:db:aa:37:35:a8:29:81:69:9c:76:
|
71
|
+
bc:de:18:7b:90:d4:ca:cf:ef:67:03:fd:04:5a:21:16:b1:ff:
|
72
|
+
ea:3f:df:dc:82:f5:eb:f4:59:92:23:0d:24:2a:95:25:4c:ca:
|
73
|
+
a1:91:e6:d4:b7:ac:87:74:b3:f1:6d:a3:99:db:f9:d5:bd:84:
|
74
|
+
40:9f:07:98
|
75
75
|
|
76
76
|
-----BEGIN CERTIFICATE-----
|
77
|
-
|
77
|
+
MIIEyDCCA7CgAwIBAgIQDPW9BitWAvR6uFAsI8zwZjANBgkqhkiG9w0BAQsFADBh
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