Skip to content

Commit 473071d

Browse files
MCLOUD-9749: Update service version requirements for the release (#108)
1 parent 9535e64 commit 473071d

File tree

2 files changed

+129
-15
lines changed

2 files changed

+129
-15
lines changed

src/Service/Validator.php

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Validator
2020
* Supported version constraints of Redis services
2121
*/
2222
private const REDIS_SUPPORT_VERSIONS = [
23-
'*' => '~3.2.0 || ~4.0.0 || ~5.0.0 || ~6.0.0 || ~6.2.0',
23+
'*' => '~3.2.0 || ~4.0.0 || ~5.0.0 || ~6.0.0 || ~6.2.0 || ~7.0.0',
2424
];
2525

2626
/**
@@ -34,18 +34,23 @@ class Validator
3434
'>=2.2.5 <2.2.10' => '>=7.0 <7.2', //'~7.0.13|~7.1.0',
3535
'>=2.2.10 <2.3.0' => '>=7.1 <7.3', //'~7.1.0|~7.2.0',
3636
'>=2.3.0 <2.3.3' => '>=7.1 <7.3', //'~7.1.3 || ~7.2.0',
37-
'>=2.3.3 <2.4.0' => '>=7.1 <7.4', // '~7.1.3||~7.2.0||~7.3.0'
38-
'>=2.4.0' => '>=7.3 <7.5', // '~7.3.0||~7.4.0'
37+
'>=2.3.3 <2.3.7-p4' => '>=7.1 <7.4', // '~7.1.3||~7.2.0||~7.3.0'
38+
'>=2.4.0 <2.4.4 || ~2.3.7-p4' => '>=7.3 <7.5', // '~7.3.0||~7.4.0'
39+
'>=2.4.4 <2.4.6' => '>=8.1 <8.2', // '~8.1.0'
40+
'>=2.4.6' => '>=8.1 <8.3', // '~8.1.0 || ~8.2.0'
3941
],
4042
ServiceInterface::NAME_DB_MARIA => [
4143
'<2.3.6-p1' => '>=10.0 <10.3',
4244
'>=2.3.6-p1 <2.4.0' => '>=10.0 <10.4',
43-
'>=2.4.0' => '>=10.2 <10.5',
45+
'>=2.4.0 <2.4.6' => '>=10.2 <10.5',
46+
'>=2.4.6' => '>=10.6 <10.7',
47+
4448
],
4549
ServiceInterface::NAME_DB_MYSQL => [
4650
'<2.3.0' => '~5.6.0 || ~5.7.0',
4751
'>=2.3.0 <2.4.0' => '~5.7.0',
48-
'>=2.4.0' => '~5.7.0 || ~8.0.0',
52+
'>=2.4.0 <2.4.1' => '~5.7.0 || ~8.0.0',
53+
'>=2.4.1' => '~8.0.0',
4954
],
5055
ServiceInterface::NAME_DB_AURORA => [
5156
'<2.3.0' => '~1.0.0 || ~2.0.0',
@@ -57,7 +62,9 @@ class Validator
5762
ServiceInterface::NAME_VARNISH => [
5863
'<2.2.0' => '~3.5.0 || ^4.0',
5964
'>=2.2.0 <2.3.3' => '^4.0 || ^5.0',
60-
'>=2.3.3' => '^4.0 || ^5.0 || ^6.2',
65+
'>=2.3.3 <2.4.4' => '^4.0 || ^5.0 || ^6.2',
66+
'>=2.4.4 <2.4.6' => '~7.0.0',
67+
'>=2.4.6' => '~7.1.1',
6168
],
6269
ServiceInterface::NAME_REDIS => self::REDIS_SUPPORT_VERSIONS,
6370
ServiceInterface::NAME_REDIS_SESSION => self::REDIS_SUPPORT_VERSIONS,
@@ -72,15 +79,17 @@ class Validator
7279
' || ~7.9.0 || ~7.10.0',
7380
'>=2.4.0 <2.4.2' => '~7.5.0 || ~7.6.0 || ~7.7.0',
7481
'>=2.4.2 <2.4.3' => '~7.5.0 || ~7.6.0 || ~7.7.0 || ~7.9.0',
75-
'>=2.4.3' => '~7.5.0 || ~7.6.0 || ~7.7.0 || ~7.9.0 || ~7.10.0',
82+
'>=2.4.3 <2.4.4' => '~7.5.0 || ~7.6.0 || ~7.7.0 || ~7.9.0 || ~7.10.0',
83+
'>=2.4.4' => '~7.10.0', // Greater than 7.10 isn't supported on cloud infrastructure.
7684
],
7785
ServiceInterface::NAME_OPENSEARCH => [
78-
'>=2.3.7-p3 <2.4.0 || >=2.4.3-p2' => '~1.1 || ~1.2.1',
86+
'>=2.3.7-p3 <2.4.0 || >=2.4.3-p2 <2.4.6' => '~1.1.0 || ~1.2.1',
87+
'>=2.4.6' => '~2.3.0',
7988
],
8089
ServiceInterface::NAME_RABBITMQ => [
8190
'<2.3.0' => '~3.5.0',
82-
'>=2.3.0 <2.4.4' => '~3.5.0 || ~3.7.0 || ~3.8.0',
83-
'>=2.4.4' => '~3.5.0 || ~3.7.0 || ~3.8.0 || ~3.9.0',
91+
'>=2.3.0 <2.3.7-p4 || >=2.4.0 <2.4.3-p3' => '~3.5.0 || ~3.7.0 || ~3.8.0',
92+
'>=2.4.4 || ~2.4.3-p3 || ~2.3.7-p4' => '~3.5.0 || ~3.7.0 || ~3.8.0 || ~3.9.0',
8493
],
8594
ServiceInterface::NAME_NODE => [
8695
'*' => '^6 || ^8 || ^10 || ^11',
@@ -121,7 +130,7 @@ public function __construct(MagentoVersion $magentoVersion)
121130
* ];
122131
* ```
123132
*
124-
* @param array $serviceVersions List of services and their names which should be validates.
133+
* @param array $serviceVersions List of services and their names which should be validated.
125134
* @return array List of warning messages. One message for one unsupported service.
126135
*
127136
* @throws ServiceMismatchException

src/Test/Unit/Service/ValidatorTest.php

Lines changed: 109 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ public function validateVersionsDataProvider(): array
147147
'2.5.0',
148148
[
149149
ServiceInterface::NAME_PHP => '7.2.13', // wrong
150-
ServiceInterface::NAME_DB_MARIA => '10.2.1',
150+
ServiceInterface::NAME_DB_MARIA => '10.6.1',
151151
ServiceInterface::NAME_NGINX => '1.9',
152-
ServiceInterface::NAME_VARNISH => '5.5',
152+
ServiceInterface::NAME_VARNISH => '7.1.1',
153153
ServiceInterface::NAME_REDIS => 'latest',
154154
ServiceInterface::NAME_ELASTICSEARCH => '6.7', // wrong
155155
ServiceInterface::NAME_RABBITMQ => '3.7'
@@ -205,7 +205,7 @@ public function validateVersionsDataProvider(): array
205205
[
206206
'2.4.1',
207207
[
208-
ServiceInterface::NAME_DB_MYSQL => '5.7',
208+
ServiceInterface::NAME_DB_MYSQL => '8.0.2',
209209
],
210210
0
211211
],
@@ -301,6 +301,19 @@ public function validateVersionsDataProvider(): array
301301
],
302302
0
303303
],
304+
[
305+
'2.3.7-p4',
306+
[
307+
ServiceInterface::NAME_PHP => '7.4.0',
308+
ServiceInterface::NAME_DB_MARIA => '10.3.35',
309+
ServiceInterface::NAME_NGINX => '1.18.0',
310+
ServiceInterface::NAME_VARNISH => '6.5.1',
311+
ServiceInterface::NAME_REDIS => '6.0.12',
312+
ServiceInterface::NAME_OPENSEARCH => '1.2.1',
313+
ServiceInterface::NAME_RABBITMQ => '3.9.0'
314+
],
315+
0
316+
],
304317
[
305318
'2.3.7-p3',
306319
[
@@ -311,7 +324,7 @@ public function validateVersionsDataProvider(): array
311324
[
312325
'2.4.0',
313326
[
314-
ServiceInterface::NAME_OPENSEARCH => '1.2.2' //wrong
327+
ServiceInterface::NAME_OPENSEARCH => '1.2.1' //wrong
315328
],
316329
1
317330
],
@@ -322,6 +335,13 @@ public function validateVersionsDataProvider(): array
322335
],
323336
0
324337
],
338+
[
339+
'2.4.3',
340+
[
341+
ServiceInterface::NAME_OPENSEARCH => '1.2.2' //wrong
342+
],
343+
1
344+
],
325345
[
326346
'2.4.4',
327347
[
@@ -381,6 +401,91 @@ public function validateVersionsDataProvider(): array
381401
],
382402
0
383403
],
404+
[
405+
'2.4.3-p3',
406+
[
407+
ServiceInterface::NAME_PHP => '7.4.0',
408+
ServiceInterface::NAME_DB_MARIA => '10.4.14',
409+
ServiceInterface::NAME_NGINX => '1.18.0',
410+
ServiceInterface::NAME_VARNISH => '6.5.1',
411+
ServiceInterface::NAME_REDIS => '6.0.12',
412+
ServiceInterface::NAME_OPENSEARCH => '1.2.1',
413+
ServiceInterface::NAME_RABBITMQ => '3.8.0'
414+
],
415+
0
416+
],
417+
[
418+
'2.4.3-p3',
419+
[
420+
ServiceInterface::NAME_RABBITMQ => '3.9.0'
421+
],
422+
0
423+
],
424+
[
425+
'2.4.4-p1',
426+
[
427+
ServiceInterface::NAME_PHP => '8.1.0',
428+
ServiceInterface::NAME_DB_MARIA => '10.4.22',
429+
ServiceInterface::NAME_NGINX => '1.18.0',
430+
ServiceInterface::NAME_VARNISH => '7.0.0',
431+
ServiceInterface::NAME_REDIS => '6.2.6',
432+
ServiceInterface::NAME_OPENSEARCH => '1.2.1',
433+
ServiceInterface::NAME_RABBITMQ => '3.9.0'
434+
],
435+
0
436+
],
437+
[
438+
'2.4.5',
439+
[
440+
ServiceInterface::NAME_ELASTICSEARCH => '7.10'
441+
],
442+
0
443+
],
444+
[
445+
'2.4.5',
446+
[
447+
ServiceInterface::NAME_PHP => '8.0.0', //wrong
448+
ServiceInterface::NAME_ELASTICSEARCH => '7.11.0', //wrong
449+
ServiceInterface::NAME_DB_MARIA => '10.5.0', //wrong
450+
ServiceInterface::NAME_VARNISH => '7.1.0', //wrong
451+
ServiceInterface::NAME_REDIS => '6.1.3', //wrong
452+
ServiceInterface::NAME_OPENSEARCH => '1.2.0', //wrong
453+
ServiceInterface::NAME_RABBITMQ => '3.8.1' //wrong
454+
],
455+
6
456+
],
457+
[
458+
'2.4.5',
459+
[
460+
ServiceInterface::NAME_PHP => '8.1.0',
461+
ServiceInterface::NAME_DB_MARIA => '10.4.22',
462+
ServiceInterface::NAME_NGINX => '1.18.0',
463+
ServiceInterface::NAME_VARNISH => '7.0.0',
464+
ServiceInterface::NAME_REDIS => '6.2.6',
465+
ServiceInterface::NAME_OPENSEARCH => '1.2.1',
466+
ServiceInterface::NAME_RABBITMQ => '3.9.0'
467+
],
468+
0
469+
],
470+
[
471+
'2.4.6',
472+
[
473+
ServiceInterface::NAME_ELASTICSEARCH => '7.11' //wrong
474+
],
475+
1
476+
],
477+
[
478+
'2.4.6',
479+
[
480+
ServiceInterface::NAME_PHP => '8.2.0',
481+
ServiceInterface::NAME_DB_MARIA => '10.6.0',
482+
ServiceInterface::NAME_VARNISH => '7.1.1',
483+
ServiceInterface::NAME_REDIS => '7.0.0',
484+
ServiceInterface::NAME_OPENSEARCH => '2.3.0',
485+
ServiceInterface::NAME_RABBITMQ => '3.9.0'
486+
],
487+
0
488+
],
384489
];
385490
}
386491
}

0 commit comments

Comments
 (0)