Skip to content

Commit

Permalink
Merge branch 'main' into ni/new-distros
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
nirinchev committed Oct 25, 2024
2 parents 45995e6 + 06916e5 commit 5d75866
Show file tree
Hide file tree
Showing 76 changed files with 1,918 additions and 1,207 deletions.
978 changes: 643 additions & 335 deletions .evergreen.yml

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion .evergreen/evergreen.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ post:
visibility: signed
content_type: application/x-gzip
optional: true
- command: attach.xunit_results
params:
file: src/.logs/*.xml


# Functions are any command that can be run.
Expand Down Expand Up @@ -264,6 +267,7 @@ functions:
MONGOSH_RUN_ONLY_IN_PACKAGE: ${mongosh_run_only_in_package}
AWS_AUTH_IAM_ACCESS_KEY_ID: ${devtools_ci_aws_key}
AWS_AUTH_IAM_SECRET_ACCESS_KEY: ${devtools_ci_aws_secret}
TASK_NAME: ${task_name}
- command: s3.put
params:
aws_key: ${aws_key}
Expand Down Expand Up @@ -517,7 +521,7 @@ functions:
AWS_AUTH_IAM_ACCESS_KEY_ID: ${devtools_ci_aws_key}
AWS_AUTH_IAM_SECRET_ACCESS_KEY: ${devtools_ci_aws_secret}
DISABLE_OPENSSL_SHARED_CONFIG_FOR_BUNDLED_OPENSSL: ${disable_openssl_shared_config_for_bundled_openssl}
E2E_TASK_NAME: ${task_name}
TASK_NAME: ${task_name}

###
# PACKAGING AND UPLOADING
Expand Down Expand Up @@ -1124,6 +1128,7 @@ tasks:
mongosh_skip_node_version_check: "<% out(skipNodeVersionCheck) %>"
mongosh_test_id: "<% out(id) %>"
mongosh_run_only_in_package: "<% out(packageName) %>"
task_name: ${task_name}
<% } %>

###
Expand All @@ -1141,6 +1146,7 @@ tasks:
- func: test_vscode
vars:
node_js_version: "<% out(NODE_JS_VERSION_20) %>"
task_name: ${task_name}
- name: test_connectivity
tags: ["extra-integration-test"]
depends_on:
Expand All @@ -1154,6 +1160,7 @@ tasks:
- func: test_connectivity
vars:
node_js_version: "<% out(NODE_JS_VERSION_20) %>"
task_name: ${task_name}
- name: test_apistrict
tags: ["extra-integration-test"]
depends_on:
Expand All @@ -1169,6 +1176,7 @@ tasks:
node_js_version: "<% out(NODE_JS_VERSION_20) %>"
mongosh_server_test_version: "latest-alpha-enterprise"
mongosh_test_force_api_strict: "1"
task_name: ${task_name}
- name: compile_artifact
tags: ["compile-artifact"]
depends_on:
Expand Down Expand Up @@ -1273,6 +1281,7 @@ tasks:
node_js_version: "<% out(NODE_JS_VERSION_20) %>"
test_mongosh_executable: dist/mongosh
kerberos_jumphost_dockerfile: "Dockerfile.<% out(dockerFile) %>"
task_name: ${task_name}
<% } } %>

###
Expand Down Expand Up @@ -1406,6 +1415,7 @@ tasks:
vars:
node_js_version: "<% out(NODE_JS_VERSION_20) %>"
dockerfile: <% out(dockerfile) %>
task_name: ${task_name}
<% }; break;
// We don't have docker for platforms other than x64, so for those we just
// extract the archives locally.
Expand Down
8 changes: 6 additions & 2 deletions .evergreen/install-npm-deps.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
set -e
set -x

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

npm ci --verbose
echo "MONOGDB_DRIVER_VERSION_OVERRIDE:$MONOGDB_DRIVER_VERSION_OVERRIDE"

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

echo "npm packages after installation"
npm ls || true
npm ls || true
3 changes: 2 additions & 1 deletion .evergreen/run-e2e-tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env bash
set -e
export NODE_JS_VERSION=${NODE_JS_VERSION}
export TASK_NAME=${TASK_NAME}

if [[ "$DISABLE_OPENSSL_SHARED_CONFIG_FOR_BUNDLED_OPENSSL" == "true" ]] && [[ ! "$E2E_TASK_NAME" =~ openssl(3|11) ]]; then
if [[ "$DISABLE_OPENSSL_SHARED_CONFIG_FOR_BUNDLED_OPENSSL" == "true" ]] && [[ ! "$TASK_NAME" =~ openssl(3|11) ]]; then
# On RHEL9 and based-distros, an additional configuration option
# `rh-allow-sha1-signatures` is present which is not recognizable to the
# OpenSSL version bundled with Node.js and hence the mongosh binary fails to
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ mongocryptd.pid
.sbom
.nvm
snapshot.blob
.logs/*
!.logs/empty.xml
3 changes: 3 additions & 0 deletions .logs/empty.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<!-- 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 -->
<testsuite name="empty" tests="0" failures="0" errors="0" skipped="0" timestamp="Fri, 18 Oct 2024 09:21:06 GMT" time="8.907">
</testsuite>
8 changes: 4 additions & 4 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The following third-party software is used by and included in **mongosh**.
This document was automatically generated on Sun Oct 20 2024.
This document was automatically generated on Fri Oct 25 2024.

## List of dependencies

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


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

License files:
Expand Down
31 changes: 31 additions & 0 deletions configs/mocha-config-mongosh/reporter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { reporters } from 'mocha';
import type { MochaOptions, Runner } from 'mocha';
import path from 'path';

// Import the built-in reporters
const Spec = reporters.Spec;
const XUnit = reporters.XUnit;

export class MochaReporter extends reporters.Base {
constructor(runner: Runner, options: MochaOptions) {
super(runner, options);
const suiteName = process.env.TASK_NAME ?? path.basename(process.cwd());

new Spec(runner);

runner.on('suite', (suite) => {
if (suite.parent?.root) {
suite.title = `${suiteName}__${suite.title}`;
}
});

new XUnit(runner, {
reporterOptions: {
suiteName,
output: path.join(__dirname, '..', '..', '.logs', `${suiteName}.xml`),
},
});
}
}

module.exports = MochaReporter;
Loading

0 comments on commit 5d75866

Please sign in to comment.