Skip to content

Commit e440128

Browse files
committed
chore: update evergreen to filter with install
1 parent 6ffb9ad commit e440128

File tree

3 files changed

+47
-2
lines changed

3 files changed

+47
-2
lines changed

.evergreen.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ functions:
163163
DISTRO_ID: ${distro_id}
164164
MONOGDB_DRIVER_VERSION_OVERRIDE: ${mongodb_driver_version_override}
165165
PUPPETEER_SKIP_DOWNLOAD: ${puppeteer_skip_download|true}
166+
MONGOSH_INSTALL_WORKSPACE: ${mongosh_install_workspace|}
166167
script: |
167168
set -e
168169
set -x
@@ -5549,6 +5550,7 @@ tasks:
55495550
- func: install
55505551
vars:
55515552
node_js_version: ${node_js_version}
5553+
mongosh_install_workspace: "@mongosh/arg-parser"
55525554
- func: test
55535555
vars:
55545556
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5568,6 +5570,7 @@ tasks:
55685570
- func: install
55695571
vars:
55705572
node_js_version: ${node_js_version}
5573+
mongosh_install_workspace: "@mongosh/async-rewriter2"
55715574
- func: test
55725575
vars:
55735576
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5587,6 +5590,7 @@ tasks:
55875590
- func: install
55885591
vars:
55895592
node_js_version: ${node_js_version}
5593+
mongosh_install_workspace: "@mongosh/autocomplete"
55905594
- func: test
55915595
vars:
55925596
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5606,6 +5610,7 @@ tasks:
56065610
- func: install
56075611
vars:
56085612
node_js_version: ${node_js_version}
5613+
mongosh_install_workspace: "@mongosh/browser-repl"
56095614
- func: test
56105615
vars:
56115616
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5625,6 +5630,7 @@ tasks:
56255630
- func: install
56265631
vars:
56275632
node_js_version: ${node_js_version}
5633+
mongosh_install_workspace: "@mongosh/browser-runtime-core"
56285634
- func: test
56295635
vars:
56305636
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5644,6 +5650,7 @@ tasks:
56445650
- func: install
56455651
vars:
56465652
node_js_version: ${node_js_version}
5653+
mongosh_install_workspace: "@mongosh/browser-runtime-electron"
56475654
- func: test
56485655
vars:
56495656
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5663,6 +5670,7 @@ tasks:
56635670
- func: install
56645671
vars:
56655672
node_js_version: ${node_js_version}
5673+
mongosh_install_workspace: "@mongosh/build"
56665674
- func: test
56675675
vars:
56685676
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5682,6 +5690,7 @@ tasks:
56825690
- func: install
56835691
vars:
56845692
node_js_version: ${node_js_version}
5693+
mongosh_install_workspace: "@mongosh/cli-repl"
56855694
- func: test
56865695
vars:
56875696
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5701,6 +5710,7 @@ tasks:
57015710
- func: install
57025711
vars:
57035712
node_js_version: ${node_js_version}
5713+
mongosh_install_workspace: "@mongosh/connectivity-tests"
57045714
- func: test
57055715
vars:
57065716
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5720,6 +5730,7 @@ tasks:
57205730
- func: install
57215731
vars:
57225732
node_js_version: ${node_js_version}
5733+
mongosh_install_workspace: "@mongosh/e2e-tests"
57235734
- func: test
57245735
vars:
57255736
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5739,6 +5750,7 @@ tasks:
57395750
- func: install
57405751
vars:
57415752
node_js_version: ${node_js_version}
5753+
mongosh_install_workspace: "@mongosh/editor"
57425754
- func: test
57435755
vars:
57445756
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5758,6 +5770,7 @@ tasks:
57585770
- func: install
57595771
vars:
57605772
node_js_version: ${node_js_version}
5773+
mongosh_install_workspace: "@mongosh/errors"
57615774
- func: test
57625775
vars:
57635776
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5777,6 +5790,7 @@ tasks:
57775790
- func: install
57785791
vars:
57795792
node_js_version: ${node_js_version}
5793+
mongosh_install_workspace: "@mongosh/history"
57805794
- func: test
57815795
vars:
57825796
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5796,6 +5810,7 @@ tasks:
57965810
- func: install
57975811
vars:
57985812
node_js_version: ${node_js_version}
5813+
mongosh_install_workspace: "@mongosh/i18n"
57995814
- func: test
58005815
vars:
58015816
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5815,6 +5830,7 @@ tasks:
58155830
- func: install
58165831
vars:
58175832
node_js_version: ${node_js_version}
5833+
mongosh_install_workspace: "@mongosh/java-shell"
58185834
- func: test
58195835
vars:
58205836
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5834,6 +5850,7 @@ tasks:
58345850
- func: install
58355851
vars:
58365852
node_js_version: ${node_js_version}
5853+
mongosh_install_workspace: "@mongosh/js-multiline-to-singleline"
58375854
- func: test
58385855
vars:
58395856
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5853,6 +5870,7 @@ tasks:
58535870
- func: install
58545871
vars:
58555872
node_js_version: ${node_js_version}
5873+
mongosh_install_workspace: "@mongosh/logging"
58565874
- func: test
58575875
vars:
58585876
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5872,6 +5890,7 @@ tasks:
58725890
- func: install
58735891
vars:
58745892
node_js_version: ${node_js_version}
5893+
mongosh_install_workspace: "@mongosh/mongosh"
58755894
- func: test
58765895
vars:
58775896
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5891,6 +5910,7 @@ tasks:
58915910
- func: install
58925911
vars:
58935912
node_js_version: ${node_js_version}
5913+
mongosh_install_workspace: "@mongosh/node-runtime-worker-thread"
58945914
- func: test
58955915
vars:
58965916
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5910,6 +5930,7 @@ tasks:
59105930
- func: install
59115931
vars:
59125932
node_js_version: ${node_js_version}
5933+
mongosh_install_workspace: "@mongosh/service-provider-core"
59135934
- func: test
59145935
vars:
59155936
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5929,6 +5950,7 @@ tasks:
59295950
- func: install
59305951
vars:
59315952
node_js_version: ${node_js_version}
5953+
mongosh_install_workspace: "@mongosh/service-provider-node-driver"
59325954
- func: test
59335955
vars:
59345956
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5948,6 +5970,7 @@ tasks:
59485970
- func: install
59495971
vars:
59505972
node_js_version: ${node_js_version}
5973+
mongosh_install_workspace: "@mongosh/shell-api"
59515974
- func: test
59525975
vars:
59535976
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5967,6 +5990,7 @@ tasks:
59675990
- func: install
59685991
vars:
59695992
node_js_version: ${node_js_version}
5993+
mongosh_install_workspace: "@mongosh/shell-bson"
59705994
- func: test
59715995
vars:
59725996
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -5986,6 +6010,7 @@ tasks:
59866010
- func: install
59876011
vars:
59886012
node_js_version: ${node_js_version}
6013+
mongosh_install_workspace: "@mongosh/shell-evaluator"
59896014
- func: test
59906015
vars:
59916016
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -6005,6 +6030,7 @@ tasks:
60056030
- func: install
60066031
vars:
60076032
node_js_version: ${node_js_version}
6033+
mongosh_install_workspace: "@mongosh/snippet-manager"
60086034
- func: test
60096035
vars:
60106036
mongosh_server_test_version: ${mongosh_server_test_version}
@@ -6024,6 +6050,7 @@ tasks:
60246050
- func: install
60256051
vars:
60266052
node_js_version: ${node_js_version}
6053+
mongosh_install_workspace: "@mongosh/types"
60276054
- func: test
60286055
vars:
60296056
mongosh_server_test_version: ${mongosh_server_test_version}

