Skip to content

Commit c4e6cf1

Browse files
committed
feat(MongoBinaryDownloadUrl): drop support for mongod versions below 4.2.0
BREAKING CHANGE: Removed support for mongodb version below 4.2.0 fixes #894
1 parent 2a9e22f commit c4e6cf1

File tree

4 files changed

+22
-48
lines changed

4 files changed

+22
-48
lines changed

docs/guides/migration/migrate11.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,22 @@ This Guide is written for migration from version `10.4.0` to `11.0.0`, for versi
1515

1616
With 10.0.0 the minimal nodejs required is `20.19.0`.
1717

18+
### Minimal mongodb version is now `4.2.0`
19+
20+
Mongodb version before `4.2.0` have been dropped (`3.6` & `4.0`) as they are now unsupported by the latest mongodb drivers
21+
and are EOL for a couple of years.
22+
23+
This also means `mongodb-memory-server-global-4.0` has been dropped and wont receive a update to 11.0.0.
24+
25+
Distribution support has been adjusted to only contain 4.2.0 and higher as well, this means the following are now the minimal versions:
26+
27+
- Ubuntu: 16.04
28+
- Elemtaryos: 4
29+
- Linux mint: 18
30+
- Debian: 9.2
31+
- Rhel: 6.2
32+
- Fedora: 12
33+
1834
<!-- ### Mongodb Driver Version upgraded to 6.x
1935
2036
The used MongoDB Driver version is now `6.7.0`.

docs/guides/supported-systems.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Depends on the distribution, many common ones should just work right out of the
5252
<span class="badge badge--success">Supported</span>
5353

