Skip to content

Commit e47cdda

Browse files
mfusseneggermatriv
authored andcommitted
Reduce amount of versions tested in bwc tests
5.0/5.1 won't run anymore on systems using cgroups v2 due to a JDK bug: Caused by: java.lang.NullPointerException: Cannot invoke "jdk.internal.platform.CgroupInfo.getMountPoint()" because "any Controller" is null at jdk.internal.platform.cgroupv2.CgroupV2Subsystem.getInstance(CgroupV2Subsystem.java:80) ~[?:?] at jdk.internal.platform.CgroupSubsystemFactory.create(CgroupSubsystemFactory.java:114) ~[?:?] at jdk.internal.platform.CgroupMetrics.getInstance(CgroupMetrics.java:177) ~[?:?] at jdk.internal.platform.SystemMetrics.instance(SystemMetrics.java:29) ~[?:?] at jdk.internal.platform.Metrics.systemMetrics(Metrics.java:58) ~[?:?] at jdk.internal.platform.Container.metrics(Container.java:43) ~[?:?] 5.10 is already sort of EOL given that 6.2 is the current stable release. So this also trims the 4-5 bwc tests given that it is unlikely that we'll have anymore patches for 5.10 where storage changes or serialization/mapping changes are relevant.
1 parent 238f676 commit e47cdda

4 files changed

Lines changed: 12 additions & 45 deletions

File tree

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pipeline {
2323
'''
2424
}
2525
}
26-
stage('Python bwc-rolling-upgrade tests 4-5') {
26+
stage('Python bwc-rolling-upgrade tests 5-5') {
2727
agent { label 'medium && x64' }
2828
tools { jdk 'jdk11' }
2929
steps {
@@ -34,7 +34,7 @@ pipeline {
3434
source .venv/bin/activate
3535
uv pip install -U -e .
3636
37-
(cd tests/bwc && python -m unittest -vvv test_rolling_upgrade.RollingUpgradeTest.test_rolling_upgrade_4_to_5)
37+
(cd tests/bwc && python -m unittest -vvv test_rolling_upgrade.RollingUpgradeTest.test_rolling_upgrade_5_to_5)
3838
'''
3939
}
4040
}

src/crate/qa/tests.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,10 @@ def upgrade_node(self, old_node: CrateNode, new_version: str) -> CrateNode:
232232
self._on_stop.remove(old_node)
233233
settings = getattr(old_node, "_settings", {})
234234
env = {}
235-
if os.environ.get("DEBUGPY_RUNNING", "false") == "true":
235+
crate_dir = get_crate(new_version)
236+
version = _extract_version(crate_dir)
237+
# 5,5 and 5,6 didn't bundle the jdwp module
238+
if os.environ.get("DEBUGPY_RUNNING", "false") == "true" and (version < (5, 5, 0) or version >= (5, 7, 0)):
236239
jdwp = f"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address={port}"
237240
env["CRATE_JAVA_OPTS"] = jdwp
238241
(new_node, _) = self._new_node(new_version, settings=settings, env=env)

tests/bwc/test_rolling_upgrade.py

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,11 @@
77

88
from crate.qa.tests import NodeProvider, insert_data, wait_for_active_shards, UpgradePath, assert_busy
99

10-
ROLLING_UPGRADES_V4 = (
11-
# 4.0.0 -> 4.0.1 -> 4.0.2 don't support rolling upgrades due to a bug
12-
UpgradePath('4.0.2', '4.0.x'),
13-
UpgradePath('4.0.x', '4.1.0'),
14-
UpgradePath('4.1.0', '4.1.x'),
15-
UpgradePath('4.1.x', '4.2.x'),
16-
UpgradePath('4.2.x', '4.3.x'),
17-
UpgradePath('4.3.x', '4.4.x'),
18-
UpgradePath('4.4.x', '4.5.x'),
19-
UpgradePath('4.5.x', '4.6.x'),
20-
UpgradePath('4.6.x', '4.7.x'),
21-
UpgradePath('4.7.x', '4.8.x'),
22-
UpgradePath('4.8.x', '5.0.x'),
23-
UpgradePath('5.0.x', '5.1.x'),
24-
UpgradePath('5.1.x', '5.2.x'),
25-
UpgradePath('5.2.x', '5.3.x'),
26-
UpgradePath('5.3.x', '5.4.x'),
27-
UpgradePath('5.4.x', '5.5.x'),
28-
UpgradePath('5.5.x', '5.6.x'),
29-
UpgradePath('5.6.x', '5.7.x'),
30-
UpgradePath('5.7.x', '5.8.x'),
31-
UpgradePath('5.8.x', '5.9.x'),
32-
UpgradePath('5.9.x', '5.10.x')
10+
ROLLING_UPGRADES_V5 = (
11+
UpgradePath('5.9.x', '5.10.x'),
3312
)
3413

35-
ROLLING_UPGRADES_V5 = (
36-
UpgradePath('5.0.x', '5.1.x'),
37-
UpgradePath('5.1.x', '5.2.x'),
14+
ROLLING_UPGRADES_V6 = (
3815
UpgradePath('5.2.x', '5.3.x'),
3916
UpgradePath('5.3.x', '5.4.x'),
4017
UpgradePath('5.4.x', '5.5.x'),
@@ -54,9 +31,9 @@
5431

5532
class RollingUpgradeTest(NodeProvider, unittest.TestCase):
5633

57-
def test_rolling_upgrade_4_to_5(self):
34+
def test_rolling_upgrade_5_to_5(self):
5835
print("") # force newline for first print
59-
for path in ROLLING_UPGRADES_V4:
36+
for path in ROLLING_UPGRADES_V5:
6037
print(f"From {path.from_version}")
6138
with self.subTest(repr(path)):
6239
try:
@@ -67,7 +44,7 @@ def test_rolling_upgrade_4_to_5(self):
6744

6845
def test_rolling_upgrade_5_to_6(self):
6946
print("") # force newline for first print
70-
for path in ROLLING_UPGRADES_V5:
47+
for path in ROLLING_UPGRADES_V6:
7148
print(f"From {path.from_version}")
7249
with self.subTest(repr(path)):
7350
try:

tests/bwc/test_upgrade.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,6 @@
2525

2626
UPGRADE_PATHS = (
2727
(
28-
VersionDef('4.0.x', []),
29-
VersionDef('4.1.x', []),
30-
VersionDef('4.2.x', []),
31-
VersionDef('4.3.x', []),
32-
VersionDef('4.4.x', []),
33-
VersionDef('4.5.x', []),
34-
VersionDef('4.6.x', []),
35-
VersionDef('4.7.x', []),
36-
VersionDef('4.8.x', []),
37-
VersionDef('5.0.x', []),
38-
VersionDef('5.1.x', []),
3928
VersionDef('5.2.x', []),
4029
VersionDef('5.3.x', []),
4130
VersionDef('5.4.x', []),
@@ -47,8 +36,6 @@
4736
VersionDef('5.10.x', []),
4837
),
4938
(
50-
VersionDef('5.0.x', []),
51-
VersionDef('5.1.x', []),
5239
VersionDef('5.2.x', []),
5340
VersionDef('5.3.x', []),
5441
VersionDef('5.4.x', []),

0 commit comments

Comments
 (0)