Skip to content

Commit 9a88293

Browse files
Merge remote-tracking branch 'origin/beta-releases' into ga-releases
2 parents ed25a79 + ef918da commit 9a88293

File tree

319 files changed

+13918
-13025
lines changed

Some content is hidden

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

319 files changed

+13918
-13025
lines changed

.depalignrc.json

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,17 @@
11
{
22
"ignore": {
3-
"debug": [
4-
"^2.2.0",
5-
"^4.2.0",
6-
"^4.3.1"
7-
],
8-
"semver": [
9-
"^5.7.2",
10-
"^7.6.0"
11-
],
12-
"eslint-config-mongodb-js": [
13-
"^5.0.3",
14-
"^2.2.0",
15-
"^3.0.1",
16-
"^2.1.0"
17-
],
183
"chai": [
194
"^4.1.2",
205
"^4.2.0",
21-
"^3.4.1",
22-
"^3.5.0",
236
"^4.3.4"
247
],
258
"sinon": [
269
"^9.0.0",
27-
"^1.17.6",
2810
"^7.2.7",
2911
"^9.0.2",
3012
"^9.2.3",
3113
"^8.1.1"
3214
],
33-
"uuid": [
34-
"^3.1.0",
35-
"^3.3.3",
36-
"^8.2.0",
37-
"^3.3.2",
38-
"^3.0.0"
39-
],
40-
"fs-extra": [
41-
"^8.1.0",
42-
"^9.1.0"
43-
],
4415
"numeral": [
4516
"^1.5.6"
4617
],
@@ -55,9 +26,6 @@
5526
],
5627
"js-yaml": [
5728
"^3.13.1"
58-
],
59-
"bson": [
60-
"^4.4.1"
6129
]
6230
}
6331
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#! /usr/bin/env bash
2+
3+
set -e
4+
set -x
5+
6+
if [[ "${EVERGREEN_PROJECT}" != "10gen-compass-main" ]]; then
7+
echo "Trying to publish main compass (dev build) from ${EVERGREEN_PROJECT} project. Skipping...";
8+
exit 0;
9+
fi
10+
11+
if [[ "${EVERGREEN_BRANCH_NAME}" != "main" ]]; then
12+
echo "Trying to publish main compass (dev build) from ${EVERGREEN_BRANCH_NAME} branch. Skipping...";
13+
exit 0;
14+
fi
15+
16+
JSON_CONTENT=$( jq -n \
17+
--arg id "$DEV_VERSION_IDENTIFIER" \
18+
--arg key "${EVERGREEN_REVISION}_${EVERGREEN_REVISION_ORDER_ID}" \
19+
'{version: $id, bucket_key_prefix: $key}'
20+
)
21+
22+
URL="https://mciuploads.s3.amazonaws.com/${EVERGREEN_PROJECT}/compass/dev/$1"
23+
DATA=$(curl -sf "${URL}" || echo "$JSON_CONTENT")
24+
CURRENT_VERSION=$(echo "$DATA" | jq -r '.version')
25+
26+
echo "Comparing versions: $CURRENT_VERSION and $DEV_VERSION_IDENTIFIER"
27+
LATEST_VERSION=$(npx semver "$CURRENT_VERSION" "$DEV_VERSION_IDENTIFIER" | tail -n1 | xargs)
28+
29+
if [[ "$LATEST_VERSION" == "$CURRENT_VERSION" ]]; then
30+
echo "Skipping publishing dev release, version $DEV_VERSION_IDENTIFIER is not newer than $CURRENT_VERSION"
31+
exit 0
32+
fi
33+
34+
echo "$JSON_CONTENT" > "$1"

.evergreen/buildvariants.in.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ buildvariants:
1717
tasks:
1818
- name: publish
1919
- name: publish-packages-next
20+
- name: publish-dev-release-info
2021

2122
- name: ubuntu_connectivity_tests
2223
display_name: Connectivity Tests

.evergreen/buildvariants.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ buildvariants:
1717
tasks:
1818
- name: publish
1919
- name: publish-packages-next
20+
- name: publish-dev-release-info
2021

