This is an automated email from the ASF dual-hosted git repository.

jolshan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 53d592e369f MINOR: Fix type in MetadataVersion.IBP_4_0_IV0 (#16181)
53d592e369f is described below

commit 53d592e369f9ea5d3a25d828bbc1c4845a8a1f92
Author: David Jacot <dja...@confluent.io>
AuthorDate: Tue Jun 4 05:48:04 2024 +0200

    MINOR: Fix type in MetadataVersion.IBP_4_0_IV0 (#16181)
    
    This patch fixes a typo in MetadataVersion.IBP_4_0_IV0. It should be 0 not 
O.
    
    Reviewers: Justine Olshan <jols...@confluent.io>, Jun Rao 
<jun...@gmail.com>,  Chia-Ping Tsai <chia7...@gmail.com>
---
 core/src/test/java/kafka/test/ClusterTestExtensionsTest.java      | 2 +-
 core/src/test/java/kafka/test/annotation/ClusterTest.java         | 2 +-
 .../scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala   | 2 +-
 .../src/test/scala/unit/kafka/server/ApiVersionsRequestTest.scala | 4 ++--
 core/src/test/scala/unit/kafka/server/ReplicationQuotasTest.scala | 2 +-
 .../java/org/apache/kafka/controller/QuorumControllerTest.java    | 8 ++++----
 .../main/java/org/apache/kafka/server/common/GroupVersion.java    | 2 +-
 .../main/java/org/apache/kafka/server/common/MetadataVersion.java | 2 +-
 .../java/org/apache/kafka/server/common/MetadataVersionTest.java  | 6 +++---
 9 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/core/src/test/java/kafka/test/ClusterTestExtensionsTest.java 
b/core/src/test/java/kafka/test/ClusterTestExtensionsTest.java
index c8b53f8b8a2..aba96eccdd8 100644
--- a/core/src/test/java/kafka/test/ClusterTestExtensionsTest.java
+++ b/core/src/test/java/kafka/test/ClusterTestExtensionsTest.java
@@ -185,7 +185,7 @@ public class ClusterTestExtensionsTest {
 
     @ClusterTest
     public void testDefaults(ClusterInstance clusterInstance) {
-        Assertions.assertEquals(MetadataVersion.IBP_4_0_IVO, 
clusterInstance.config().metadataVersion());
+        Assertions.assertEquals(MetadataVersion.IBP_4_0_IV0, 
clusterInstance.config().metadataVersion());
     }
 
     @ClusterTests({
diff --git a/core/src/test/java/kafka/test/annotation/ClusterTest.java 
b/core/src/test/java/kafka/test/annotation/ClusterTest.java
index bd95249b4f4..5557abeb335 100644
--- a/core/src/test/java/kafka/test/annotation/ClusterTest.java
+++ b/core/src/test/java/kafka/test/annotation/ClusterTest.java
@@ -40,7 +40,7 @@ public @interface ClusterTest {
     AutoStart autoStart() default AutoStart.DEFAULT;
     SecurityProtocol securityProtocol() default SecurityProtocol.PLAINTEXT;
     String listener() default "";
-    MetadataVersion metadataVersion() default MetadataVersion.IBP_4_0_IVO;
+    MetadataVersion metadataVersion() default MetadataVersion.IBP_4_0_IV0;
     ClusterConfigProperty[] serverProperties() default {};
     // users can add tags that they want to display in test
     String[] tags() default {};
diff --git 
a/core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala 
b/core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala
index c0b6d916ec2..e98a8fdeccb 100644
--- a/core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala
+++ b/core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala
@@ -73,7 +73,7 @@ object ZkMigrationIntegrationTest {
       MetadataVersion.IBP_3_7_IV2,
       MetadataVersion.IBP_3_7_IV4,
       MetadataVersion.IBP_3_8_IV0,
-      MetadataVersion.IBP_4_0_IVO
+      MetadataVersion.IBP_4_0_IV0
     ).map { mv =>
       val serverProperties = new util.HashMap[String, String]()
       serverProperties.put("inter.broker.listener.name", "EXTERNAL")
diff --git a/core/src/test/scala/unit/kafka/server/ApiVersionsRequestTest.scala 
b/core/src/test/scala/unit/kafka/server/ApiVersionsRequestTest.scala
index 3a69669d349..98a66eccd5a 100644
--- a/core/src/test/scala/unit/kafka/server/ApiVersionsRequestTest.scala
+++ b/core/src/test/scala/unit/kafka/server/ApiVersionsRequestTest.scala
@@ -47,7 +47,7 @@ object ApiVersionsRequestTest {
     List(ClusterConfig.defaultBuilder()
       .setTypes(java.util.Collections.singleton(Type.ZK))
       .setServerProperties(serverProperties)
-      .setMetadataVersion(MetadataVersion.IBP_4_0_IVO)
+      .setMetadataVersion(MetadataVersion.IBP_4_0_IV0)
       .build()).asJava
   }
 
@@ -83,7 +83,7 @@ object ApiVersionsRequestTest {
 class ApiVersionsRequestTest(cluster: ClusterInstance) extends 
AbstractApiVersionsRequestTest(cluster) {
 
   @ClusterTemplate("testApiVersionsRequestTemplate")
-  @ClusterTest(types = Array(Type.KRAFT, Type.CO_KRAFT), metadataVersion = 
MetadataVersion.IBP_4_0_IVO, serverProperties = Array(
+  @ClusterTest(types = Array(Type.KRAFT, Type.CO_KRAFT), metadataVersion = 
MetadataVersion.IBP_4_0_IV0, serverProperties = Array(
     new ClusterConfigProperty(key = "unstable.api.versions.enable", value = 
"false"),
     new ClusterConfigProperty(key = "unstable.feature.versions.enable", value 
= "true")
   ))
diff --git a/core/src/test/scala/unit/kafka/server/ReplicationQuotasTest.scala 
b/core/src/test/scala/unit/kafka/server/ReplicationQuotasTest.scala
index 03623bab41f..1f947dd8fae 100644
--- a/core/src/test/scala/unit/kafka/server/ReplicationQuotasTest.scala
+++ b/core/src/test/scala/unit/kafka/server/ReplicationQuotasTest.scala
@@ -299,7 +299,7 @@ class ReplicationQuotasTest extends QuorumTestHarness {
     features.add(new BrokerRegistrationRequestData.Feature()
       .setName(MetadataVersion.FEATURE_NAME)
       .setMinSupportedVersion(MetadataVersion.IBP_3_0_IV1.featureLevel())
-      .setMaxSupportedVersion(MetadataVersion.IBP_4_0_IVO.featureLevel()))
+      .setMaxSupportedVersion(MetadataVersion.IBP_4_0_IV0.featureLevel()))
     controllerServer.controller.registerBroker(
       ControllerRequestContextUtil.ANONYMOUS_CONTEXT,
       new BrokerRegistrationRequestData()
diff --git 
a/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerTest.java 
b/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerTest.java
index 4498778592c..e494ca3e9aa 100644
--- 
a/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerTest.java
+++ 
b/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerTest.java
@@ -196,7 +196,7 @@ public class QuorumControllerTest {
         ) {
             controlEnv.activeController().registerBroker(ANONYMOUS_CONTEXT,
                 new BrokerRegistrationRequestData().
-                setFeatures(brokerFeatures(MetadataVersion.IBP_3_0_IV1, 
MetadataVersion.IBP_4_0_IVO)).
+                setFeatures(brokerFeatures(MetadataVersion.IBP_3_0_IV1, 
MetadataVersion.IBP_4_0_IV0)).
                 setBrokerId(0).
                 
setLogDirs(Collections.singletonList(Uuid.fromString("iiaQjkRPQcuMULNII0MUeA"))).
                 setClusterId(logEnv.clusterId())).get();
@@ -240,7 +240,7 @@ public class QuorumControllerTest {
         ) {
             controlEnv.activeController().registerBroker(ANONYMOUS_CONTEXT,
                 new BrokerRegistrationRequestData().
-                    setFeatures(brokerFeatures(MetadataVersion.IBP_3_0_IV1, 
MetadataVersion.IBP_4_0_IVO)).
+                    setFeatures(brokerFeatures(MetadataVersion.IBP_3_0_IV1, 
MetadataVersion.IBP_4_0_IV0)).
                     setBrokerId(0).
                     
setLogDirs(Collections.singletonList(Uuid.fromString("sTbzRAMnTpahIyIPNjiLhw"))).
                     setClusterId(logEnv.clusterId())).get();
@@ -298,7 +298,7 @@ public class QuorumControllerTest {
                     new BrokerRegistrationRequestData().
                         setBrokerId(brokerId).
                         setClusterId(active.clusterId()).
-                        
setFeatures(brokerFeatures(MetadataVersion.IBP_3_0_IV1, 
MetadataVersion.IBP_4_0_IVO)).
+                        
setFeatures(brokerFeatures(MetadataVersion.IBP_3_0_IV1, 
MetadataVersion.IBP_4_0_IV0)).
                         setIncarnationId(Uuid.randomUuid()).
                         setListeners(listeners));
                 brokerEpochs.put(brokerId, reply.get().epoch());
@@ -717,7 +717,7 @@ public class QuorumControllerTest {
                     setBrokerId(0).
                     setClusterId(active.clusterId()).
                     
setIncarnationId(Uuid.fromString("kxAT73dKQsitIedpiPtwBA")).
-                    setFeatures(brokerFeatures(MetadataVersion.IBP_3_0_IV1, 
MetadataVersion.IBP_4_0_IVO)).
+                    setFeatures(brokerFeatures(MetadataVersion.IBP_3_0_IV1, 
MetadataVersion.IBP_4_0_IV0)).
                     
setLogDirs(Collections.singletonList(Uuid.fromString("vBpaRsZVSaGsQT53wtYGtg"))).
                     setListeners(listeners));
             assertEquals(5L, reply.get().epoch());
diff --git 
a/server-common/src/main/java/org/apache/kafka/server/common/GroupVersion.java 
b/server-common/src/main/java/org/apache/kafka/server/common/GroupVersion.java
index 002d7ef33f4..b59df64666d 100644
--- 
a/server-common/src/main/java/org/apache/kafka/server/common/GroupVersion.java
+++ 
b/server-common/src/main/java/org/apache/kafka/server/common/GroupVersion.java
@@ -22,7 +22,7 @@ import java.util.Map;
 public enum GroupVersion implements FeatureVersion {
 
     // Version 1 enables the consumer rebalance protocol (KIP-848).
-    GV_1(1, MetadataVersion.IBP_4_0_IVO, Collections.emptyMap());
+    GV_1(1, MetadataVersion.IBP_4_0_IV0, Collections.emptyMap());
 
     public static final String FEATURE_NAME = "group.version";
 
diff --git 
a/server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java
 
b/server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java
index 26b67321e4a..f867edb54e1 100644
--- 
a/server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java
+++ 
b/server-common/src/main/java/org/apache/kafka/server/common/MetadataVersion.java
@@ -205,7 +205,7 @@ public enum MetadataVersion {
     IBP_3_8_IV0(20, "3.8", "IV0", true),
 
     // Introduce version 1 of the GroupVersion feature (KIP-848).
-    IBP_4_0_IVO(21, "4.0", "IV0", false);
+    IBP_4_0_IV0(21, "4.0", "IV0", false);
 
     // NOTES when adding a new version:
     //   Update the default version in @ClusterTest annotation to point to the 
latest version
diff --git 
a/server-common/src/test/java/org/apache/kafka/server/common/MetadataVersionTest.java
 
b/server-common/src/test/java/org/apache/kafka/server/common/MetadataVersionTest.java
index cfcdcf3afe6..d8397ce615a 100644
--- 
a/server-common/src/test/java/org/apache/kafka/server/common/MetadataVersionTest.java
+++ 
b/server-common/src/test/java/org/apache/kafka/server/common/MetadataVersionTest.java
@@ -186,7 +186,7 @@ class MetadataVersionTest {
 
         assertEquals(IBP_3_8_IV0, 
MetadataVersion.fromVersionString("3.8-IV0"));
 
-        assertEquals(IBP_4_0_IVO, 
MetadataVersion.fromVersionString("4.0-IV0"));
+        assertEquals(IBP_4_0_IV0, 
MetadataVersion.fromVersionString("4.0-IV0"));
     }
 
     @Test
@@ -247,7 +247,7 @@ class MetadataVersionTest {
         assertEquals("3.7", IBP_3_7_IV3.shortVersion());
         assertEquals("3.7", IBP_3_7_IV4.shortVersion());
         assertEquals("3.8", IBP_3_8_IV0.shortVersion());
-        assertEquals("4.0", IBP_4_0_IVO.shortVersion());
+        assertEquals("4.0", IBP_4_0_IV0.shortVersion());
     }
 
     @Test
@@ -297,7 +297,7 @@ class MetadataVersionTest {
         assertEquals("3.7-IV3", IBP_3_7_IV3.version());
         assertEquals("3.7-IV4", IBP_3_7_IV4.version());
         assertEquals("3.8-IV0", IBP_3_8_IV0.version());
-        assertEquals("4.0-IV0", IBP_4_0_IVO.version());
+        assertEquals("4.0-IV0", IBP_4_0_IV0.version());
     }
 
     @Test

Reply via email to