Skip to content

Commit e64c340

Browse files
committed
Merge remote-tracking branch 'remotes/origin/master' into MONGOID-5136-super-touch
2 parents 55907c7 + 9ab75a8 commit e64c340

File tree

284 files changed

+14947
-5590
lines changed

Some content is hidden

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

284 files changed

+14947
-5590
lines changed

.evergreen/config.yml

Lines changed: 78 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -347,22 +347,6 @@ axes:
347347
display_name: "MongoDB 3.6"
348348
variables:
349349
VERSION: "3.6"
350-
- id: "3.4"
351-
display_name: "MongoDB 3.4"
352-
variables:
353-
VERSION: "3.4"
354-
- id: "3.2"
355-
display_name: "MongoDB 3.2"
356-
variables:
357-
VERSION: "3.2"
358-
- id: "3.0"
359-
display_name: "MongoDB 3.0"
360-
variables:
361-
VERSION: "3.0"
362-
- id: "2.6"
363-
display_name: "MongoDB 2.6"
364-
variables:
365-
VERSION: "2.6"
366350
- id: "topology"
367351
display_name: Topology
368352
values:
@@ -420,6 +404,10 @@ axes:
420404
display_name: ruby-3.0
421405
variables:
422406
RVM_RUBY: "ruby-3.0"
407+
- id: "ruby-3.1"
408+
display_name: ruby-3.1
409+
variables:
410+
RVM_RUBY: "ruby-3.1"
423411
- id: "ruby-head"
424412
display_name: ruby-head
425413
variables:
@@ -440,10 +428,15 @@ axes:
440428
- id: ubuntu-18.04
441429
display_name: "Ubuntu 18.04"
442430
run_on: ubuntu1804-small
443-
431+
- id: ubuntu-20.04
432+
display_name: "Ubuntu 20.04"
433+
run_on: ubuntu2004-small
444434
- id: rhel70
445435
display_name: "RHEL 7.0"
446436
run_on: rhel70-small
437+
- id: rhel80
438+
display_name: "RHEL 8.0"
439+
run_on: rhel80-small
447440
- id: "driver"
448441
display_name: Driver Version
449442
values:
@@ -483,6 +476,10 @@ axes:
483476
display_name: "Driver-min (JRuby)"
484477
variables:
485478
DRIVER: "min-jruby"
479+
- id: bson-min
480+
display_name: "BSON-min"
481+
variables:
482+
DRIVER: "bson-min"
486483
- id: "rails"
487484
display_name: Rails Version
488485
values:
@@ -506,6 +503,10 @@ axes:
506503
display_name: "Rails 6.1"
507504
variables:
508505
RAILS: "6.1"
506+
- id: "7.0"
507+
display_name: "Rails 7.0"
508+
variables:
509+
RAILS: "7.0"
509510
- id: "i18n"
510511
display_name: I18n version
511512
values:
@@ -531,15 +532,27 @@ axes:
531532
APP_TESTS: yes
532533

533534
buildvariants:
535+
- matrix_name: "ruby-3.1"
536+
matrix_spec:
537+
ruby: ["ruby-3.1"]
538+
driver: ["current"]
539+
topology: '*'
540+
mongodb-version: ['5.0']
541+
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
542+
run_on:
543+
- ubuntu2004-small
544+
tasks:
545+
- name: "test"
546+
534547
- matrix_name: "ruby-3.0"
535548
matrix_spec:
536549
ruby: ["ruby-3.0"]
537550
driver: ["current"]
538-
topology: '*'
551+
topology: ['replica-set']
539552
mongodb-version: ['5.0']
540-
display_name: "${ruby}, ${driver}, ${rails}, ${mongodb-version}, ${topology}"
553+
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
541554
run_on:
542-
- ubuntu1804-small
555+
- ubuntu2004-small
543556
tasks:
544557
- name: "test"
545558

@@ -571,19 +584,19 @@ buildvariants:
571584
matrix_spec:
572585
ruby: ["ruby-2.6"]
573586
driver: ["current"]
574-
topology: '*'
587+
topology: ['replica-set']
575588
mongodb-version: ['4.0']
576589
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
577590
run_on:
578-
- ubuntu1804-small
591+
- ubuntu1604-small
579592
tasks:
580593
- name: "test"
581594

582595
- matrix_name: "ruby-2.5"
583596
matrix_spec:
584597
ruby: ["ruby-2.5"]
585598
driver: ["current"]
586-
topology: '*'
599+
topology: ['replica-set']
587600
mongodb-version: ['3.6']
588601
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
589602
run_on:
@@ -594,12 +607,12 @@ buildvariants:
594607
- matrix_name: "driver-upcoming"
595608
matrix_spec:
596609
driver: [master, stable]
597-
ruby: ["ruby-3.0"]
610+
ruby: ["ruby-3.1"]
598611
mongodb-version: "5.0"
599612
topology: ['replica-set', 'sharded-cluster']
600613
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
601614
run_on:
602-
- rhel70-small
615+
- rhel80-small
603616
tasks:
604617
- name: "test"
605618