5454
(uses mongodb's `ubuntu` release)<br/>
55-
Lowest supported Distribution version is `1404`<br/>
55+
Lowest supported Distribution version is `1604`<br/>
5656
Highest version is `2404` (higher versions will be clamped to this value)<br/>
5757
Default version is `2204`<br/>
5858
Architectures Supported: `x86_64`, `arm64`(`aarch64`)
@@ -70,7 +70,7 @@ See [this mongodb issue](https://jira.mongodb.org/browse/SERVER-62300).
7070
<span class="badge badge--success">Supported</span>
7171

7272
(uses mongodb's `debian` release)<br/>
73-
Lowest supported Distribution version is `71`<br/>
73+
Lowest supported Distribution version is `9.2`<br/>
7474
Highest version is `12` (higher versions will be clamped to this value)<br/>
7575
Default version is `12` (when in `unstable` or `testing`, otherwise none)
7676

@@ -79,7 +79,7 @@ Default version is `12` (when in `unstable` or `testing`, otherwise none)
7979
<span class="badge badge--success">Supported</span>
8080

8181
(uses mongodb's `rhel` release)<br/>
82-
Lowest supported Distribution version is `6`<br/>
82+
Lowest supported Distribution version is `12`<br/>
8383
Highest version is `42` (see note) (higher versions will be clamped to this value)<br/>
8484
Default version is `28` (when above or equal to `28`, otherwise none)
8585

@@ -101,7 +101,7 @@ This mapping to RHEL is based on the table in [Relationship between Fedora and R
101101
<span class="badge badge--warning">Untested</span>
102102

103103
(uses mongodb's `rhel` release)<br/>
104-
Lowest supported Distribution version is `5`<br/>
104+
Lowest supported Distribution version is `6.2`<br/>
105105
Highest version is `9.3` (higher versions will be clamped to this value)<br/>
106106
Default version is `70`<br/>
107107
Architectures Supported: `x86_64`, `arm64`(`aarch64`)
@@ -124,7 +124,7 @@ Default version is `1`
124124
<span class="badge badge--warning">Untested</span> <span class="badge badge--warning">Outdated</span>
125125

126126
(uses mongodb's `ubuntu` release)<br/>
127-
Lowest supported Distribution version is `3` (or `0.3`)<br/>
127+
Lowest supported Distribution version is `4`<br/>
128128
Highest version is `7`<br/>
129129
Default version is `7`
130130

@@ -133,7 +133,7 @@ Default version is `7`
133133
<span class="badge badge--success">Supported</span>
134134

135135
(uses mongodb's `ubuntu` release)<br/>
136-
Lowest supported Distribution version is `17`<br/>
136+
Lowest supported Distribution version is `18`<br/>
137137
Highest version is `22`<br/>
138138
Default version is `21`
139139

packages/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,6 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
302302
name += '10';
303303
} else if (release >= 9) {
304304
name += '92';
305-
} else if (release >= 8.1) {
306-
name += '81';
307-
} else if (release >= 7.1) {
308-
name += '71';
309305
}
310306

311307
if (isTesting || release >= 12) {
@@ -368,8 +364,6 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
368364
rhelOS.release = '7.0';
369365
} else if (fedoraVer >= 12) {
370366
rhelOS.release = '6.2';
371-
} else if (fedoraVer >= 6) {
372-
rhelOS.release = '5.5';
373367
}
374368

375369
return this.getRhelVersionString(rhelOS);
@@ -451,8 +445,6 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
451445
name += '70';
452446
} else if (semver.satisfies(releaseAsSemver, '^6.0.0')) {
453447
name += '62';
454-
} else if (semver.satisfies(releaseAsSemver, '^5.0.0')) {
455-
name += '55';
456448
} else {
457449
console.warn(`Unhandled RHEL version: "${release}"("${this.arch}")`);
458450
}
@@ -568,7 +560,6 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
568560
{
569561
if (/^linux\s?mint\s*$/i.test(os.dist)) {
570562
const mintToUbuntuRelease: Record<number, string> = {
571-
17: '14.04',
572563
18: '16.04',
573564
19: '18.04',
574565
20: '20.04',
@@ -586,7 +577,6 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
586577

587578
if (/^elementary(?:\s?os)?\s*$/i.test(os.dist)) {
588579
const elementaryToUbuntuRelease: Record<number, string> = {
589-
3: '14.04',
590580
4: '16.04',
591581
5: '18.04',
592582
6: '20.04',
@@ -644,20 +634,6 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
644634
}
645635
}
646636

647-
if (ubuntuOS.release === '14.10') {
648-
return 'ubuntu1410-clang';
649-
}
650-
651-
// there are no MongoDB 3.x binary distributions for ubuntu >= 18
652-
// https://www.mongodb.org/dl/linux/x86_64-ubuntu1604
653-
if (ubuntuYear >= 18 && semver.satisfies(coercedVersion, '3.x.x')) {
654-
log(
655-
`getUbuntuVersionString: ubuntuYear is "${ubuntuYear}", which dosnt have an 3.x.x version, defaulting to "1604"`
656-
);
657-
658-
return 'ubuntu1604';
659-
}
660-
661637
// there are no MongoDB <=4.3.x binary distributions for ubuntu > 18
662638
// https://www.mongodb.org/dl/linux/x86_64-ubuntu1804
663639
if (ubuntuYear > 18 && semver.satisfies(coercedVersion, '<=4.3.x')) {

packages/mongodb-memory-server-core/src/util/__tests__/MongoBinaryDownloadUrl.test.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -898,24 +898,6 @@ describe('MongoBinaryDownloadUrl', () => {
898898
);
899899
});
900900

901-
it('elementaryos 0.3 (x86_64) & 4.4.1 (using ubuntu1404)', async () => {
902-
const du = new MongoBinaryDownloadUrl({
903-
platform: 'linux',
904-
arch: 'x64',
905-
version: '4.4.1',
906-
os: {
907-
os: 'linux',
908-
dist: 'elementary OS',
909-
release: '0.3',
910-
id_like: ['ubuntu'],
911-
},
912-
});
913-
914-
expect(await du.getDownloadUrl()).toBe(
915-
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1404-4.4.1.tgz'
916-
);
917-
});
918-
919901
it('elementaryos 5 (x86_64) & 4.4.1 (using ubuntu1804)', async () => {
920902
const du = new MongoBinaryDownloadUrl({
921903
platform: 'linux',

0 commit comments

Comments
 (0)