Skip to content

Commit

Permalink
start trying to fix the broken 8.0-stable test environment
Browse files Browse the repository at this point in the history
  • Loading branch information
jamis committed Nov 22, 2024
1 parent 48835a0 commit 786734e
Show file tree
Hide file tree
Showing 7 changed files with 161 additions and 28 deletions.
73 changes: 59 additions & 14 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ functions:
git submodule update --init --recursive
if [ ! -d .mod ]; then
mkdir -p .mod
cd .mod
git clone https://github.com/mongodb-labs/drivers-evergreen-tools
fi
"fetch egos":
- command: shell.exec
params:
Expand All @@ -61,7 +67,7 @@ functions:
CURRENT_VERSION=latest
fi
export DRIVERS_TOOLS="$(pwd)/../drivers-tools"
export DRIVERS_TOOLS="$(pwd)/.mod/drivers-evergreen-tools"
export MONGO_ORCHESTRATION_HOME="$DRIVERS_TOOLS/.evergreen/orchestration"
export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
Expand Down Expand Up @@ -95,6 +101,15 @@ functions:
export SSL=${SSL}
export APP_TESTS=${APP_TESTS}
export DOCKER_DISTRO=${DOCKER_DISTRO}
export MONGODB_URI="${MONGODB_URI}"
export RVM_RUBY="${RVM_RUBY}"
export RAILS="${RAILS}"
export DRIVER="${DRIVER}"
export I18N="${I18N}"
export TEST_I18N_FALLBACKS="${TEST_I18N_FALLBACKS}"
export FLE="${FLE}"
export TOOLCHAIN_OVERRIDE="${TOOLCHAIN_OVERRIDE}"
EOT
# See what we've done
cat expansion.yml
Expand Down Expand Up @@ -267,6 +282,16 @@ functions:
file: ./src/tmp/rspec.xml

"run tests":
- command: shell.exec
type: test
params:
shell: bash
working_dir: "src"
script: |
${PREPARE_SHELL}
.evergreen/run-tests.sh
"run tests in docker":
- command: shell.exec
type: test
params:
Expand Down Expand Up @@ -442,19 +467,19 @@ axes:
values:
- id: ubuntu-22.04
display_name: "Ubuntu 22.04"
run_on: ubuntu2204-small
- id: ubuntu-20.04
display_name: "Ubuntu 20.04"
run_on: ubuntu2004-small
variables:
DOCKER_DISTRO: ubuntu2204
- id: ubuntu-18.04
display_name: "Ubuntu 18.04"
run_on: ubuntu1804-small
- id: debian11
display_name: "Debian 11"
run_on: ubuntu2004-small
variables:
DOCKER_DISTRO: debian11
run_on: debian11-small
- id: rhel80
display_name: "RHEL 8.0"
run_on: ubuntu2004-small
variables:
DOCKER_DISTRO: rhel80
run_on: rhel80-small

- id: "driver"
display_name: Driver Version
Expand Down Expand Up @@ -558,14 +583,33 @@ axes:
variables:
APP_TESTS: yes

- id: toolchain
display_name: Toolchain Version
values:
- id: 2023-05-11
display_name: 2023-05-11
variables:
TOOLCHAIN_OVERRIDE: e8c60866f54bed7e336a37df3a97d6ae1b971b7d
- id: 2023-11-02
display_name: 2023-11-02
variables:
TOOLCHAIN_OVERRIDE: ded7ea845b08cf96f11a747d9540ba3199580dea
- id: 2024-08-07
display_name: 2024-08-07
variables:
TOOLCHAIN_OVERRIDE: c950fe1e85fd7d5e4ea69cc2afff456825583716
- id: 2024-09-06
display_name: 2024-09-06
variables:
TOOLCHAIN_OVERRIDE: deefab59d8f539bdd4a0154505f1e7d39a0857d0
buildvariants:
- matrix_name: "mongodb-latest"
matrix_spec:
ruby: ["ruby-3.1"]
driver: ["current"]
topology: '*'
mongodb-version: ['latest']
os: debian11
os: ubuntu-22.04
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
tasks:
- name: "test"
Expand Down Expand Up @@ -744,13 +788,13 @@ buildvariants:

- matrix_name: app-tests-ruby-3
matrix_spec:
ruby: ["ruby-3.0", "ruby-3.1"]
ruby: "ruby-3.1"
driver: ["current"]
mongodb-version: '6.0'
topology: standalone
app-tests: yes
rails: ['6.0', '6.1', '7.0', '7.1']
os: rhel80
os: ubuntu-22.04
display_name: "app tests ${driver}, ${ruby}, ${rails}"
tasks:
- name: "test"
Expand All @@ -763,7 +807,8 @@ buildvariants:
topology: standalone
app-tests: yes
rails: ['5.2']
os: rhel80
os: ubuntu-20.04
toolchain: 2024-09-06
display_name: "app tests ${driver}, ${ruby}, ${rails}"
tasks:
- name: "test"
Expand All @@ -776,7 +821,7 @@ buildvariants:
topology: standalone
app-tests: yes
rails: ['6.0']
os: ubuntu-22.04
os: ubuntu-18.04
display_name: "app tests ${driver}, ${jruby}"
tasks:
- name: "test"
Expand Down
35 changes: 27 additions & 8 deletions .evergreen/config/axes.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,19 @@ axes:
values:
- id: ubuntu-22.04
display_name: "Ubuntu 22.04"
run_on: ubuntu2204-small
- id: ubuntu-20.04
display_name: "Ubuntu 20.04"
run_on: ubuntu2004-small
variables:
DOCKER_DISTRO: ubuntu2204
- id: ubuntu-18.04
display_name: "Ubuntu 18.04"
run_on: ubuntu1804-small
- id: debian11
display_name: "Debian 11"
run_on: ubuntu2004-small
variables:
DOCKER_DISTRO: debian11
run_on: debian11-small
- id: rhel80
display_name: "RHEL 8.0"
run_on: ubuntu2004-small
variables:
DOCKER_DISTRO: rhel80
run_on: rhel80-small

- id: "driver"
display_name: Driver Version
Expand Down Expand Up @@ -233,3 +233,22 @@ axes:
variables:
APP_TESTS: yes

- id: toolchain
display_name: Toolchain Version
values:
- id: 2023-05-11
display_name: 2023-05-11
variables:
TOOLCHAIN_OVERRIDE: e8c60866f54bed7e336a37df3a97d6ae1b971b7d
- id: 2023-11-02
display_name: 2023-11-02
variables:
TOOLCHAIN_OVERRIDE: ded7ea845b08cf96f11a747d9540ba3199580dea
- id: 2024-08-07
display_name: 2024-08-07
variables:
TOOLCHAIN_OVERRIDE: c950fe1e85fd7d5e4ea69cc2afff456825583716
- id: 2024-09-06
display_name: 2024-09-06
variables:
TOOLCHAIN_OVERRIDE: deefab59d8f539bdd4a0154505f1e7d39a0857d0
27 changes: 26 additions & 1 deletion .evergreen/config/commands.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ functions:

git submodule update --init --recursive

if [ ! -d .mod ]; then
mkdir -p .mod
cd .mod
git clone https://github.com/mongodb-labs/drivers-evergreen-tools
fi

"fetch egos":
- command: shell.exec
params:
Expand All @@ -35,7 +41,7 @@ functions:
CURRENT_VERSION=latest
fi

export DRIVERS_TOOLS="$(pwd)/../drivers-tools"
export DRIVERS_TOOLS="$(pwd)/.mod/drivers-evergreen-tools"

export MONGO_ORCHESTRATION_HOME="$DRIVERS_TOOLS/.evergreen/orchestration"
export MONGODB_BINARIES="$DRIVERS_TOOLS/mongodb/bin"
Expand Down Expand Up @@ -69,6 +75,15 @@ functions:
export SSL=${SSL}
export APP_TESTS=${APP_TESTS}
export DOCKER_DISTRO=${DOCKER_DISTRO}