@@ -627,6 +640,31 @@ buildvariants:
627640
tasks:
628641
- name: "test"
629642

643+
- matrix_name: "rails-7"
644+
matrix_spec:
645+
ruby: ["ruby-3.0"]
646+
driver: ["current"]
647+
mongodb-version: "5.0"
648+
topology: "standalone"
649+
rails: ['7.0']
650+
display_name: "${rails}, ${driver}, ${mongodb-version}"
651+
run_on:
652+
- rhel70-small
653+
tasks:
654+
- name: "test"
655+
656+
- matrix_name: "bson-min"
657+
matrix_spec:
658+
driver: [min]
659+
ruby: ["ruby-2.7"]
660+
mongodb-version: "5.0"
661+
topology: "standalone"
662+
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
663+
run_on:
664+
- ubuntu1804-small
665+
tasks:
666+
- name: "test"
667+
630668
- matrix_name: "rails-6"
631669
matrix_spec:
632670
ruby: ["ruby-3.0"]
@@ -636,7 +674,7 @@ buildvariants:
636674
rails: ['6.0', '6.1']
637675
display_name: "${rails}, ${driver}, ${mongodb-version}"
638676
run_on:
639-
- rhel70-small
677+
- rhel80-small
640678
tasks:
641679
- name: "test"
642680

@@ -680,19 +718,20 @@ buildvariants:
680718
tasks:
681719
- name: "test"
682720

683-
- matrix_name: app-tests-ruby-3.0
684-
matrix_spec:
685-
ruby: ruby-3.0
686-
driver: ["current"]
687-
mongodb-version: '5.0'
688-
topology: standalone
689-
app-tests: yes
690-
rails: ['6.0', '6.1']
691-
display_name: "app tests ${driver}, ${ruby}, ${rails}"
692-
run_on:
693-
- ubuntu1804-small
694-
tasks:
695-
- name: "test"
721+
# https://jira.mongodb.org/browse/MONGOID-5216
722+
# - matrix_name: app-tests-ruby-3
723+
# matrix_spec:
724+
# ruby: ["ruby-3.0", "ruby-3.1"]
725+
# driver: ["current"]
726+
# mongodb-version: '5.0'
727+
# topology: standalone
728+
# app-tests: yes
729+
# rails: ['6.0', '6.1']
730+
# display_name: "app tests ${driver}, ${ruby}, ${rails}"
731+
# run_on:
732+
# - ubuntu2004-small
733+
# tasks:
734+
# - name: "test"
696735

697736
- matrix_name: app-tests-ruby-2.7
698737
matrix_spec:

.evergreen/functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set_env_vars() {
99
AUTH=${AUTH:-noauth}
1010
SSL=${SSL:-nossl}
1111
MONGODB_URI=${MONGODB_URI:-}
12-
TOPOLOGY=${TOPOLOGY:-server}
12+
TOPOLOGY=${TOPOLOGY:-standalone}
1313
DRIVERS_TOOLS=${DRIVERS_TOOLS:-}
1414

1515
if [ "$AUTH" != "noauth" ]; then

.evergreen/make-github-actions

100644100755
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
# TODO: Support i18n-fallbacks test
55
# TODO: Support app-tests tests
66

7+
# Note on topology: server:
8+
# The GH actions use mongo-orchestration, which uses a "server" topology for
9+
# the standalone one. See transform_node! below for the mapping of all
10+
# topologies.
11+
712
require 'fileutils'
13+
require 'active_support'
814
require 'active_support/dependencies/autoload'
915
require 'active_support/core_ext'
1016
require 'yaml'
@@ -240,7 +246,7 @@ class Transmogrifier
240246

241247
def step_mongodb
242248
{
243-
id: "start-mongodb"
249+
id: "start-mongodb",
244250
name: "start mongodb",
245251
uses: "mongodb-labs/drivers-evergreen-tools@master",
246252
with: {

.evergreen/run-tests.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ elif test "$DRIVER" = "oldstable"; then
6666
elif test "$DRIVER" = "min"; then
6767
bundle install --gemfile=gemfiles/driver_min.gemfile
6868
BUNDLE_GEMFILE=gemfiles/driver_min.gemfile
69+
elif test "$DRIVER" = "bson-min"; then
70+
bundle install --gemfile=gemfiles/bson_min.gemfile
71+
BUNDLE_GEMFILE=gemfiles/bson_min.gemfile
6972
elif test "$DRIVER" = "stable-jruby"; then
7073
bundle install --gemfile=gemfiles/driver_stable_jruby.gemfile
7174
BUNDLE_GEMFILE=gemfiles/driver_stable_jruby.gemfile
@@ -96,15 +99,15 @@ set +e
9699
if test -n "$TEST_CMD"; then
97100
eval $TEST_CMD
98101
elif test -n "$TEST_I18N_FALLBACKS"; then
99-
bundle exec rspec spec/integration/i18n_fallbacks_spec.rb
102+
bundle exec rspec spec/integration/i18n_fallbacks_spec.rb spec/mongoid/criteria_spec.rb spec/mongoid/contextual/mongo_spec.rb
100103
elif test -n "$APP_TESTS"; then
101104
# Need recent node for rails
102105
export N_PREFIX=$HOME/.n
103106
curl -o $HOME/n --retry 3 https://raw.githubusercontent.com/tj/n/master/bin/n
104107
bash $HOME/n stable
105108
export PATH=$HOME/.n/bin:$PATH
106109
npm -g install yarn
107-
110+
108111
bundle exec rspec spec/integration/app_spec.rb
109112
else
110113
bundle exec rake ci
@@ -118,6 +121,6 @@ if test -f tmp/rspec-all.json; then
118121
mv tmp/rspec-all.json tmp/rspec.json
119122
fi
120123

121-
python -m mtools.mlaunch.mlaunch stop --dir "$dbdir"
124+
python2 -m mtools.mlaunch.mlaunch stop --dir "$dbdir"
122125

123126
exit ${test_status}

.github/workflows/test.yml

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,26 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
include:
21+
- mongodb: '5.0'
22+
ruby: ruby-3.1
23+
topology: server
24+
os: ubuntu-20.04
25+
task: test
26+
driver: current
27+
rails:
28+
i18n:
29+
gemfile: Gemfile
30+
experimental: false
31+
- mongodb: '5.0'
32+
ruby: ruby-3.1
33+
topology: replica_set
34+
os: ubuntu-20.04
35+
task: test
36+
driver: current
37+
rails:
38+
i18n:
39+
gemfile: Gemfile
40+
experimental: false
2141
- mongodb: '5.0'
2242
ruby: ruby-3.0
2343
topology: server
@@ -109,7 +129,7 @@ jobs:
109129
gemfile: Gemfile
110130
experimental: false
111131
- mongodb: '5.0'
112-
ruby: ruby-3.0
132+
ruby: ruby-3.1
113133
topology: replica_set
114134
os: ubuntu-20.04
115135
task: test
@@ -158,6 +178,46 @@ jobs:
158178
i18n:
159179
gemfile: gemfiles/driver_min.gemfile
160180
experimental: false
181+
- mongodb: '5.0'
182+
ruby: ruby-3.1
183+
topology: server
184+
os: ubuntu-20.04
185+
task: test
186+
driver: current
187+
rails: '7.0'
188+
i18n:
189+
gemfile: gemfiles/rails-7.0.gemfile
190+
experimental: false
191+
- mongodb: '5.0'
192+
ruby: ruby-3.1
193+
topology: server
194+
os: ubuntu-20.04
195+
task: test
196+
driver: current
197+
rails: '6.1'
198+
i18n:
199+
gemfile: gemfiles/rails-6.1.gemfile
200+
experimental: false
201+
- mongodb: '5.0'
202+
ruby: ruby-3.0
203+
topology: server
204+
os: ubuntu-20.04
205+
task: test
206+
driver: current
207+
rails: '7.0'
208+
i18n:
209+
gemfile: gemfiles/rails-7.0.gemfile
210+
experimental: false
211+
- mongodb: '5.0'
212+
ruby: ruby-3.0
213+
topology: server
214+
os: ubuntu-20.04
215+
task: test
216+
driver: current
217+
rails: '6.1'
218+
i18n:
219+
gemfile: gemfiles/rails-6.1.gemfile
220+
experimental: false
161221
- mongodb: '5.0'
162222
ruby: ruby-3.0
163223
topology: server

SECURITY.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Use this section to tell people about which versions of your project are
6+
currently being supported with security updates.
7+
8+
| Version | Supported |
9+
| ------- | ------------------ |
10+
| 7.3 | :white_check_mark: |
11+
| 7.2 | :white_check_mark: |
12+
| 7.1 | :white_check_mark: |
13+
| 7.0 | :white_check_mark: |
14+
| < 7.0 | :x: |
15+
16+
## Reporting a Vulnerability
17+
18+
Please [follow the instructions here](https://docs.mongodb.com/manual/tutorial/create-a-vulnerability-report/)
19+
to report a vulnerability.

docs/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ tutorials and the reference.
77
To build the documentation locally for review, install `sphinx` and
88
`sphinx-book-theme`, then execute `make html` in this directory:
99

10-
pip install sphinx sphinx-book-theme
10+
pip install 'sphinx<4.3' sphinx-book-theme
1111
make html
1212

13+
Note: sphinx 4.3 is currently breaking when trying to render Mongoid
14+
documentation.

0 commit comments

Comments
 (0)