From 65b66dd1c28da85f025a0bc3bd31e237a07deff6 Mon Sep 17 00:00:00 2001 From: Ishita Dixit Date: Fri, 24 Jul 2026 15:50:39 +0530 Subject: [PATCH 1/2] PHOENIX-7969 Update supported client versions in backward compatibility tests --- .../BackwardCompatibilityTestUtil.java | 18 +- .../resources/compatible_client_versions.json | 181 ++++++++++++++---- 2 files changed, 151 insertions(+), 48 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BackwardCompatibilityTestUtil.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BackwardCompatibilityTestUtil.java index bfea0ed7162..bebf9e666b4 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BackwardCompatibilityTestUtil.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BackwardCompatibilityTestUtil.java @@ -139,14 +139,18 @@ public static List computeClientVersionGroups() throws Excep BackwardCompatibilityIT.class.getClassLoader().getResourceAsStream(COMPATIBLE_CLIENTS_JSON)) { assertNotNull(inputStream); JsonNode jsonNode = mapper.readTree(inputStream); - JsonNode HBaseProfile = jsonNode.get(hbaseProfile); - List artifacts = new ArrayList<>(); - for (final JsonNode clientVersion : HBaseProfile) { - artifacts.add(mapper.treeToValue(clientVersion, MavenCoordinates.class)); + JsonNode hbaseProfileNode = jsonNode.get(hbaseProfile); + if (hbaseProfileNode == null) { + return clientVersionGroups; } - if (!artifacts.isEmpty()) { - MavenCoordinates primary = artifacts.get(0); - clientVersionGroups.add(new ClientVersionGroup(primary, artifacts)); + for (final JsonNode groupNode : hbaseProfileNode) { + List artifacts = new ArrayList<>(); + for (final JsonNode clientVersion : groupNode) { + artifacts.add(mapper.treeToValue(clientVersion, MavenCoordinates.class)); + } + if (!artifacts.isEmpty()) { + clientVersionGroups.add(new ClientVersionGroup(artifacts.get(0), artifacts)); + } } } return clientVersionGroups; diff --git a/phoenix-core/src/it/resources/compatible_client_versions.json b/phoenix-core/src/it/resources/compatible_client_versions.json index e48386a44c3..72d97c6114c 100644 --- a/phoenix-core/src/it/resources/compatible_client_versions.json +++ b/phoenix-core/src/it/resources/compatible_client_versions.json @@ -1,50 +1,149 @@ { "_comment": "Lists all phoenix compatible client versions against the current branch version for a given hbase profile.", "2.4": [ - { - "artifactId": "phoenix-client-hbase-2.4", - "version": "5.1.2" - } + [ + { + "artifactId": "phoenix-client-hbase-2.4", + "version": "5.1.2" + } + ] ], "2.5": [ - { - "artifactId": "phoenix-client-hbase-2.5", - "version": "5.1.3" - } + [ + { + "artifactId": "phoenix-client-embedded-hbase-2.5", + "version": "5.2.2" + }, + { + "artifactId": "sqlline", + "version": "1.9.0", + "groupId": "sqlline" + }, + { + "artifactId": "jline-terminal", + "version": "3.12.1", + "groupId": "org.jline" + }, + { + "artifactId": "jline-reader", + "version": "3.12.1", + "groupId": "org.jline" + }, + { + "artifactId": "jline-builtins", + "version": "3.12.1", + "groupId": "org.jline" + }, + { + "artifactId": "log4j-1.2-api", + "version": "2.25.3", + "groupId": "org.apache.logging.log4j" + } + ], + [ + { + "artifactId": "phoenix-client-embedded-hbase-2.5", + "version": "5.3.2" + }, + { + "artifactId": "sqlline", + "version": "1.9.0", + "groupId": "sqlline" + }, + { + "artifactId": "jline-terminal", + "version": "3.12.1", + "groupId": "org.jline" + }, + { + "artifactId": "jline-reader", + "version": "3.12.1", + "groupId": "org.jline" + }, + { + "artifactId": "jline-builtins", + "version": "3.12.1", + "groupId": "org.jline" + }, + { + "artifactId": "log4j-1.2-api", + "version": "2.25.3", + "groupId": "org.apache.logging.log4j" + }, + { + "artifactId": "commons-logging", + "version": "1.2", + "groupId": "commons-logging" + } + ] ], "2.6": [ - { - "artifactId": "phoenix-client-embedded-hbase-2.6", - "version": "5.2.1" - }, - { - "artifactId": "phoenix-core-client", - "version": "5.2.1" - }, - { - "artifactId": "sqlline", - "version": "1.9.0", - "groupId": "sqlline" - }, - { - "artifactId": "jline-terminal", - "version": "3.12.1", - "groupId": "org.jline" - }, - { - "artifactId": "jline-reader", - "version": "3.12.1", - "groupId": "org.jline" - }, - { - "artifactId": "jline-builtins", - "version": "3.12.1", - "groupId": "org.jline" - }, - { - "artifactId": "log4j-1.2-api", - "version": "2.18.0", - "groupId": "org.apache.logging.log4j" - } + [ + { + "artifactId": "phoenix-client-embedded-hbase-2.6", + "version": "5.2.2" + }, + { + "artifactId": "sqlline", + "version": "1.9.0", + "groupId": "sqlline" + }, + { + "artifactId": "jline-terminal", + "version": "3.12.1", + "groupId": "org.jline" + }, + { + "artifactId": "jline-reader", + "version": "3.12.1", + "groupId": "org.jline" + }, + { + "artifactId": "jline-builtins", + "version": "3.12.1", + "groupId": "org.jline" + }, + { + "artifactId": "log4j-1.2-api", + "version": "2.25.3", + "groupId": "org.apache.logging.log4j" + } + ], + [ + { + "artifactId": "phoenix-client-embedded-hbase-2.6", + "version": "5.3.2" + }, + { + "artifactId": "sqlline", + "version": "1.9.0", + "groupId": "sqlline" + }, + { + "artifactId": "jline-terminal", + "version": "3.12.1", + "groupId": "org.jline" + }, + { + "artifactId": "jline-reader", + "version": "3.12.1", + "groupId": "org.jline" + }, + { + "artifactId": "jline-builtins", + "version": "3.12.1", + "groupId": "org.jline" + }, + { + "artifactId": "log4j-1.2-api", + "version": "2.25.3", + "groupId": "org.apache.logging.log4j" + }, + { + "artifactId": "commons-logging", + "version": "1.2", + "groupId": "commons-logging" + } + ] ] } From 72fc7653b8d6372ee3f49c41d525d71fdf754b90 Mon Sep 17 00:00:00 2001 From: Ishita Dixit Date: Fri, 24 Jul 2026 22:56:54 +0530 Subject: [PATCH 2/2] PHOENIX-7969 Rename loop variables per review feedback --- .../phoenix/end2end/BackwardCompatibilityTestUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BackwardCompatibilityTestUtil.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BackwardCompatibilityTestUtil.java index bebf9e666b4..77f6134b44a 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/BackwardCompatibilityTestUtil.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/BackwardCompatibilityTestUtil.java @@ -143,10 +143,10 @@ public static List computeClientVersionGroups() throws Excep if (hbaseProfileNode == null) { return clientVersionGroups; } - for (final JsonNode groupNode : hbaseProfileNode) { + for (final JsonNode clientVersionGroupNode : hbaseProfileNode) { List artifacts = new ArrayList<>(); - for (final JsonNode clientVersion : groupNode) { - artifacts.add(mapper.treeToValue(clientVersion, MavenCoordinates.class)); + for (final JsonNode artifactNode : clientVersionGroupNode) { + artifacts.add(mapper.treeToValue(artifactNode, MavenCoordinates.class)); } if (!artifacts.isEmpty()) { clientVersionGroups.add(new ClientVersionGroup(artifacts.get(0), artifacts));