Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ functions:
NODE_JS_VERSION: ${node_js_version}
DISTRO_ID: ${distro_id}
MONOGDB_DRIVER_VERSION_OVERRIDE: ${mongodb_driver_version_override}
PUPPETEER_SKIP_DOWNLOAD: "true"
script: |
set -e
set -x
Expand Down Expand Up @@ -161,6 +162,7 @@ functions:
NODE_JS_VERSION: ${node_js_version}
DISTRO_ID: ${distro_id}
MONOGDB_DRIVER_VERSION_OVERRIDE: ${mongodb_driver_version_override}
PUPPETEER_SKIP_DOWNLOAD: ${puppeteer_skip_download|true}
script: |
set -e
set -x
Expand Down Expand Up @@ -4308,7 +4310,6 @@ functions:
{
export NODE_JS_VERSION=${node_js_version}
source .evergreen/setup-env.sh
export PUPPETEER_SKIP_DOWNLOAD="true"
npm run evergreen-release draft
git add .
git commit --no-allow-empty -m "chore(release): bump to prepare for mongosh release"
Expand All @@ -4328,7 +4329,6 @@ functions:
node_js_version: ${node_js_version}
script: |
set -e
export PUPPETEER_SKIP_DOWNLOAD="true"
.evergreen/run-evergreen-release.sh download-and-list-artifacts
- command: shell.exec
params:
Expand Down Expand Up @@ -4357,7 +4357,6 @@ functions:
node_js_version: ${node_js_version}
script: |
set -e
export PUPPETEER_SKIP_DOWNLOAD="true"
.evergreen/run-evergreen-release.sh publish -- --dry-run

release_publish:
Expand All @@ -4376,7 +4375,6 @@ functions:
node_js_version: ${node_js_version}
script: |
set -e
export PUPPETEER_SKIP_DOWNLOAD="true"
.evergreen/run-evergreen-release.sh publish

run_perf_tests:
Expand Down Expand Up @@ -4943,6 +4941,7 @@ tasks:
mongosh_test_id: "arg_parser"
mongosh_run_only_in_package: "arg-parser"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_async_rewriter2
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -4961,6 +4960,7 @@ tasks:
mongosh_test_id: "async_rewriter2"
mongosh_run_only_in_package: "async-rewriter2"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_autocomplete
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -4979,6 +4979,7 @@ tasks:
mongosh_test_id: "autocomplete"
mongosh_run_only_in_package: "autocomplete"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_browser_repl
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -4997,6 +4998,7 @@ tasks:
mongosh_test_id: "browser_repl"
mongosh_run_only_in_package: "browser-repl"
task_name: ${task_name}
puppeteer_skip_download: "false"
- name: test_browser_runtime_core
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5015,6 +5017,7 @@ tasks:
mongosh_test_id: "browser_runtime_core"
mongosh_run_only_in_package: "browser-runtime-core"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_browser_runtime_electron
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5033,6 +5036,7 @@ tasks:
mongosh_test_id: "browser_runtime_electron"
mongosh_run_only_in_package: "browser-runtime-electron"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_build
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5051,6 +5055,7 @@ tasks:
mongosh_test_id: "build"
mongosh_run_only_in_package: "build"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_cli_repl
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5069,6 +5074,7 @@ tasks:
mongosh_test_id: "cli_repl"
mongosh_run_only_in_package: "cli-repl"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_connectivity_tests
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5087,6 +5093,7 @@ tasks:
mongosh_test_id: "connectivity_tests"
mongosh_run_only_in_package: "connectivity-tests"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_e2e_tests
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5105,6 +5112,7 @@ tasks:
mongosh_test_id: "e2e_tests"
mongosh_run_only_in_package: "e2e-tests"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_editor
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5123,6 +5131,7 @@ tasks:
mongosh_test_id: "editor"
mongosh_run_only_in_package: "editor"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_errors
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5141,6 +5150,7 @@ tasks:
mongosh_test_id: "errors"
mongosh_run_only_in_package: "errors"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_history
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5159,6 +5169,7 @@ tasks:
mongosh_test_id: "history"
mongosh_run_only_in_package: "history"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_i18n
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5177,6 +5188,7 @@ tasks:
mongosh_test_id: "i18n"
mongosh_run_only_in_package: "i18n"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_java_shell
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5195,6 +5207,7 @@ tasks:
mongosh_test_id: "java_shell"
mongosh_run_only_in_package: "java-shell"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_js_multiline_to_singleline
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5213,6 +5226,7 @@ tasks:
mongosh_test_id: "js_multiline_to_singleline"
mongosh_run_only_in_package: "js-multiline-to-singleline"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_logging
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5231,6 +5245,7 @@ tasks:
mongosh_test_id: "logging"
mongosh_run_only_in_package: "logging"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_mongosh
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5249,6 +5264,7 @@ tasks:
mongosh_test_id: "mongosh"
mongosh_run_only_in_package: "mongosh"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_node_runtime_worker_thread
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5267,6 +5283,7 @@ tasks:
mongosh_test_id: "node_runtime_worker_thread"
mongosh_run_only_in_package: "node-runtime-worker-thread"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_service_provider_core
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5285,6 +5302,7 @@ tasks:
mongosh_test_id: "service_provider_core"
mongosh_run_only_in_package: "service-provider-core"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_service_provider_node_driver
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5303,6 +5321,7 @@ tasks:
mongosh_test_id: "service_provider_node_driver"
mongosh_run_only_in_package: "service-provider-node-driver"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_shell_api
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5321,6 +5340,7 @@ tasks:
mongosh_test_id: "shell_api"
mongosh_run_only_in_package: "shell-api"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_shell_evaluator
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5339,6 +5359,7 @@ tasks:
mongosh_test_id: "shell_evaluator"
mongosh_run_only_in_package: "shell-evaluator"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_snippet_manager
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5357,6 +5378,7 @@ tasks:
mongosh_test_id: "snippet_manager"
mongosh_run_only_in_package: "snippet-manager"
task_name: ${task_name}
puppeteer_skip_download: "true"
- name: test_types
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -5375,6 +5397,7 @@ tasks:
mongosh_test_id: "types"
mongosh_run_only_in_package: "types"
task_name: ${task_name}
puppeteer_skip_download: "true"

###
# INTEGRATION TESTS
Expand Down
3 changes: 1 addition & 2 deletions .evergreen/compile-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ trap "rm -rf /tmp/m" EXIT
export TMP=/tmp/m
export TMPDIR=/tmp/m

if [ `uname` = Darwin ]; then
if [ $(uname) = Darwin ]; then
# match what Node.js 20 does on their own builder machines
export CFLAGS='-mmacosx-version-min=10.15'
export CXXFLAGS='-mmacosx-version-min=10.15'
Expand Down Expand Up @@ -76,7 +76,6 @@ elif [ -n "$MONGOSH_SHARED_OPENSSL" ]; then
export LD_LIBRARY_PATH=/opt/devtools/lib:/tmp/m/opt/lib
fi

export PUPPETEER_SKIP_DOWNLOAD="true"
npm run evergreen-release compile
dist/mongosh --version
dist/mongosh --build-info
Expand Down
9 changes: 4 additions & 5 deletions .evergreen/evergreen.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ functions:
NODE_JS_VERSION: ${node_js_version}
DISTRO_ID: ${distro_id}
MONOGDB_DRIVER_VERSION_OVERRIDE: ${mongodb_driver_version_override}
PUPPETEER_SKIP_DOWNLOAD: "true"
script: |
set -e
set -x
Expand Down Expand Up @@ -170,6 +171,7 @@ functions:
NODE_JS_VERSION: ${node_js_version}
DISTRO_ID: ${distro_id}
MONOGDB_DRIVER_VERSION_OVERRIDE: ${mongodb_driver_version_override}
PUPPETEER_SKIP_DOWNLOAD: ${puppeteer_skip_download|true}
script: |
set -e
set -x
Expand Down Expand Up @@ -953,7 +955,6 @@ functions:
{
export NODE_JS_VERSION=${node_js_version}
source .evergreen/setup-env.sh
export PUPPETEER_SKIP_DOWNLOAD="true"
npm run evergreen-release draft
git add .
git commit --no-allow-empty -m "chore(release): bump to prepare for mongosh release"
Expand All @@ -973,7 +974,6 @@ functions:
node_js_version: ${node_js_version}
script: |
set -e
export PUPPETEER_SKIP_DOWNLOAD="true"
.evergreen/run-evergreen-release.sh download-and-list-artifacts
- command: shell.exec
params:
Expand Down Expand Up @@ -1002,7 +1002,6 @@ functions:
node_js_version: ${node_js_version}
script: |
set -e
export PUPPETEER_SKIP_DOWNLOAD="true"
.evergreen/run-evergreen-release.sh publish -- --dry-run

release_publish:
Expand All @@ -1021,7 +1020,6 @@ functions:
node_js_version: ${node_js_version}
script: |
set -e
export PUPPETEER_SKIP_DOWNLOAD="true"
.evergreen/run-evergreen-release.sh publish

run_perf_tests:
Expand Down Expand Up @@ -1101,7 +1099,7 @@ tasks:
# UNIT TESTS
# E.g. test_m60xc_n20 stands for mongod 6.0.x, community edition, Node.js 20
###
<% for (const { id, packageName } of UNIT_TESTS) { %>
<% for (const { id, packageName, usePuppeteer } of UNIT_TESTS) { %>
- name: test_<% out(id) %>
tags: ["assigned_to_jira_team_mongosh_mongosh","unit-test"]
depends_on:
Expand All @@ -1120,6 +1118,7 @@ tasks:
mongosh_test_id: "<% out(id) %>"
mongosh_run_only_in_package: "<% out(packageName) %>"
task_name: ${task_name}
puppeteer_skip_download: "<% out(usePuppeteer ? "false" : "true") %>"
<% } %>

###
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/package-and-upload-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ "$(uname)" == Linux ]; then
cp "$(pwd)/../tmp/expansions.yaml" tmp/expansions.yaml
(cd scripts/docker && bash "$BASEDIR/retry-with-backoff.sh" docker build -t rocky8-package -f rocky8-package.Dockerfile .)
echo Starting Docker container packaging
docker run -e PUPPETEER_SKIP_DOWNLOAD \
docker run \
-e EVERGREEN_EXPANSIONS_PATH=/tmp/build/tmp/expansions.yaml \
-e NODE_JS_VERSION \
-e PACKAGE_VARIANT \
Expand Down
3 changes: 1 addition & 2 deletions .evergreen/run-evergreen-release.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#! /usr/bin/env bash
set -e

echo "//registry.npmjs.org/:_authToken=${devtoolsbot_npm_token}" > .npmrc
echo "//registry.npmjs.org/:_authToken=${devtoolsbot_npm_token}" >.npmrc
set -x
export NODE_JS_VERSION=${node_js_version}
source .evergreen/setup-env.sh
export PUPPETEER_SKIP_DOWNLOAD="true"
npm run evergreen-release $@
3 changes: 2 additions & 1 deletion .evergreen/tasks/unit-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ for (const packageInfo of MONGOSH_PACKAGES) {
UNIT_TESTS.push({
id,
packageName: packageInfo.name,
unitTestsOnly: packageInfo.unitTestsOnly,
unitTestsOnly: packageInfo.unitTestsOnly || false,
usePuppeteer: packageInfo.usePuppeteer || false,
variants,
});
}
Expand Down
1 change: 1 addition & 0 deletions packages/browser-repl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
},
"mongosh": {
"unitTestsOnly": true,
"usePuppeteer": true,
"variants": [
"darwin"
]
Expand Down
4 changes: 4 additions & 0 deletions packages/build/src/npm-packages/bump.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ export class PackageBumper {
stdio: 'inherit',
cwd: monorepoRootPath,
encoding: 'utf8',
env: {
...process.env,
PUPPETEER_SKIP_DOWNLOAD: 'true',
},
});
}

Expand Down
Loading