2122
- name: ubuntu_connectivity_tests
2223
display_name: Connectivity Tests
@@ -87,6 +88,12 @@ buildvariants:
8788
- name: test-packaged-app-70x-enterprise
8889
depends_on: package-compass
8990

91+
- name: test-packaged-app-80x-community
92+
depends_on: package-compass
93+
94+
- name: test-packaged-app-80x-enterprise
95+
depends_on: package-compass
96+
9097
- name: test-packaged-app-latest
9198
depends_on: package-compass
9299

@@ -146,6 +153,12 @@ buildvariants:
146153
- name: test-packaged-app-70x-enterprise
147154
depends_on: package-compass
148155

156+
- name: test-packaged-app-80x-community
157+
depends_on: package-compass
158+
159+
- name: test-packaged-app-80x-enterprise
160+
depends_on: package-compass
161+
149162
- name: test-packaged-app-latest
150163
depends_on: package-compass
151164

@@ -201,6 +214,12 @@ buildvariants:
201214
- name: test-packaged-app-70x-enterprise
202215
depends_on: package-compass
203216

217+
- name: test-packaged-app-80x-community
218+
depends_on: package-compass
219+
220+
- name: test-packaged-app-80x-enterprise
221+
depends_on: package-compass
222+
204223
- name: macos
205224
display_name: MacOS x64 11.00 (Test and Package)
206225
run_on: macos-1100
@@ -234,6 +253,14 @@ buildvariants:
234253
run_on: macos-1100-gui
235254
depends_on: package-compass
236255

256+
- name: test-packaged-app-80x-community
257+
run_on: macos-1100-gui
258+
depends_on: package-compass
259+
260+
- name: test-packaged-app-80x-enterprise
261+
run_on: macos-1100-gui
262+
depends_on: package-compass
263+
237264
- name: macos-arm
238265
display_name: MacOS arm64 11.00 (Test and Package)
239266
run_on: macos-1100-arm64
@@ -266,3 +293,11 @@ buildvariants:
266293
- name: test-packaged-app-70x-enterprise
267294
run_on: macos-1100-arm64-gui
268295
depends_on: package-compass
296+
297+
- name: test-packaged-app-80x-community
298+
run_on: macos-1100-arm64-gui
299+
depends_on: package-compass
300+
301+
- name: test-packaged-app-80x-enterprise
302+
run_on: macos-1100-arm64-gui
303+
depends_on: package-compass

.evergreen/compass_package.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
#! /usr/bin/env bash
2-
32
set -e
3+
set -x
44

55
if [[ "$OSTYPE" == "cygwin" ]]; then
66
echo "Starting Installer Service..."
77
net start MSIServer
88
fi
99

10+
# Ensure .sbom is always created with fresh data
11+
rm -rvf .sbom && mkdir -pv .sbom
12+
1013
echo "Creating signed release build..."
1114
npm run package-compass $COMPASS_DISTRIBUTION;
1215

