Skip to content

Commit 21efcb5

Browse files
authored
Merge branch 'main' into autoupdate-to
2 parents 9bd0524 + a24990a commit 21efcb5

File tree

14 files changed

+201
-36
lines changed

14 files changed

+201
-36
lines changed

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ const MAINTAINED_SERVER_VERSIONS = [
160160
{ name: '80x-enterprise', version: '8.0.x-enterprise' },
161161
];
162162
163+
const LATEST_MAINTAINED_SERVER_VERSION =
164+
MAINTAINED_SERVER_VERSIONS[MAINTAINED_SERVER_VERSIONS.length - 1];
165+
163166
const TEST_LATEST_ALPHA_SERVER_VERSION = { name: 'latest-alpha', version: 'latest-alpha-enterprise' };
164167
165168
const SERVER_VERSIONS = [
@@ -222,7 +225,7 @@ buildvariants:
222225
- name: package-<%= distribution %>
223226
variant: <%= buildVariant.depends_on %>
224227
tasks:
225-
- name: smoketest-<%= distribution %>
228+
- name: smoketest-<%= distribution %>
226229
<% } %>
227230
<% } %>
228231

@@ -357,6 +360,7 @@ tasks:
357360
- func: test
358361
vars:
359362
debug: 'hadron*,mongo*'
363+
mongodb_version: <%= LATEST_MAINTAINED_SERVER_VERSION.version %>
360364

361365
- name: test-electron
362366
tags: ['required-for-publish', 'run-on-pr']
@@ -367,6 +371,7 @@ tasks:
367371
- func: test-electron
368372
vars:
369373
debug: 'hadron*,mongo*'
374+
mongodb_version: <%= LATEST_MAINTAINED_SERVER_VERSION.version %>
370375

371376
- name: test-connectivity
372377
tags: ['required-for-publish', 'run-on-pr']
@@ -375,6 +380,7 @@ tasks:
375380
- func: test-connectivity
376381
vars:
377382
debug: 'compass*,electron*,hadron*,mongo*'
383+
mongodb_version: <%= LATEST_MAINTAINED_SERVER_VERSION.version %>
378384

379385
- name: test-csfle
380386
tags: ['required-for-publish', 'run-on-pr']
@@ -385,6 +391,7 @@ tasks:
385391
- func: test-csfle
386392
vars:
387393
debug: 'compass*,electron*,hadron*,mongo*'
394+
mongodb_version: <%= LATEST_MAINTAINED_SERVER_VERSION.version %>
388395

389396
<% for(const group of E2E_TEST_GROUPS) { %>
390397
- name: e2e-coverage-<%= group.number %>
@@ -398,6 +405,7 @@ tasks:
398405
e2e_test_groups: <%= E2E_TEST_GROUPS.length %>
399406
e2e_test_group: <%= group.number %>
400407
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
408+
mongodb_version: <%= LATEST_MAINTAINED_SERVER_VERSION.version %>
401409
<% } %>
402410

403411
- name: generate-vulnerability-report
@@ -471,7 +479,7 @@ tasks:
471479
scope: 'compass-e2e-tests'
472480
- func: smoketest-packaged-app
473481
vars:
474-
mongodb_version: latest-enterprise
482+
mongodb_version: <%= LATEST_MAINTAINED_SERVER_VERSION.version %>
475483
compass_distribution: <%= distribution %>
476484
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
477485
<% } %>
@@ -525,7 +533,7 @@ tasks:
525533
compass_distribution: compass
526534
- func: test-packaged-app
527535
vars:
528-
mongodb_version: latest-enterprise
536+
mongodb_version: <%= LATEST_MAINTAINED_SERVER_VERSION.version %>
529537
compass_distribution: compass
530538
e2e_test_groups: <%= E2E_TEST_GROUPS.length %>
531539
e2e_test_group: <%= group.number %>
@@ -551,7 +559,7 @@ tasks:
551559
compass_distribution: compass
552560
- func: test-web-sandbox
553561
vars:
554-
mongodb_version: latest-enterprise
562+
mongodb_version: <%= LATEST_MAINTAINED_SERVER_VERSION.version %>
555563
browser_name: '<%= browser %>'
556564
compass_distribution: compass
557565
e2e_test_groups: <%= E2E_TEST_GROUPS.length %>

