Skip to content

Commit 22fd8f6

Browse files
committed
Merge remote-tracking branch 'origin/main' into cloudp-311776
2 parents 2b288bb + 2b2a627 commit 22fd8f6

File tree

318 files changed

+16796
-14706
lines changed

Some content is hidden

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

318 files changed

+16796
-14706
lines changed

.evergreen/buildvariants-and-tasks.in.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,12 @@ buildvariants:
248248
variant: <%= buildVariant.depends_on %>
249249
tasks:
250250
<% for (const group of E2E_TEST_GROUPS) { %>
251+
<% if (['test-packaged-app-macos-11-arm', 'test-packaged-app-macos-11-x64'].includes(buildVariant.name)) { %>
252+
- name: test-packaged-app-macos13-<%= group.number %>
253+
<% } else { %>
251254
- name: test-packaged-app-<%= group.number %>
252255
<% } %>
256+
<% } %>
253257
<% } %>
254258

255259
- name: publish
@@ -501,6 +505,32 @@ tasks:
501505
e2e_test_groups: <%= E2E_TEST_GROUPS.length %>
502506
e2e_test_group: <%= group.number %>
503507
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
508+
509+
- name: test-packaged-app-macos13-<%= group.number %>
510+
tags:
511+
- required-for-publish
512+
- run-on-pr
513+
- assigned_to_jira_team_compass_compass
514+
- foliage_check_task_only
515+
commands:
516+
- func: prepare
517+
- func: install
518+
- func: bootstrap
519+
vars:
520+
scope: 'compass-e2e-tests'
521+
- func: apply-compass-target-expansion
522+
vars:
523+
compass_distribution: compass
524+
- func: get-packaged-app
525+
vars:
526+
compass_distribution: compass
527+
- func: test-packaged-app
528+
vars:
529+
mongodb_version: 8.0.5
530+
compass_distribution: compass
531+
e2e_test_groups: <%= E2E_TEST_GROUPS.length %>
532+
e2e_test_group: <%= group.number %>
533+
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
504534
<% } %>
505535