.evergreen/config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,18 @@
131131
"mongodb_version": "7.0.x-enterprise"
132132
}
133133
},
134+
{
135+
"name": "80x-community",
136+
"vars": {
137+
"mongodb_version": ">= 8.0.0-rc4"
138+
}
139+
},
140+
{
141+
"name": "80x-enterprise",
142+
"vars": {
143+
"mongodb_version": ">= 8.0.0-rc4-enterprise"
144+
}
145+
},
134146
{
135147
"name": "latest",
136148
"vars": {

.evergreen/create-sbom.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#! /usr/bin/env bash
2+
set -e
3+
set -x
4+
5+
# create SBOM
6+
CRYPT_SHARED_VERSION=$(cat packages/compass/src/deps/csfle/version)
7+
8+
set +x
9+
echo "${ARTIFACTORY_PASSWORD}" > /tmp/artifactory_password
10+
set -x
11+
12+
trap_handler() {
13+
rm -f /tmp/artifactory_password
14+
}
15+
trap trap_handler ERR EXIT
16+
17+
scp -i "$SIGNING_SERVER_PRIVATE_KEY_CYGPATH" -P "$SIGNING_SERVER_PORT" .sbom/dependencies.json /tmp/artifactory_password "$SIGNING_SERVER_USERNAME"@"$SIGNING_SERVER_HOSTNAME":/tmp/
18+
ssh -i "$SIGNING_SERVER_PRIVATE_KEY_CYGPATH" -p "$SIGNING_SERVER_PORT" "$SIGNING_SERVER_USERNAME"@"$SIGNING_SERVER_HOSTNAME" \
19+
"(cat /tmp/dependencies.json | jq -r '.[] | "'"pkg:npm/" + .name + "@" + .version'"' > /tmp/purls.txt) && \
20+
echo "pkg:generic/mongo_crypt_shared@${CRYPT_SHARED_VERSION}" >> /tmp/purls.txt && \
21+
(cat /tmp/artifactory_password | docker login artifactory.corp.mongodb.com --username '${ARTIFACTORY_USERNAME}' --password-stdin ; rm -f /tmp/artifactor_password ) && \
22+
docker pull artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:1.0 && \
23+
docker run --rm -v /tmp:/tmp artifactory.corp.mongodb.com/release-tools-container-registry-public-local/silkbomb:1.0 update \
24+
--purls /tmp/purls.txt --sbom_out /tmp/sbom.json"
25+
scp -i "$SIGNING_SERVER_PRIVATE_KEY_CYGPATH" -P "$SIGNING_SERVER_PORT" "$SIGNING_SERVER_USERNAME"@"$SIGNING_SERVER_HOSTNAME":/tmp/{sbom.json,purls.txt} .sbom/

.evergreen/functions.yml

Lines changed: 57 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,13 @@ variables:
3333
EVERGREEN_IS_PATCH: ${is_patch}
3434
EVERGREEN_PROJECT: ${project}
3535
EVERGREEN_REVISION: ${revision}
36+
EVERGREEN_REVISION_ORDER_ID: ${revision_order_id}
3637
EVERGREEN_TASK_ID: ${task_id}
3738
EVERGREEN_TASK_NAME: ${task_name}
3839
EVERGREEN_TASK_URL: https://evergreen.mongodb.com/task/${task_id}
3940
EVERGREEN_VERSION_ID: ${version_id}
4041
EVERGREEN_WORKDIR: ${workdir}
42+
EVERGREEN_CREATED_AT: ${created_at}
4143
# WARN: This version is behind our electron runtime, but updating it will
4244
# drop support for some older linux platforms, so we are keeping them out of
4345
# sync for now
@@ -301,9 +303,6 @@ functions:
301303
set -e
302304
# Load environment variables
303305
eval $(.evergreen/print-compass-env.sh)
304-
305-
echo "Synchronizing evergreen environment from Compass build tools..."
306-
307306
# Generates and expansion file with build target metadata in packages/compass/expansions.yml
308307
npm run --workspace mongodb-compass build-info -- ${target_platform} ${target_arch} --format=yaml --flatten ${compass_distribution} --out expansions.yml
309308
- command: expansions.update
@@ -378,13 +377,14 @@ functions:
378377
379378
# Write the host info so that it can be used by the signing tool
380379
if [[ $OSTYPE == "cygwin" ]]; then
381-
identity_file=$(cygpath -wa "$identity_file")
380+
identity_file_ospath=$(cygpath -wa "$identity_file")
382381
else
383-
identity_file=$(eval echo "$identity_file")
382+
identity_file_ospath=$(eval echo "$identity_file")
384383
fi
385384
cat <<EOL > signing_host_info.yml
386385
SIGNING_SERVER_HOSTNAME: $hostname
387-
SIGNING_SERVER_PRIVATE_KEY: $identity_file
386+
SIGNING_SERVER_PRIVATE_KEY: $identity_file_ospath
387+
SIGNING_SERVER_PRIVATE_KEY_CYGPATH: $identity_file
388388
SIGNING_SERVER_USERNAME: $user
389389
SIGNING_SERVER_PORT: 22
390390
EOL
@@ -405,13 +405,30 @@ functions:
405405
COMPASS_DISTRIBUTION: ${compass_distribution}
406406
SIGNING_SERVER_HOSTNAME: ${SIGNING_SERVER_HOSTNAME}
407407
SIGNING_SERVER_PRIVATE_KEY: ${SIGNING_SERVER_PRIVATE_KEY}
408+
SIGNING_SERVER_PRIVATE_KEY_CYGPATH: ${SIGNING_SERVER_PRIVATE_KEY_CYGPATH}
408409
SIGNING_SERVER_USERNAME: ${SIGNING_SERVER_USERNAME}
409410
SIGNING_SERVER_PORT: ${SIGNING_SERVER_PORT}
410411
script: |
411412
set -e
412-
413+
# Load environment variables
413414
eval $(.evergreen/print-compass-env.sh)
414415
.evergreen/compass_package.sh
416+
- command: shell.exec
417+
params:
418+
working_dir: src
419+
shell: bash
420+
env:
421+
ARTIFACTORY_USERNAME: ${artifactory_username}
422+
ARTIFACTORY_PASSWORD: ${artifactory_password}
423+
SIGNING_SERVER_HOSTNAME: ${SIGNING_SERVER_HOSTNAME}
424+
SIGNING_SERVER_PRIVATE_KEY: ${SIGNING_SERVER_PRIVATE_KEY}
425+
SIGNING_SERVER_PRIVATE_KEY_CYGPATH: ${SIGNING_SERVER_PRIVATE_KEY_CYGPATH}
426+
SIGNING_SERVER_USERNAME: ${SIGNING_SERVER_USERNAME}
427+
SIGNING_SERVER_PORT: ${SIGNING_SERVER_PORT}
428+
script: |
429+
set -e
430+
431+
.evergreen/create-sbom.sh
415432
416433
publish:
417434
- command: shell.exec
@@ -424,12 +441,28 @@ functions:
424441
set -e
425442
# Load environment variables
426443
eval $(.evergreen/print-compass-env.sh)
427-
if [[ "${project}" == "10gen-compass-main" ]]; then
428-
export npm_config_dry_run=true
429-
fi
430444
echo "Uploading release assets to S3 and GitHub if needed..."
431445
npm run --workspace mongodb-compass upload
432446
447+
publish-dev-release-info:
448+
- command: shell.exec
449+
params:
450+
working_dir: src
451+
shell: bash
452+
env:
453+
<<: *compass-env
454+
script: |
455+
eval $(.evergreen/print-compass-env.sh)
456+
.evergreen/build-dev-release-info.sh release.json
457+
- command: s3.put
458+
params:
459+
<<: *save-artifact-params-public
460+
local_file: src/release.json
461+
remote_file: ${project}/compass/dev/release.json
462+
content_type: application/json
463+
display_name: release.json
464+
optional: true
465+
433466
get-packaged-app:
434467
- command: s3.get
435468
params:
@@ -738,6 +771,20 @@ functions:
738771
remote_file: ${project}/${revision}_${revision_order_id}/${linux_tar_sign_filename}
739772
content_type: application/pgp-signature
740773
optional: true
774+
- command: s3.put
775+
params:
776+
<<: *save-artifact-params-public
777+
local_file: src/.sbom/purls.txt
778+
remote_file: ${project}/${revision}_${revision_order_id}/${task_id}/purls.txt
779+
content_type: text/plain
780+
optional: true
781+
- command: s3.put
782+
params:
783+
<<: *save-artifact-params-public
784+
local_file: src/.sbom/sbom.json
785+
remote_file: ${project}/${revision}_${revision_order_id}/${task_id}/sbom.json
786+
content_type: application/json
787+
optional: true
741788

742789
get-all-artifacts:
743790
- command: shell.exec
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# This evergreen .yml is intentionally left empty.
2+
# We want the compass-generative-ai-accuracy evergreen project to run
3+
# daily on the latest commit. This file is here so that we have a
4+
# .yml config to point the evergreen project to so that
5+
# it can uses the most recent commits when the daily run happens.
6+
7+
# The .yml that runs those tests is `generative-ai-accuracy-test.yml`.
8+
# We don't want it to run on every commit as that would be too many
9+
# requests to our ai model (expensive).

.evergreen/generative-ai-accuracy-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This evergreen .yml is only used in periodic builds.
2-
# We don't want it to run on every patch as that would be too many
3-
# requests to our ai model (expensive).
2+
# We don't want it to run on every commit as that would be
3+
# too many requests to our ai model (expensive).
44

55
unset_function_vars: true
66
stepback: false

0 commit comments

Comments
 (0)