lucasbru commented on code in PR #22397:
URL: https://github.com/apache/kafka/pull/22397#discussion_r3342477786


##########
core/src/test/scala/unit/kafka/server/RequestQuotaTest.scala:
##########
@@ -905,6 +905,8 @@ object RequestQuotaTest {
   val Envelope = Set(ApiKeys.ENVELOPE)
   val ShareGroupState = Set(ApiKeys.INITIALIZE_SHARE_GROUP_STATE, 
ApiKeys.READ_SHARE_GROUP_STATE, ApiKeys.WRITE_SHARE_GROUP_STATE,
     ApiKeys.DELETE_SHARE_GROUP_STATE, ApiKeys.READ_SHARE_GROUP_STATE_SUMMARY)
+  // APIs whose broker handler has not been wired yet; exclude from quota 
tests until they land.
+  val UnimplementedApis: Set[ApiKeys] = 
Set(ApiKeys.STREAMS_GROUP_TOPOLOGY_DESCRIPTION_UPDATE)

Review Comment:
   That's okay, but a bit awkward. Could we instead add a stub handler in 
KafkaApis that returns `UNSUPPORTED_VERSION`? Then we should be able to make it 
work without this workaround.



##########
clients/src/main/resources/common/message/StreamsGroupTopologyDescriptionUpdateRequest.json:
##########
@@ -0,0 +1,71 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+{
+  "apiKey": 93,
+  "type": "request",
+  "listeners": ["broker"],
+  "name": "StreamsGroupTopologyDescriptionUpdateRequest",
+  // The broker handler is not yet implemented (deferred to a later sub-task 
of KIP-1331),
+  // so the latest version is marked unstable to suppress ApiVersions 
advertisement.
+  "latestVersionUnstable": true,
+  "validVersions": "0",
+  "flexibleVersions": "0+",
+  "fields": [
+    { "name": "GroupId", "type": "string", "versions": "0+", "entityType": 
"groupId",
+      "about": "The streams group identifier." },
+    { "name": "MemberId", "type": "string", "versions": "0+",
+      "about": "The ID of the streams group member sending the push. The 
broker validates that this member is still in the group; mismatches (including 
when the group itself has been deleted) are rejected with UNKNOWN_MEMBER_ID so 
the client treats itself as fenced and rejoins." },
+    { "name": "TopologyEpoch", "type": "int32", "versions": "0+",
+      "about": "The epoch of the topology being described." },
+    { "name": "TopologyDescription", "type": "TopologyDescription", 
"versions": "0+",
+      "about": "The topology description." }
+  ],
+  "commonStructs": [
+    { "name": "TopologyDescription", "versions": "0+", "fields": [
+      { "name": "Subtopologies", "type": "[]TopologyDescriptionSubtopology", 
"versions": "0+",
+        "about": "The subtopologies that make up this topology." },
+      { "name": "GlobalStores", "type": "[]TopologyDescriptionGlobalStore", 
"versions": "0+",
+        "about": "Global state stores used by this topology." }
+    ]},
+    { "name": "TopologyDescriptionSubtopology", "versions": "0+", "fields": [

Review Comment:
   KIP-1331 names these structs Subtopology / TopologyNode / GlobalStore. Here 
they're prefixed (TopologyDescriptionSubtopology etc.) — reasonable, and 
wire-compatible since the struct name isn't serialized. I updated the KIP.



##########
clients/src/main/resources/common/message/StreamsGroupDescribeResponse.json:
##########
@@ -106,7 +107,12 @@
               "about": "True for classic members that have not been upgraded 
yet." }
           ]},
         { "name": "AuthorizedOperations", "type": "int32", "versions": "0+", 
"default": "-2147483648",
-          "about": "32-bit bitfield to represent authorized operations for 
this group." }
+          "about": "32-bit bitfield to represent authorized operations for 
this group." },
+        { "name": "TopologyDescription", "type": "TopologyDescription", 
"versions": "1+",
+          "nullableVersions": "1+", "default": "null",
+          "about": "The full topology description for this group. Non-null if 
and only if TopologyDescriptionStatus is AVAILABLE (3); null otherwise." },
+        { "name": "TopologyDescriptionStatus", "type": "int8", "versions": 
"1+", "default": "0",

Review Comment:
   Yes! We did something similar in StreamsGroupHeartbeatResponse.Status. It's 
not public interface, so it's not in the interface, but it's more readable and 
shared. Please do it.



##########
clients/src/main/resources/common/message/StreamsGroupTopologyDescriptionUpdateRequest.json:
##########
@@ -0,0 +1,71 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//    http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+{
+  "apiKey": 93,
+  "type": "request",
+  "listeners": ["broker"],
+  "name": "StreamsGroupTopologyDescriptionUpdateRequest",
+  // The broker handler is not yet implemented (deferred to a later sub-task 
of KIP-1331),
+  // so the latest version is marked unstable to suppress ApiVersions 
advertisement.
+  "latestVersionUnstable": true,

Review Comment:
   This new RPC is correctly marked `latestVersionUnstable` until the broker 
handler lands, but the three version bumps in the same PR — 
StreamsGroupHeartbeat v1, StreamsGroupDescribe v1, and DeleteGroups v3 — are 
not. Should these three bumps get the same treatment until their handlers are 
wired up? That would also potentially allow other features to land in the same 
release without an additional feature version bump.
   
   Please make sure to create a subtask to mark everything stable before the 
release.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to