.evergreen/evergreen.yml.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ functions:
172172
DISTRO_ID: ${distro_id}
173173
MONOGDB_DRIVER_VERSION_OVERRIDE: ${mongodb_driver_version_override}
174174
PUPPETEER_SKIP_DOWNLOAD: ${puppeteer_skip_download|true}
175+
MONGOSH_INSTALL_WORKSPACE: ${mongosh_install_workspace|}
175176
script: |
176177
set -e
177178
set -x
@@ -1166,6 +1167,7 @@ tasks:
11661167
- func: install
11671168
vars:
11681169
node_js_version: ${node_js_version}
1170+
mongosh_install_workspace: "@mongosh/<% out(packageName) %>"
11691171
- func: test
11701172
vars:
11711173
mongosh_server_test_version: ${mongosh_server_test_version}

.evergreen/install-npm-deps.sh

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ export BASEDIR="$PWD/.evergreen"
55

66
. "$BASEDIR/setup-env.sh"
77

8-
npm ci --verbose
8+
# If MONGOSH_INSTALL_WORKSPACE is set, install only that workspace
9+
if [[ -n "$MONGOSH_INSTALL_WORKSPACE" ]]; then
10+
echo "Installing workspace: $MONGOSH_INSTALL_WORKSPACE"
11+
npm ci -w "$MONGOSH_INSTALL_WORKSPACE" --include-workspace-root --verbose
12+
else
13+
npm ci --verbose
14+
fi
915
echo "MONOGDB_DRIVER_VERSION_OVERRIDE:$MONOGDB_DRIVER_VERSION_OVERRIDE"
1016

1117
# if MONOGDB_DRIVER_VERSION_OVERRIDE is set, then we want to replace the package version
@@ -28,7 +34,17 @@ npm run mark-ci-required-optional-dependencies
2834
# mongodb-client-encryption failed to install (it can't install on some
2935
# platforms), then install again ignoring scripts so that the package installs
3036
# along with its types, but npm wouldn't try and compile the addon
31-
(npm ci && test -e node_modules/mongodb-client-encryption) || npm ci --ignore-scripts
37+
if [[ -n "$MONGOSH_INSTALL_WORKSPACE" ]]; then
38+
# Check if the workspace or root actually depends on mongodb-client-encryption
39+
if npm ls --workspace "$MONGOSH_INSTALL_WORKSPACE" --depth=1 mongodb-client-encryption > /dev/null 2>&1; then
40+
echo "Workspace or root depends on mongodb-client-encryption, retrying install with optional deps..."
41+
(npm ci -w "$MONGOSH_INSTALL_WORKSPACE" --include-workspace-root && test -e node_modules/mongodb-client-encryption) || npm ci -w "$MONGOSH_INSTALL_WORKSPACE" --include-workspace-root --ignore-scripts
42+
else
43+
echo "Workspace does not depend on mongodb-client-encryption, skipping optional deps reinstall"
44+
fi
45+
else
46+
(npm ci && test -e node_modules/mongodb-client-encryption) || npm ci --ignore-scripts
47+
fi
3248

3349
echo "npm packages after installation"
3450
npm ls || true

0 commit comments

Comments
 (0)