.evergreen/buildvariants-and-tasks.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ tasks:
313313
- func: test
314314
vars:
315315
debug: hadron*,mongo*
316+
mongodb_version: 8.0.x-enterprise
316317
- name: test-electron
317318
tags:
318319
- required-for-publish
@@ -324,6 +325,7 @@ tasks:
324325
- func: test-electron
325326
vars:
326327
debug: hadron*,mongo*
328+
mongodb_version: 8.0.x-enterprise
327329
- name: test-connectivity
328330
tags:
329331
- required-for-publish
@@ -333,6 +335,7 @@ tasks:
333335
- func: test-connectivity
334336
vars:
335337
debug: compass*,electron*,hadron*,mongo*
338+
mongodb_version: 8.0.x-enterprise
336339
- name: test-csfle
337340
tags:
338341
- required-for-publish
@@ -344,6 +347,7 @@ tasks:
344347
- func: test-csfle
345348
vars:
346349
debug: compass*,electron*,hadron*,mongo*
350+
mongodb_version: 8.0.x-enterprise
347351
- name: e2e-coverage-1
348352
tags:
349353
- required-for-publish
@@ -357,6 +361,7 @@ tasks:
357361
e2e_test_groups: 3
358362
e2e_test_group: 1
359363
debug: compass-e2e-tests*,electron*,hadron*,mongo*
364+
mongodb_version: 8.0.x-enterprise
360365
- name: e2e-coverage-2
361366
tags:
362367
- required-for-publish
@@ -370,6 +375,7 @@ tasks:
370375
e2e_test_groups: 3
371376
e2e_test_group: 2
372377
debug: compass-e2e-tests*,electron*,hadron*,mongo*
378+
mongodb_version: 8.0.x-enterprise
373379
- name: e2e-coverage-3
374380
tags:
375381
- required-for-publish
@@ -383,6 +389,7 @@ tasks:
383389
e2e_test_groups: 3
384390
e2e_test_group: 3
385391
debug: compass-e2e-tests*,electron*,hadron*,mongo*
392+
mongodb_version: 8.0.x-enterprise
386393
- name: generate-vulnerability-report
387394
tags:
388395
- required-for-publish
@@ -497,7 +504,7 @@ tasks:
497504
scope: compass-e2e-tests
498505
- func: smoketest-packaged-app
499506
vars:
500-
mongodb_version: latest-enterprise
507+
mongodb_version: 8.0.x-enterprise
501508
compass_distribution: compass
502509
debug: compass-e2e-tests*,electron*,hadron*,mongo*
503510
- name: test-server-40x-community-1
@@ -1555,7 +1562,7 @@ tasks:
15551562
compass_distribution: compass
15561563
- func: test-packaged-app
15571564
vars:
1558-
mongodb_version: latest-enterprise
1565+
mongodb_version: 8.0.x-enterprise
15591566
compass_distribution: compass
15601567
e2e_test_groups: 3
15611568
e2e_test_group: 1
@@ -1580,7 +1587,7 @@ tasks:
15801587
compass_distribution: compass
15811588
- func: test-packaged-app
15821589
vars:
1583-
mongodb_version: latest-enterprise
1590+
mongodb_version: 8.0.x-enterprise
15841591
compass_distribution: compass
15851592
e2e_test_groups: 3
15861593
e2e_test_group: 2
@@ -1605,7 +1612,7 @@ tasks:
16051612
compass_distribution: compass
16061613
- func: test-packaged-app
16071614
vars:
1608-
mongodb_version: latest-enterprise
1615+
mongodb_version: 8.0.x-enterprise
16091616
compass_distribution: compass
16101617
e2e_test_groups: 3
16111618
e2e_test_group: 3
@@ -1627,7 +1634,7 @@ tasks:
16271634
compass_distribution: compass
16281635
- func: test-web-sandbox
16291636
vars:
1630-
mongodb_version: latest-enterprise
1637+
mongodb_version: 8.0.x-enterprise
16311638
browser_name: chrome
16321639
compass_distribution: compass
16331640
e2e_test_groups: 3
@@ -1650,7 +1657,7 @@ tasks:
16501657
compass_distribution: compass
16511658
- func: test-web-sandbox
16521659
vars:
1653-
mongodb_version: latest-enterprise
1660+
mongodb_version: 8.0.x-enterprise
16541661
browser_name: chrome
16551662
compass_distribution: compass
16561663
e2e_test_groups: 3
@@ -1673,7 +1680,7 @@ tasks:
16731680
compass_distribution: compass
16741681
- func: test-web-sandbox
16751682
vars:
1676-
mongodb_version: latest-enterprise
1683+
mongodb_version: 8.0.x-enterprise
16771684
browser_name: chrome
16781685
compass_distribution: compass
16791686
e2e_test_groups: 3
@@ -1696,7 +1703,7 @@ tasks:
16961703
compass_distribution: compass
16971704
- func: test-web-sandbox
16981705
vars:
1699-
mongodb_version: latest-enterprise
1706+
mongodb_version: 8.0.x-enterprise
17001707
browser_name: firefox
17011708
compass_distribution: compass
17021709
e2e_test_groups: 3
@@ -1719,7 +1726,7 @@ tasks:
17191726
compass_distribution: compass
17201727
- func: test-web-sandbox
17211728
vars:
1722-
mongodb_version: latest-enterprise
1729+
mongodb_version: 8.0.x-enterprise
17231730
browser_name: firefox
17241731
compass_distribution: compass
17251732
e2e_test_groups: 3
@@ -1742,7 +1749,7 @@ tasks:
17421749
compass_distribution: compass
17431750
- func: test-web-sandbox
17441751
vars:
1745-
mongodb_version: latest-enterprise
1752+
mongodb_version: 8.0.x-enterprise
17461753
browser_name: firefox
17471754
compass_distribution: compass
17481755
e2e_test_groups: 3

