Skip to content

Commit 5d75866

Browse files
committed
Merge branch 'main' into ni/new-distros
* main: chore: update auto-generated files (#2237) feat(shell-api): add shardedDataDistribution to sh.status() MONGOSH-1326 (#2214) chore: update auto-generated files (#2235) feat(tests): Add individual evergreen test results with XUnit (#2227) chore: update auto-generated files (#2234) chore: rename service-provider-server and `CliServiceProvider` (#2232) chore: update auto-generated files (#2233) chore(deps): Add node-gyp version control across different distros MONGOSH-1891 (#2230) chore: update auto-generated files (#2231) fix(shell-api): Align database and collection aggregate functions MONGOSH-1868 (#2229)
2 parents 45995e6 + 06916e5 commit 5d75866

File tree

76 files changed

+1918
-1207
lines changed

Some content is hidden

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

76 files changed

+1918
-1207
lines changed

.evergreen.yml

Lines changed: 643 additions & 335 deletions
Large diffs are not rendered by default.

.evergreen/evergreen.yml.in

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ post:
130130
visibility: signed
131131
content_type: application/x-gzip
132132
optional: true
133+
- command: attach.xunit_results
134+
params:
135+
file: src/.logs/*.xml
133136

134137

135138
# Functions are any command that can be run.
@@ -264,6 +267,7 @@ functions:
264267
MONGOSH_RUN_ONLY_IN_PACKAGE: ${mongosh_run_only_in_package}
265268
AWS_AUTH_IAM_ACCESS_KEY_ID: ${devtools_ci_aws_key}
266269
AWS_AUTH_IAM_SECRET_ACCESS_KEY: ${devtools_ci_aws_secret}
270+
TASK_NAME: ${task_name}
267271
- command: s3.put
268272
params:
269273
aws_key: ${aws_key}
@@ -517,7 +521,7 @@ functions:
517521
AWS_AUTH_IAM_ACCESS_KEY_ID: ${devtools_ci_aws_key}
518522
AWS_AUTH_IAM_SECRET_ACCESS_KEY: ${devtools_ci_aws_secret}
519523
DISABLE_OPENSSL_SHARED_CONFIG_FOR_BUNDLED_OPENSSL: ${disable_openssl_shared_config_for_bundled_openssl}
520-
E2E_TASK_NAME: ${task_name}
524+
TASK_NAME: ${task_name}
521525

522526
###
523527
# PACKAGING AND UPLOADING
@@ -1124,6 +1128,7 @@ tasks:
11241128
mongosh_skip_node_version_check: "<% out(skipNodeVersionCheck) %>"
11251129
mongosh_test_id: "<% out(id) %>"
11261130
mongosh_run_only_in_package: "<% out(packageName) %>"
1131+
task_name: ${task_name}
11271132
<% } %>
11281133

11291134
###
@@ -1141,6 +1146,7 @@ tasks:
11411146
- func: test_vscode
11421147
vars:
11431148
node_js_version: "<% out(NODE_JS_VERSION_20) %>"
1149+
task_name: ${task_name}
11441150
- name: test_connectivity
11451151
tags: ["extra-integration-test"]
11461152
depends_on:
@@ -1154,6 +1160,7 @@ tasks:
11541160
- func: test_connectivity
11551161
vars:
11561162
node_js_version: "<% out(NODE_JS_VERSION_20) %>"
1163+
task_name: ${task_name}
11571164
- name: test_apistrict
11581165
tags: ["extra-integration-test"]
11591166
depends_on:
@@ -1169,6 +1176,7 @@ tasks:
11691176
node_js_version: "<% out(NODE_JS_VERSION_20) %>"
11701177
mongosh_server_test_version: "latest-alpha-enterprise"
11711178
mongosh_test_force_api_strict: "1"
1179+
task_name: ${task_name}
11721180
- name: compile_artifact
11731181
tags: ["compile-artifact"]
11741182
depends_on:
@@ -1273,6 +1281,7 @@ tasks:
12731281
node_js_version: "<% out(NODE_JS_VERSION_20) %>"
12741282
test_mongosh_executable: dist/mongosh
12751283
kerberos_jumphost_dockerfile: "Dockerfile.<% out(dockerFile) %>"
1284+
task_name: ${task_name}
12761285
<% } } %>
12771286

12781287
###
@@ -1406,6 +1415,7 @@ tasks:
14061415
vars:
14071416
node_js_version: "<% out(NODE_JS_VERSION_20) %>"
14081417
dockerfile: <% out(dockerfile) %>
1418+
task_name: ${task_name}
14091419
<% }; break;
14101420
// We don't have docker for platforms other than x64, so for those we just
14111421
// extract the archives locally.

.evergreen/install-npm-deps.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
set -e
22
set -x
33

4-
npm ci --verbose
4+
if [[ "${DISTRO_ID}" =~ ^(rhel|ubuntu1804) ]]; then
5+
# RHEL and Ubuntu 18.04 use Python 3.6 which isn't supported by newer node-gyp versions
6+
npm i node-gyp@9 --verbose --force
7+
fi
58

9+
npm ci --verbose
610
echo "MONOGDB_DRIVER_VERSION_OVERRIDE:$MONOGDB_DRIVER_VERSION_OVERRIDE"
711

812
# if MONOGDB_DRIVER_VERSION_OVERRIDE is set, then we want to replace the package version
@@ -30,4 +34,4 @@ npm run mark-ci-required-optional-dependencies
3034
npm run evergreen-release bump
3135

3236
echo "npm packages after installation"
33-
npm ls || true
37+
npm ls || true

.evergreen/run-e2e-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#!/usr/bin/env bash
22
set -e
33
export NODE_JS_VERSION=${NODE_JS_VERSION}
4+
export TASK_NAME=${TASK_NAME}
45

5-
if [[ "$DISABLE_OPENSSL_SHARED_CONFIG_FOR_BUNDLED_OPENSSL" == "true" ]] && [[ ! "$E2E_TASK_NAME" =~ openssl(3|11) ]]; then
6+
if [[ "$DISABLE_OPENSSL_SHARED_CONFIG_FOR_BUNDLED_OPENSSL" == "true" ]] && [[ ! "$TASK_NAME" =~ openssl(3|11) ]]; then
67
# On RHEL9 and based-distros, an additional configuration option
78
# `rh-allow-sha1-signatures` is present which is not recognizable to the
89
# OpenSSL version bundled with Node.js and hence the mongosh binary fails to

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ mongocryptd.pid
2626
.sbom
2727
.nvm
2828
snapshot.blob
29+
.logs/*
30+
!.logs/empty.xml

.logs/empty.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<!-- An empty test suite which is needed as not all tasks produce XUnit results and the current Evergreen setup always expects some file to be uploaded -->
2+
<testsuite name="empty" tests="0" failures="0" errors="0" skipped="0" timestamp="Fri, 18 Oct 2024 09:21:06 GMT" time="8.907">
3+
</testsuite>

THIRD_PARTY_NOTICES.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The following third-party software is used by and included in **mongosh**.
2-
This document was automatically generated on Sun Oct 20 2024.
2+
This document was automatically generated on Fri Oct 25 2024.
33

44
## List of dependencies
55

@@ -91,7 +91,7 @@ Package|Version|License
9191
**[@mongosh/js-multiline-to-singleline](#2dcbeb51aa76c387d04422e84b56be8b65a87471bf5be038ca68d82f13a5d839)**|0.0.0-dev.0|Apache-2.0
9292
**[@mongosh/logging](#a17a0e5de5551ca1d63cf325d510d17b6a0a1821718c63117a4dbccd2b1293e7)**|0.0.0-dev.0|Apache-2.0
9393
**[@mongosh/service-provider-core](#b179d40f2285db3339c362199a8bc0598efaff1c4c727364e26b21325764e981)**|0.0.0-dev.0|Apache-2.0
94-
**[@mongosh/service-provider-server](#b512a107cca2856de34b86ca46809ec1b31a5d964d47102efd920074c19a86c7)**|0.0.0-dev.0|Apache-2.0
94+
**[@mongosh/service-provider-node-driver](#48f5e5df1f8b3f9562c58f987046b55160319224cf59e0ced75ab2037ecf0de3)**|0.0.0-dev.0|Apache-2.0
9595
**[@mongosh/shell-api](#066d6484afa772c771ab73975e5fcac49bf481b96140400d853ecd0b2b9f3629)**|0.0.0-dev.0|Apache-2.0
9696
**[@mongosh/shell-evaluator](#f2b3f8a68c8c280f279921c6fe4cc918d362f7f44cc9b2c52a8e26b75a5b4bb5)**|0.0.0-dev.0|Apache-2.0
9797
**[@mongosh/snippet-manager](#006cfa776d20db3be61c3aa50333c13f27382e2b5a835f17fd767b3033ee8578)**|0.0.0-dev.0|Apache-2.0
@@ -9684,8 +9684,8 @@ License files:
96849684
limitations under the License.
96859685

96869686

9687-
<a id="b512a107cca2856de34b86ca46809ec1b31a5d964d47102efd920074c19a86c7"></a>
9688-
### [@mongosh/service-provider-server](https://www.npmjs.com/package/@mongosh/service-provider-server) (version 0.0.0-dev.0)
9687+
<a id="48f5e5df1f8b3f9562c58f987046b55160319224cf59e0ced75ab2037ecf0de3"></a>
9688+
### [@mongosh/service-provider-node-driver](https://www.npmjs.com/package/@mongosh/service-provider-node-driver) (version 0.0.0-dev.0)
96899689
License tags: Apache-2.0
96909690

96919691
License files:
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { reporters } from 'mocha';
2+
import type { MochaOptions, Runner } from 'mocha';
3+
import path from 'path';
4+
5+
// Import the built-in reporters
6+
const Spec = reporters.Spec;
7+
const XUnit = reporters.XUnit;
8+
9+
export class MochaReporter extends reporters.Base {
10+
constructor(runner: Runner, options: MochaOptions) {
11+
super(runner, options);
12+
const suiteName = process.env.TASK_NAME ?? path.basename(process.cwd());
13+
14+
new Spec(runner);
15+
16+
runner.on('suite', (suite) => {
17+
if (suite.parent?.root) {
18+
suite.title = `${suiteName}__${suite.title}`;
19+
}
20+
});
21+
22+
new XUnit(runner, {
23+
reporterOptions: {
24+
suiteName,
25+
output: path.join(__dirname, '..', '..', '.logs', `${suiteName}.xml`),
26+
},
27+
});
28+
}
29+
}
30+
31+
module.exports = MochaReporter;

0 commit comments

Comments
 (0)