export MONGODB_URI="${MONGODB_URI}"
export RVM_RUBY="${RVM_RUBY}"
export RAILS="${RAILS}"
export DRIVER="${DRIVER}"
export I18N="${I18N}"
export TEST_I18N_FALLBACKS="${TEST_I18N_FALLBACKS}"
export FLE="${FLE}"
export TOOLCHAIN_OVERRIDE="${TOOLCHAIN_OVERRIDE}"
EOT
# See what we've done
cat expansion.yml
Expand Down Expand Up @@ -241,6 +256,16 @@ functions:
file: ./src/tmp/rspec.xml

"run tests":
- command: shell.exec
type: test
params:
shell: bash
working_dir: "src"
script: |
${PREPARE_SHELL}
.evergreen/run-tests.sh

"run tests in docker":
- command: shell.exec
type: test
params:
Expand Down
11 changes: 6 additions & 5 deletions .evergreen/config/variants.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildvariants:
driver: ["current"]
topology: '*'
mongodb-version: ['latest']
os: debian11
os: ubuntu-22.04
display_name: "${ruby}, ${driver}, ${mongodb-version}, ${topology}"
tasks:
- name: "test"
Expand Down Expand Up @@ -184,13 +184,13 @@ buildvariants:

- matrix_name: app-tests-ruby-3
matrix_spec:
ruby: ["ruby-3.0", "ruby-3.1"]
ruby: "ruby-3.1"
driver: ["current"]
mongodb-version: '6.0'
topology: standalone
app-tests: yes
rails: ['6.0', '6.1', '7.0', '7.1']
os: rhel80
os: ubuntu-22.04
display_name: "app tests ${driver}, ${ruby}, ${rails}"
tasks:
- name: "test"
Expand All @@ -203,7 +203,8 @@ buildvariants:
topology: standalone
app-tests: yes
rails: ['5.2']
os: rhel80
os: ubuntu-20.04
toolchain: 2024-09-06
display_name: "app tests ${driver}, ${ruby}, ${rails}"
tasks:
- name: "test"
Expand All @@ -216,7 +217,7 @@ buildvariants:
topology: standalone
app-tests: yes
rails: ['6.0']
os: ubuntu-22.04
os: ubuntu-18.04
display_name: "app tests ${driver}, ${jruby}"
tasks:
- name: "test"
Expand Down
7 changes: 7 additions & 0 deletions .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ set -o errexit # Exit the script with error if any of the commands fail
. `dirname "$0"`/../spec/shared/shlib/server.sh
. `dirname "$0"`/functions.sh

# set_env.sh sets the TOOLCHAIN_VERSION variable to a default value based on
# the version spec/shared that's available. Here, we let the evergreen task
# override it, if necessary, to get a newer or older toolchain build.
if [ -n "$TOOLCHAIN_OVERRIDE" ]; then
TOOLCHAIN_VERSION=$TOOLCHAIN_OVERRIDE
fi

arch=`host_distro`

set_fcv
Expand Down
26 changes: 26 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,29 @@ namespace :docs do
system "yardoc -o #{out} --title mongoid-#{Mongoid::VERSION}"
end
end

desc 'Build and validate the evergreen config'
task eg: %w[ eg:build eg:validate ]

# 'eg' == 'evergreen', but evergreen is too many letters for convenience
namespace :eg do
desc 'Builds the .evergreen/config.yml file from the templates'
task :build do
ruby '.evergreen/update-evergreen-configs'
end

desc 'Validates the .evergreen/config.yml file'
task :validate do
system 'evergreen validate --project mongoid .evergreen/config.yml'
end

desc 'Updates the evergreen executable to the latest available version'
task :update do
system 'evergreen get-update --install'
end

desc 'Runs the current branch as an evergreen patch'
task :patch do
system 'evergreen patch --uncommitted --project mongoid --browse --auto-description --yes'
end
end
10 changes: 10 additions & 0 deletions gemfiles/standard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ def standard_dependencies
gem 'fuubar'
gem 'rfc'
gem 'childprocess'
gem 'puma' # for app tests

# to fix problem with modern net-imap requiring more modern ruby, on
# evergreen
if RUBY_VERSION < '2.7.3'
gem 'net-imap', '=0.3.7'

elsif RUBY_VERSION < '3.1'
gem 'net-imap', '=0.4.18'
end

platform :mri do
gem 'timeout-interrupt'
Expand Down

0 comments on commit 786734e

Please sign in to comment.