506536
<% for (const browser of BROWSERS) { %>

.evergreen/buildvariants-and-tasks.yml

Lines changed: 81 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ buildvariants:
222222
- name: package-compass
223223
variant: package-macos-arm
224224
tasks:
225-
- name: test-packaged-app-1
226-
- name: test-packaged-app-2
227-
- name: test-packaged-app-3
225+
- name: test-packaged-app-macos13-1
226+
- name: test-packaged-app-macos13-2
227+
- name: test-packaged-app-macos13-3
228228
- name: test-packaged-app-macos-11-x64
229229
display_name: Test Packaged App MacOS x64 11
230230
run_on: macos-11-gui
@@ -233,9 +233,9 @@ buildvariants:
233233
- name: package-compass
234234
variant: package-macos-x64
235235
tasks:
236-
- name: test-packaged-app-1
237-
- name: test-packaged-app-2
238-
- name: test-packaged-app-3
236+
- name: test-packaged-app-macos13-1
237+
- name: test-packaged-app-macos13-2
238+
- name: test-packaged-app-macos13-3
239239
- name: test-packaged-app-macos-14-arm
240240
display_name: Test Packaged App MacOS arm64 14
241241
run_on: macos-14-arm64-gui
@@ -1577,6 +1577,31 @@ tasks:
15771577
e2e_test_groups: 3
15781578
e2e_test_group: 1
15791579
debug: compass-e2e-tests*,electron*,hadron*,mongo*
1580+
- name: test-packaged-app-macos13-1
1581+
tags:
1582+
- required-for-publish
1583+
- run-on-pr
1584+
- assigned_to_jira_team_compass_compass
1585+
- foliage_check_task_only
1586+
commands:
1587+
- func: prepare
1588+
- func: install
1589+
- func: bootstrap
1590+
vars:
1591+
scope: compass-e2e-tests
1592+
- func: apply-compass-target-expansion
1593+
vars:
1594+
compass_distribution: compass
1595+
- func: get-packaged-app
1596+
vars:
1597+
compass_distribution: compass
1598+
- func: test-packaged-app
1599+
vars:
1600+
mongodb_version: 8.0.5
1601+
compass_distribution: compass
1602+
e2e_test_groups: 3
1603+
e2e_test_group: 1
1604+
debug: compass-e2e-tests*,electron*,hadron*,mongo*
15801605
- name: test-packaged-app-2
15811606
tags:
15821607
- required-for-publish
@@ -1602,6 +1627,31 @@ tasks:
16021627
e2e_test_groups: 3
16031628
e2e_test_group: 2
16041629
debug: compass-e2e-tests*,electron*,hadron*,mongo*
1630+
- name: test-packaged-app-macos13-2
1631+
tags:
1632+
- required-for-publish
1633+
- run-on-pr
1634+
- assigned_to_jira_team_compass_compass
1635+
- foliage_check_task_only
1636+
commands:
1637+
- func: prepare
1638+
- func: install
1639+
- func: bootstrap
1640+
vars:
1641+
scope: compass-e2e-tests
1642+
- func: apply-compass-target-expansion
1643+
vars:
1644+
compass_distribution: compass
1645+
- func: get-packaged-app
1646+
vars:
1647+
compass_distribution: compass
1648+
- func: test-packaged-app
1649+
vars:
1650+
mongodb_version: 8.0.5
1651+
compass_distribution: compass
1652+
e2e_test_groups: 3
1653+
e2e_test_group: 2
1654+
debug: compass-e2e-tests*,electron*,hadron*,mongo*
16051655
- name: test-packaged-app-3
16061656
tags:
16071657
- required-for-publish
@@ -1627,6 +1677,31 @@ tasks:
16271677
e2e_test_groups: 3
16281678
e2e_test_group: 3
16291679
debug: compass-e2e-tests*,electron*,hadron*,mongo*
1680+
- name: test-packaged-app-macos13-3
1681+
tags:
1682+
- required-for-publish
1683+
- run-on-pr
1684+
- assigned_to_jira_team_compass_compass
1685+
- foliage_check_task_only
1686+
commands:
1687+
- func: prepare
1688+
- func: install
1689+
- func: bootstrap
1690+
vars:
1691+
scope: compass-e2e-tests
1692+
- func: apply-compass-target-expansion
1693+
vars:
1694+
compass_distribution: compass
1695+
- func: get-packaged-app
1696+
vars:
1697+
compass_distribution: compass
1698+
- func: test-packaged-app
1699+
vars:
1700+
mongodb_version: 8.0.5
1701+
compass_distribution: compass
1702+
e2e_test_groups: 3
1703+
e2e_test_group: 3
1704+
debug: compass-e2e-tests*,electron*,hadron*,mongo*
16301705
- name: test-web-sandbox-chrome-1
16311706
tags:
16321707
- required-for-publish

.evergreen/functions.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,12 +504,18 @@ functions:
504504
content_type: application/x-gzip
505505

506506
publish:
507+
- command: ec2.assume_role
508+
params:
509+
role_arn: "arn:aws:iam::119629040606:role/s3-access.cdn-origin-compass"
507510
- command: shell.exec
508511
params:
509512
working_dir: src
510513
shell: bash
511514
env:
512515
<<: *compass-env
516+
DOWNLOAD_CENTER_NEW_AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
517+
DOWNLOAD_CENTER_NEW_AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
518+
DOWNLOAD_CENTER_NEW_AWS_SESSION_TOKEN: ${AWS_SESSION_TOKEN}
513519
script: |
514520
set -e
515521
# Load environment variables

.evergreen/print-compass-env.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function printVar(name, value) {
2222
function printCompassEnv() {
2323
let {
2424
// This is an env var set in bash that we exported in print-compass-env.sh
25-
OSTYPE
25+
OSTYPE,
2626
} = process.env;
2727

2828
// We have to operate on bash's PATH env var where the c:\ style paths have
@@ -55,6 +55,13 @@ function printCompassEnv() {
5555

5656
const pathsToPrepend = [];
5757

58+
if (process.env.PLATFORM === 'linux') {
59+
// To build node modules on linux post electron 13 we need a newer c++
60+
// compiler version and at least python v3.9, this adds it.
61+
// https://jira.mongodb.org/browse/COMPASS-5150
62+
pathsToPrepend.unshift('/opt/devtools/bin');
63+
}
64+
5865
if (OSTYPE === 'cygwin') {
5966
// NOTE lucas: for git-core addition, See
6067
// https://jira.mongodb.org/browse/COMPASS-4122
@@ -68,13 +75,6 @@ function printCompassEnv() {
6875
pathsToPrepend.unshift(`${newPWD}/.deps/bin`);
6976
}
7077

71-
if (process.env.PLATFORM === 'linux') {
72-
// To build node modules on linux post electron 13 we need a newer c++
73-
// compiler version and at least python v3.9, this adds it.
74-
// https://jira.mongodb.org/browse/COMPASS-5150
75-
pathsToPrepend.unshift('/opt/mongodbtoolchain/v4/bin');
76-
}
77-
7878
pathsToPrepend.unshift(`${originalPWD}/.evergreen/docker-config/bin`);
7979

8080
PATH = maybePrependPaths(PATH, pathsToPrepend);

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
## Description
1313
<!--- Describe your changes in detail -->
1414
<!--- If applicable, describe (or illustrate) architecture flow -->
15+
<!--- If the UI changes in a non-trivial way, consider adding screenshots/video illustrating the new flows -->
1516

1617
### Checklist
1718
- [ ] New tests and/or benchmarks are included
1819
- [ ] Documentation is changed or added
20+
- [ ] If this change updates the UI, screenshots/videos are added and a design review is requested
1921
- [ ] I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)
2022

2123
## Motivation and Context

.github/workflows/authors-and-third-party-notices.yaml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Update Authors and Third Party Notices
33
on:
44
# Once a week or on pushes to main
55
schedule:
6-
- cron: "0 3 * * 0"
6+
- cron: '0 3 * * 0'
77
push:
88
branches:
99
- main
@@ -13,6 +13,9 @@ permissions:
1313

1414
jobs:
1515
update_generated_files:
16+
if: |
17+
github.event_name == 'schedule' ||
18+
!startsWith(github.event.head_commit.message, 'chore: update AUTHORS, THIRD-PARTY-NOTICES, Security Test Summary')
1619
name: Update automatically generated files
1720
runs-on: ubuntu-latest
1821
env:
@@ -32,13 +35,13 @@ jobs:
3235

3336
# this is important so git log can pick up on
3437
# the whole history to generate the list of AUTHORS
35-
fetch-depth: "0"
38+
fetch-depth: '0'
3639
token: ${{ steps.app-token.outputs.token }}
3740

3841
- uses: actions/setup-node@v4
3942
with:
4043
node-version: 20.16.0
41-
cache: "npm"
44+
cache: 'npm'
4245

4346
- name: Install [email protected]
4447
run: |
@@ -71,5 +74,15 @@ jobs:
7174
7275
- name: Commit and push
7376
run: |
74-
git commit --no-allow-empty -m "chore: update AUTHORS, THIRD-PARTY-NOTICES, Security Test Summary" || true
75-
git push
77+
# We can't rely on git not allowing empty commits by default: the
78+
# empty commit check happens before the pre-commit hooks run and if
79+
# there is no diff exists after precommit logic was executed, empty
80+
# commit will still be generated. Instead of that we will allow empty
81+
# commit to happen and will check it directly if it's empty or not
82+
git commit --allow-empty -m "chore: update AUTHORS, THIRD-PARTY-NOTICES, Security Test Summary"
83+
if [ $(git diff-tree --name-only --no-commit-id HEAD | wc -l) -gt 0 ]; then
84+
echo "Files changed, pushing update..."
85+
git push
86+
else
87+
echo "No changes to push"
88+
fi

.github/workflows/bump-packages.yaml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@ jobs:
2424
with:
2525
# don't checkout a detatched HEAD
2626
ref: ${{ github.head_ref }}
27+
# this is important so git log can pick up on the whole history to
28+
# find last publish commit
29+
fetch-depth: '0'
2730
token: ${{ steps.app-token.outputs.token }}
2831

2932
- uses: actions/setup-node@v4
3033
with:
3134
node-version: 20.16.0
32-
cache: "npm"
35+
cache: 'npm'
3336

3437
- name: Install [email protected]
3538
run: |
@@ -42,17 +45,27 @@ jobs:
4245
4346
- name: Bump packages
4447
env:
45-
SKIP_BUMP_PACKAGES: "mongodb-compass"
48+
SKIP_BUMP_PACKAGES: 'mongodb-compass'
49+
# Do not remove this variable, bump-packages script uses this env var
50+
# to find the previous commit
51+
LAST_BUMP_COMMIT_MESSAGE: 'chore(release): bump package versions'
4652
run: npm run bump-packages
4753

4854
- name: Create Pull Request
4955
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # 7.0.5
5056
with:
5157
token: ${{ steps.app-token.outputs.token }}
52-
commit-message: "chore(release): bump package versions"
58+
commit-message: 'chore(release): bump package versions'
5359
branch: ci/bump-packages
54-
title: "chore(release): bump package versions"
60+
title: 'chore(release): bump package versions'
5561
labels: no-title-validation
56-
author: "${{ steps.app-token.outputs.app-slug}}[bot] <${{ steps.app-token.outputs.app-email }}>"
57-
body: |
58-
- Bump package versions
62+
author: '${{ steps.app-token.outputs.app-slug}}[bot] <${{ steps.app-token.outputs.app-email }}>'
63+
body: >-
64+
<p>This PR is autogenerated and updates the version of every package
65+
in the monorepo that was changed since last publish. If you need to
66+
publish packages to update the version elsewhere, <strong>you can do
67+
this at your own convenience by just merging this PR</strong>.</p>
68+
69+
<p>After PR is merged, it starts an automatic publish process via
70+
GitHub Actions, you can follow the process <a href="https://github.com/mongodb-js/compass/actions/workflows/publish-packages.yaml">
71+
on the publish workflow page</a>.</p>

.github/workflows/test-installers.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@ jobs:
229229
DISTRO_ID: ${{ matrix.distro-id }}
230230
# Exposing token to prevent update server from being rate limited
231231
GITHUB_TOKEN: ${{ github.token }}
232+
# mongodb 8.0.6 requires macOS 14+. Just use an older version for now
233+
# so it will run on GitHub's mac runners
234+
MONGODB_VERSION: "8.0.5"
235+
MONGODB_RUNNER_VERSION: "8.0.5"
232236
working-directory: packages/compass-smoke-tests
233237
# Using --skipUninstalling --skipCleanup because the runners are ephemeral
234238
run: npm start -- --package ${{ matrix.package }} --tests ${{ matrix.test }} --skipUninstall --skipCleanup

.husky/pre-commit

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44
# listings staged files only
55
fileList=$(git diff --diff-filter=AM --cached --name-only)
66

7-
npm run precommit $fileList
7+
if [ -n "$fileList" ]; then
8+
echo "Prettifying staged files..."
9+
npx prettier-compass --write --ignore-unknown $fileList
10+
git add $fileList
11+
fi
File renamed without changes.

0 commit comments

Comments
 (0)