mongo 2.18.1 → 2.18.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.md +1 -1
  4. data/lib/mongo/bulk_write.rb +6 -4
  5. data/lib/mongo/client.rb +1 -1
  6. data/lib/mongo/collection/view/iterable.rb +15 -0
  7. data/lib/mongo/collection/view/writable.rb +0 -2
  8. data/lib/mongo/collection/view.rb +1 -0
  9. data/lib/mongo/collection.rb +150 -45
  10. data/lib/mongo/crypt/auto_encrypter.rb +1 -0
  11. data/lib/mongo/crypt/explicit_encrypter.rb +1 -0
  12. data/lib/mongo/crypt/kms.rb +0 -1
  13. data/lib/mongo/crypt.rb +11 -0
  14. data/lib/mongo/error/invalid_read_option.rb +1 -1
  15. data/lib/mongo/grid/file/chunk.rb +2 -1
  16. data/lib/mongo/grid/file/info.rb +2 -1
  17. data/lib/mongo/operation/aggregate.rb +1 -2
  18. data/lib/mongo/operation/collections_info.rb +3 -15
  19. data/lib/mongo/operation/command.rb +1 -2
  20. data/lib/mongo/operation/count.rb +1 -2
  21. data/lib/mongo/operation/create.rb +1 -2
  22. data/lib/mongo/operation/create_index.rb +1 -2
  23. data/lib/mongo/operation/create_user.rb +1 -2
  24. data/lib/mongo/operation/delete.rb +0 -1
  25. data/lib/mongo/operation/distinct.rb +1 -2
  26. data/lib/mongo/operation/drop.rb +1 -2
  27. data/lib/mongo/operation/drop_database.rb +1 -2
  28. data/lib/mongo/operation/drop_index.rb +1 -2
  29. data/lib/mongo/operation/explain.rb +1 -3
  30. data/lib/mongo/operation/find/builder.rb +0 -1
  31. data/lib/mongo/operation/find.rb +1 -3
  32. data/lib/mongo/operation/get_more.rb +1 -3
  33. data/lib/mongo/operation/indexes.rb +1 -17
  34. data/lib/mongo/operation/insert.rb +0 -1
  35. data/lib/mongo/operation/kill_cursors.rb +1 -2
  36. data/lib/mongo/operation/list_collections.rb +1 -2
  37. data/lib/mongo/operation/map_reduce.rb +1 -2
  38. data/lib/mongo/operation/parallel_scan.rb +1 -2
  39. data/lib/mongo/operation/remove_user.rb +1 -2
  40. data/lib/mongo/operation/shared/{polymorphic_operation.rb → op_msg_executable.rb} +11 -6
  41. data/lib/mongo/operation/update.rb +0 -1
  42. data/lib/mongo/operation/update_user.rb +1 -2
  43. data/lib/mongo/operation/users_info.rb +1 -2
  44. data/lib/mongo/operation/write_command.rb +1 -2
  45. data/lib/mongo/operation.rb +1 -3
  46. data/lib/mongo/protocol/bit_vector.rb +3 -1
  47. data/lib/mongo/protocol/caching_hash.rb +3 -20
  48. data/lib/mongo/protocol/message.rb +4 -8
  49. data/lib/mongo/protocol/msg.rb +1 -0
  50. data/lib/mongo/protocol/serializers.rb +24 -17
  51. data/lib/mongo/protocol.rb +0 -3
  52. data/lib/mongo/query_cache.rb +20 -20
  53. data/lib/mongo/server/app_metadata/environment.rb +255 -0
  54. data/lib/mongo/server/app_metadata/truncator.rb +142 -0
  55. data/lib/mongo/server/app_metadata.rb +29 -42
  56. data/lib/mongo/session.rb +1 -1
  57. data/lib/mongo/version.rb +1 -1
  58. data/spec/integration/command_spec.rb +1 -23
  59. data/spec/integration/connection/faas_env_spec.rb +63 -0
  60. data/spec/integration/find_options_spec.rb +227 -0
  61. data/spec/integration/ocsp_verifier_spec.rb +1 -1
  62. data/spec/lite_spec_helper.rb +9 -0
  63. data/spec/mongo/address_spec.rb +1 -1
  64. data/spec/mongo/client_construction_spec.rb +7 -7
  65. data/spec/mongo/client_spec.rb +1 -9
  66. data/spec/mongo/cluster_spec.rb +2 -2
  67. data/spec/mongo/collection_crud_spec.rb +56 -0
  68. data/spec/mongo/collection_spec.rb +11 -1
  69. data/spec/mongo/crypt/kms_spec.rb +12 -9
  70. data/spec/mongo/crypt_spec.rb +21 -0
  71. data/spec/mongo/index/view_spec.rb +1 -0
  72. data/spec/mongo/protocol/caching_hash_spec.rb +0 -45
  73. data/spec/mongo/protocol/msg_spec.rb +2 -4
  74. data/spec/mongo/server/app_metadata/environment_spec.rb +193 -0
  75. data/spec/mongo/server/app_metadata/truncator_spec.rb +158 -0
  76. data/spec/mongo/server/app_metadata_spec.rb +33 -47
  77. data/spec/mongo/socket/ssl_spec.rb +2 -8
  78. data/spec/runners/crud/requirement.rb +2 -2
  79. data/spec/shared/lib/mrss/docker_runner.rb +4 -0
  80. data/spec/shared/lib/mrss/lite_constraints.rb +8 -0
  81. data/spec/shared/lib/mrss/server_version_registry.rb +16 -23
  82. data/spec/shared/share/Dockerfile.erb +24 -19
  83. data/spec/shared/shlib/server.sh +31 -7
  84. data/spec/shared/shlib/set_env.sh +4 -4
  85. data/spec/solo/clean_exit_spec.rb +3 -10
  86. data/spec/spec_tests/data/change_streams_unified/change-streams-showExpandedEvents.yml +15 -6
  87. data/spec/spec_tests/data/command_monitoring_unified/redacted-commands.yml +8 -0
  88. data/spec/support/aws_utils.rb +3 -3
  89. data/spec/support/certificates/atlas-ocsp-ca.crt +67 -67
  90. data/spec/support/certificates/atlas-ocsp.crt +103 -103
  91. data/spec/support/shared/app_metadata.rb +14 -2
  92. data.tar.gz.sig +0 -0
  93. metadata +1203 -1239
  94. metadata.gz.sig +0 -0
  95. data/lib/mongo/operation/aggregate/command.rb +0 -55
  96. data/lib/mongo/operation/collections_info/command.rb +0 -48
  97. data/lib/mongo/operation/command/command.rb +0 -41
  98. data/lib/mongo/operation/count/command.rb +0 -47
  99. data/lib/mongo/operation/create/command.rb +0 -47
  100. data/lib/mongo/operation/create_index/command.rb +0 -61
  101. data/lib/mongo/operation/create_user/command.rb +0 -46
  102. data/lib/mongo/operation/delete/command.rb +0 -52
  103. data/lib/mongo/operation/distinct/command.rb +0 -47
  104. data/lib/mongo/operation/drop/command.rb +0 -41
  105. data/lib/mongo/operation/drop_database/command.rb +0 -41
  106. data/lib/mongo/operation/drop_index/command.rb +0 -45
  107. data/lib/mongo/operation/explain/command.rb +0 -58
  108. data/lib/mongo/operation/explain/legacy.rb +0 -52
  109. data/lib/mongo/operation/find/builder/legacy.rb +0 -123
  110. data/lib/mongo/operation/find/command.rb +0 -51
  111. data/lib/mongo/operation/find/legacy/result.rb +0 -46
  112. data/lib/mongo/operation/find/legacy.rb +0 -52
  113. data/lib/mongo/operation/get_more/command.rb +0 -43
  114. data/lib/mongo/operation/get_more/legacy.rb +0 -39
  115. data/lib/mongo/operation/indexes/command.rb +0 -42
  116. data/lib/mongo/operation/indexes/legacy.rb +0 -48
  117. data/lib/mongo/operation/insert/command.rb +0 -55
  118. data/lib/mongo/operation/kill_cursors/command.rb +0 -48
  119. data/lib/mongo/operation/list_collections/command.rb +0 -46
  120. data/lib/mongo/operation/map_reduce/command.rb +0 -51
  121. data/lib/mongo/operation/parallel_scan/command.rb +0 -57
  122. data/lib/mongo/operation/remove_user/command.rb +0 -46
  123. data/lib/mongo/operation/shared/op_msg_or_command.rb +0 -41
  124. data/lib/mongo/operation/shared/op_msg_or_find_command.rb +0 -44
  125. data/lib/mongo/operation/update/command.rb +0 -53
  126. data/lib/mongo/operation/update_user/command.rb +0 -45
  127. data/lib/mongo/operation/users_info/command.rb +0 -46
  128. data/lib/mongo/operation/write_command/command.rb +0 -51
  129. data/lib/mongo/protocol/delete.rb +0 -172
  130. data/lib/mongo/protocol/insert.rb +0 -181
  131. data/lib/mongo/protocol/update.rb +0 -214
  132. data/spec/mongo/operation/delete/command_spec.rb +0 -115
  133. data/spec/mongo/operation/find/legacy_spec.rb +0 -131
  134. data/spec/mongo/operation/get_more_spec.rb +0 -63
  135. data/spec/mongo/operation/insert/command_spec.rb +0 -118
  136. data/spec/mongo/operation/update/command_spec.rb +0 -122
  137. data/spec/mongo/protocol/delete_spec.rb +0 -185
  138. data/spec/mongo/protocol/insert_spec.rb +0 -179
  139. 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'] == 'x86_64'
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='219833abad4d9d3bf43c0fef101a8ca082ac4ae9'
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 = [] %>
@@ -71,12 +71,18 @@ prepare_server_from_url() {
71
71
  export PATH="$BINDIR":$PATH
72
72
  }