.evergreen/print-compass-env.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,7 @@ function printCompassEnv() {
101101
printVar('IS_RHEL', process.env.IS_RHEL);
102102
printVar('IS_UBUNTU', process.env.IS_UBUNTU);
103103
printVar('DEBUG', process.env.DEBUG);
104-
printVar(
105-
'MONGODB_VERSION',
106-
process.env.MONGODB_VERSION || process.env.MONGODB_DEFAULT_VERSION
107-
);
104+
printVar('MONGODB_VERSION', process.env.MONGODB_VERSION);
108105
printVar('DEV_VERSION_IDENTIFIER', process.env.DEV_VERSION_IDENTIFIER);
109106
printVar('EVERGREEN_REVISION', process.env.EVERGREEN_REVISION);
110107
printVar(

.evergreen/print-compass-env.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
set -e
44

5-
export MONGODB_DEFAULT_VERSION=7.0.x
6-
75
if [[ $OSTYPE == "cygwin" ]]; then
86
export PLATFORM='win32'
97
export IS_WINDOWS=true

THIRD-PARTY-NOTICES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The following third-party software is used by and included in **Mongodb Compass**.
2-
This document was automatically generated on Tue Feb 04 2025.
2+
This document was automatically generated on Thu Feb 06 2025.
33

44
## List of dependencies
55

docs/tracking-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
> the tracking plan for the specific Compass version you can use the following
88
> URL: `https://github.com/mongodb-js/compass/blob/<compass version>/docs/tracking-plan.md`
99
10-
Generated on Tue, Feb 4, 2025
10+
Generated on Thu, Feb 6, 2025
1111

1212
## Table of Contents
1313

packages/compass-crud/src/stores/crud-store.spec.ts

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,7 +1663,8 @@ describe('store', function () {
16631663
const plugin = activatePlugin();
16641664
store = plugin.store;
16651665
deactivate = () => plugin.deactivate();
1666-
await dataService.insertOne('compass-crud.test', { name: 'testing' });
1666+
await dataService.insertOne('compass-crud.test', { name: 'testing1' });
1667+
await dataService.insertOne('compass-crud.test', { name: 'testing2' });
16671668
});
16681669

16691670
afterEach(function () {
@@ -1680,9 +1681,36 @@ describe('store', function () {
16801681

16811682
(state) => {
16821683
expect(state.error).to.equal(null);
1683-
expect(state.docs).to.have.length(1);
1684+
expect(state.docs).to.have.length(2);
1685+
expect(state.docs[0].doc.name).to.equal('testing1');
16841686
expect(state.debouncingLoad).to.equal(false);
1685-
expect(state.count).to.equal(1);
1687+
expect(state.count).to.equal(2);
1688+
expect(state.start).to.equal(1);
1689+
expect(state.shardKeys).to.deep.equal({});
1690+
},
1691+
]);
1692+
1693+
void store.refreshDocuments();
1694+
1695+
await listener;
1696+
});
1697+
1698+
it('uses the sort order from preferences', async function () {
1699+
await preferences.savePreferences({
1700+
defaultSortOrder: '{ _id: -1 }',
1701+
});
1702+
const listener = waitForStates(store, [
1703+
(state) => {
1704+
expect(state.debouncingLoad).to.equal(true);
1705+
expect(state.count).to.equal(null);
1706+
},
1707+
1708+
(state) => {
1709+
expect(state.error).to.equal(null);
1710+
expect(state.docs).to.have.length(2);
1711+
expect(state.docs[0].doc.name).to.equal('testing2');
1712+
expect(state.debouncingLoad).to.equal(false);
1713+
expect(state.count).to.equal(2);
16861714
expect(state.start).to.equal(1);
16871715
expect(state.shardKeys).to.deep.equal({});
16881716
},

packages/compass-crud/src/stores/crud-store.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import semver from 'semver';
66
import StateMixin from '@mongodb-js/reflux-state-mixin';
77
import type { Element } from 'hadron-document';
88
import { Document } from 'hadron-document';
9+
import { validate } from 'mongodb-query-parser';
910
import HadronDocument from 'hadron-document';
1011
import _parseShellBSON, { ParseMode } from '@mongodb-js/shell-bson-parser';
1112
import type { PreferencesAccess } from 'compass-preferences-model/provider';
@@ -1615,8 +1616,16 @@ class CrudStoreImpl
16151616
countOptions.hint = '_id_';
16161617
}
16171618

1619+
let sort = query.sort;
1620+
if (!sort && this.preferences.getPreferences().defaultSortOrder) {
1621+
sort = validate(
1622+
'sort',
1623+
this.preferences.getPreferences().defaultSortOrder
1624+
);
1625+
}
1626+
16181627
const findOptions = {
1619-
sort: query.sort,
1628+
sort,
16201629
projection: query.project,
16211630
skip: query.skip,
16221631
limit: docsPerPage,

0 commit comments

Comments
 (0)