Skip to content

Commit 9e80bee

Browse files
authored
Merge branch 'main' into exhaustive-checks
2 parents cfacd80 + 53e5363 commit 9e80bee

File tree

18 files changed

+295
-176
lines changed

18 files changed

+295
-176
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

.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

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,4 @@ Luke Wilson <[email protected]>
100100
Niva Sivakumar <[email protected]>
101101
Will Ratner <[email protected]>
102102
Gagik Amaryan <[email protected]>
103+
Dylan Richardson <[email protected]>

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/atlas-service/src/main.spec.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ describe('CompassAuthServiceMain', function () {
3333
'http://example.com/v1/revoke?client_id=1234abcd': {
3434
ok: true,
3535
},
36-
'http://example.com/unauth/ai/api/v1/hello/': {
37-
ok: true,
38-
json() {
39-
return { features: {} };
40-
},
41-
},
4236
}[url];
4337
});
4438

packages/compass-e2e-tests/tests/collection-ai-query.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,9 @@ describe('Collection ai query', function () {
121121

122122
// Check that the request was made with the correct parameters.
123123
const requests = getRequests();
124-
expect(requests.length).to.equal(2);
125-
const lastPathRegex = /[^/]*$/;
126-
const userId = lastPathRegex.exec(requests[0].req.url)?.[0];
127-
expect((userId?.match(/-/g) || []).length).to.equal(4); // Is uuid like.
124+
expect(requests.length).to.equal(1);
128125

129-
const queryRequest = requests[1];
126+
const queryRequest = requests[0];
130127
const queryURL = new URL(
131128
queryRequest.req.url,
132129
`http://${queryRequest.req.headers.host}`

packages/compass-generative-ai/src/atlas-ai-service.spec.ts

Lines changed: 1 addition & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,13 @@ describe('AtlasAiService', function () {
7777
{
7878
apiURLPreset: 'admin-api',
7979
expectedEndpoints: {
80-
'user-access': 'http://example.com/unauth/ai/api/v1/hello/1234',
8180
'mql-aggregation': `http://example.com/ai/api/v1/mql-aggregation?request_id=abc`,
8281
'mql-query': `http://example.com/ai/api/v1/mql-query?request_id=abc`,
8382
},
8483
},
8584
{
8685
apiURLPreset: 'cloud',
8786
expectedEndpoints: {
88-
'user-access': '/cloud/ai/v1/hello/1234',
8987
'mql-aggregation':
9088
'/cloud/ai/v1/groups/testProject/mql-aggregation?request_id=abc',
9189
'mql-query': '/cloud/ai/v1/groups/testProject/mql-query?request_id=abc',
@@ -293,7 +291,7 @@ describe('AtlasAiService', function () {
293291
});
294292
});
295293

296-
it('should set the cloudFeatureRolloutAccess true when returned true', async function () {
294+
it('should set the cloudFeatureRolloutAccess true', async function () {
297295
const fetchStub = sandbox.stub().resolves(
298296
makeResponse({
299297
features: {
@@ -311,94 +309,12 @@ describe('AtlasAiService', function () {
311309

312310
await atlasAiService['setupAIAccess']();
313311

314-
const { args } = fetchStub.firstCall;
315-
316-
expect(fetchStub).to.have.been.calledOnce;
317-
318-
expect(args[0]).to.equal(expectedEndpoints['user-access']);
319-
320312
currentCloudFeatureRolloutAccess =
321313
preferences.getPreferences().cloudFeatureRolloutAccess;
322314
expect(currentCloudFeatureRolloutAccess).to.deep.equal({
323315
GEN_AI_COMPASS: true,
324316
});
325317
});
326-
327-
it('should set the cloudFeatureRolloutAccess false when returned false', async function () {
328-
const fetchStub = sandbox.stub().resolves(
329-
makeResponse({
330-
features: {
331-
GEN_AI_COMPASS: {
332-
enabled: false,
333-
},
334-
},
335-
})
336-
);
337-
global.fetch = fetchStub;
338-
339-
let currentCloudFeatureRolloutAccess =
340-
preferences.getPreferences().cloudFeatureRolloutAccess;
341-
expect(currentCloudFeatureRolloutAccess).to.equal(undefined);
342-
343-
await atlasAiService['setupAIAccess']();
344-
345-
const { args } = fetchStub.firstCall;
346-
347-
expect(fetchStub).to.have.been.calledOnce;
348-
expect(args[0]).to.equal(expectedEndpoints['user-access']);
349-
350-
currentCloudFeatureRolloutAccess =
351-
preferences.getPreferences().cloudFeatureRolloutAccess;
352-
expect(currentCloudFeatureRolloutAccess).to.deep.equal({
353-
GEN_AI_COMPASS: false,
354-
});
355-
});
356-
357-
it('should set the cloudFeatureRolloutAccess false when returned null', async function () {
358-
const fetchStub = sandbox.stub().resolves(
359-
makeResponse({
360-
features: null,
361-
})
362-
);
363-
global.fetch = fetchStub;
364-
365-
let currentCloudFeatureRolloutAccess =
366-
preferences.getPreferences().cloudFeatureRolloutAccess;
367-
expect(currentCloudFeatureRolloutAccess).to.equal(undefined);
368-
369-
await atlasAiService['setupAIAccess']();
370-
371-
const { args } = fetchStub.firstCall;
372-
373-
expect(fetchStub).to.have.been.calledOnce;
374-
expect(args[0]).to.equal(expectedEndpoints['user-access']);
375-
376-
currentCloudFeatureRolloutAccess =
377-
preferences.getPreferences().cloudFeatureRolloutAccess;
378-
expect(currentCloudFeatureRolloutAccess).to.deep.equal({
379-
GEN_AI_COMPASS: false,
380-
});
381-
});
382-
383-
it('should not set the cloudFeatureRolloutAccess false when returned false', async function () {
384-
const fetchStub = sandbox.stub().throws(new Error('error'));
385-
global.fetch = fetchStub;
386-
387-
let currentCloudFeatureRolloutAccess =
388-
preferences.getPreferences().cloudFeatureRolloutAccess;
389-
expect(currentCloudFeatureRolloutAccess).to.equal(undefined);
390-
391-
await atlasAiService['setupAIAccess']();
392-
393-
const { args } = fetchStub.firstCall;
394-
395-
expect(fetchStub).to.have.been.calledOnce;
396-
expect(args[0]).to.equal(expectedEndpoints['user-access']);
397-
398-
currentCloudFeatureRolloutAccess =
399-
preferences.getPreferences().cloudFeatureRolloutAccess;
400-
expect(currentCloudFeatureRolloutAccess).to.deep.equal(undefined);
401-
});
402318
});
403319
});
404320
}

0 commit comments

Comments
 (0)