73
73
 
74
- install_mlaunch_virtualenv() {
74
+ install_mlaunch_venv() {
75
75
  python3 -V || true
76
- if ! python3 -m virtualenv -h >/dev/null; then
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 'virtualenv<20' --user
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
- venvpath="$MONGO_ORCHESTRATION_HOME"/venv
88
- python3 -m virtualenv -p python3 $venvpath
89
- . $venvpath/bin/activate
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=219833abad4d9d3bf43c0fef101a8ca082ac4ae9
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
- before(:all) do
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-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
- # Added here to fix our tests as we require a commandName but don't
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
- - topologies: [ sharded-replicaset, sharded ]
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
@@ -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-core'
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
- 06:d8:d9:04:d5:58:43:46:f6:8a:2f:a7:54:22:7e:c4
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 CA
7
+ Issuer: C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root G2
8
8
  Validity
9
- Not Before: Apr 14 00:00:00 2021 GMT
10
- Not After : Apr 13 23:59:59 2031 GMT
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:c1:4b:b3:65:47:70:bc:dd:4f:58:db:ec:9c:ed:
17
- c3:66:e5:1f:31:13:54:ad:4a:66:46:1f:2c:0a:ec:
18
- 64:07:e5:2e:dc:dc:b9:0a:20:ed:df:e3:c4:d0:9e:
19
- 9a:a9:7a:1d:82:88:e5:11:56:db:1e:9f:58:c2:51:
20
- e7:2c:34:0d:2e:d2:92:e1:56:cb:f1:79:5f:b3:bb:
21
- 87:ca:25:03:7b:9a:52:41:66:10:60:4f:57:13:49:
22
- f0:e8:37:67:83:df:e7:d3:4b:67:4c:22:51:a6:df:
23
- 0e:99:10:ed:57:51:74:26:e2:7d:c7:ca:62:2e:13:
24
- 1b:7f:23:88:25:53:6f:c1:34:58:00:8b:84:ff:f8:
25
- be:a7:58:49:22:7b:96:ad:a2:88:9b:15:bc:a0:7c:
26
- df:e9:51:a8:d5:b0:ed:37:e2:36:b4:82:4b:62:b5:
27
- 49:9a:ec:c7:67:d6:e3:3e:f5:e3:d6:12:5e:44:f1:
28
- bf:71:42:7d:58:84:03:80:b1:81:01:fa:f9:ca:32:
29
- bb:b4:8e:27:87:27:c5:2b:74:d4:a8:d6:97:de:c3:
30
- 64:f9:ca:ce:53:a2:56:bc:78:17:8e:49:03:29:ae:
31
- fb:49:4f:a4:15:b9:ce:f2:5c:19:57:6d:6b:79:a7:
32
- 2b:a2:27:20:13:b5:d0:3d:40:d3:21:30:07:93:ea:
33
- 99:f5
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
- B7:6B:A2:EA:A8:AA:84:8C:79:EA:B4:DA:0F:98:B2:C5:95:76:B9:F4
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
- 03:DE:50:35:56:D1:4C:BB:66:F0:A3:E2:1B:1B:C3:97:B2:3D:D1:55
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/DigiCertGlobalRootCA.crt
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/DigiCertGlobalRootCA.crl
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
- 80:32:ce:5e:0b:dd:6e:5a:0d:0a:af:e1:d6:84:cb:c0:8e:fa:
61
- 85:70:ed:da:5d:b3:0c:f7:2b:75:40:fe:85:0a:fa:f3:31:78:
62
- b7:70:4b:1a:89:58:ba:80:bd:f3:6b:1d:e9:7e:cf:0b:ba:58:
63
- 9c:59:d4:90:d3:fd:6c:fd:d0:98:6d:b7:71:82:5b:cf:6d:0b:
64
- 5a:09:d0:7b:de:c4:43:d8:2a:a4:de:9e:41:26:5f:bb:8f:99:
65
- cb:dd:ae:e1:a8:6f:9f:87:fe:74:b7:1f:1b:20:ab:b1:4f:c6:
66
- f5:67:5d:5d:9b:3c:e9:ff:69:f7:61:6c:d6:d9:f3:fd:36:c6:
67
- ab:03:88:76:d2:4b:2e:75:86:e3:fc:d8:55:7d:26:c2:11:77:
68
- df:3e:02:b6:7c:f3:ab:7b:7a:86:36:6f:b8:f7:d8:93:71:cf:
69
- 86:df:73:30:fa:7b:ab:ed:2a:59:c8:42:84:3b:11:17:1a:52:
70
- f3:c9:0e:14:7d:a2:5b:72:67:ba:71:ed:57:47:66:c5:b8:02:
71
- 4a:65:34:5e:8b:d0:2a:3c:20:9c:51:99:4c:e7:52:9e:f7:6b:
72
- 11:2b:0d:92:7e:1d:e8:8a:eb:36:16:43:87:ea:2a:63:bf:75:
73
- 3f:eb:de:c4:03:bb:0a:3c:f7:30:ef:eb:af:4c:fc:8b:36:10:
74
- 73:3e:f3:a4
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-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