You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "lucasbru (via GitHub)" <gi...@apache.org> on 2025/06/24 14:49:53 UTC
[PR] MINOR: Reject requests using unsupported features in KIP-1071 [kafka]
lucasbru opened a new pull request, #20031:
URL: https://github.com/apache/kafka/pull/20031
KIP-1071 does not currently support all features planned in the KIP. We should reject any requests that are using features that are currently not implemented.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Reject requests using unsupported features in KIP-1071 [kafka]
Posted by "lucasbru (via GitHub)" <gi...@apache.org>.
lucasbru commented on PR #20031:
URL: https://github.com/apache/kafka/pull/20031#issuecomment-3004657162
cherry-picked to 4.1
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Reject requests using unsupported features in KIP-1071 [kafka]
Posted by "lucasbru (via GitHub)" <gi...@apache.org>.
lucasbru merged PR #20031:
URL: https://github.com/apache/kafka/pull/20031
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Reject requests using unsupported features in KIP-1071 [kafka]
Posted by "lucasbru (via GitHub)" <gi...@apache.org>.
lucasbru commented on code in PR #20031:
URL: https://github.com/apache/kafka/pull/20031#discussion_r2166403138
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorService.java:
##########
@@ -559,6 +580,7 @@ public CompletableFuture<StreamsGroupHeartbeatResult> streamsGroupHeartbeat(
}
try {
+ throwIfStreamsGroupHeartbeatRequestIsUsingUnsupportedFeatures(request);
Review Comment:
I was wondering about the order, but I think if we are using an unsupported feature, we should know this from error message, even if the request is also not well-formed.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Reject requests using unsupported features in KIP-1071 [kafka]
Posted by "mjsax (via GitHub)" <gi...@apache.org>.
mjsax commented on code in PR #20031:
URL: https://github.com/apache/kafka/pull/20031#discussion_r2164523024
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorService.java:
##########
@@ -559,6 +580,7 @@ public CompletableFuture<StreamsGroupHeartbeatResult> streamsGroupHeartbeat(
}
try {
+ throwIfStreamsGroupHeartbeatRequestIsUsingUnsupportedFeatures(request);
Review Comment:
Nit: should we do this check after the "is valid" check?
##########
group-coordinator/src/test/java/org/apache/kafka/coordinator/group/GroupCoordinatorServiceTest.java:
##########
@@ -584,7 +669,7 @@ public void testStreamsHeartbeatRequestValidation() throws ExecutionException, I
.build(true);
AuthorizableRequestContext context = mock(AuthorizableRequestContext.class);
- when(context.requestVersion()).thenReturn((int) ApiKeys.SHARE_GROUP_HEARTBEAT.latestVersion());
+ when(context.requestVersion()).thenReturn((int) ApiKeys.STREAMS_GROUP_HEARTBEAT.latestVersion());
Review Comment:
Uff... Nice catch.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Reject requests using unsupported features in KIP-1071 [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #20031:
URL: https://github.com/apache/kafka/pull/20031#discussion_r2164850095
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorService.java:
##########
@@ -540,6 +541,26 @@ private static void throwIfStreamsGroupHeartbeatRequestIsInvalid(
}
}
+ /**
+ * Validates the request. Specifically, throws if any not-yet-supported features are used.
+ *
+ * @param request The request to validate.
+ * @throws InvalidRequestException if the request is not valid.
+ */
+ private static void throwIfStreamsGroupHeartbeatRequestIsUsingUnsupportedFeatures(
+ StreamsGroupHeartbeatRequestData request
+ ) throws InvalidRequestException {
+ throwIfNotNull(request.instanceId(), "Static membership is not yet supported.");
+ throwIfNotNull(request.taskOffsets(), "TaskOffsets are not supported yet.");
+ throwIfNotNull(request.taskEndOffsets(), "TaskEndOffsets are not supported yet.");
+ throwIfNotNullOrEmpty(request.warmupTasks(), "WarmupTasks are not supported yet.");
+ if (request.topology() != null) {
+ for (StreamsGroupHeartbeatRequestData.Subtopology subtopology : request.topology().subtopologies()) {
+ throwIfNotEmptyCollection(subtopology.sourceTopicRegex(), "Regular expressions for source topics is not supported yet.");
Review Comment:
nit: `is` -> `are`
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINOR: Reject requests using unsupported features in KIP-1071 [kafka]
Posted by "lucasbru (via GitHub)" <gi...@apache.org>.
lucasbru commented on code in PR #20031:
URL: https://github.com/apache/kafka/pull/20031#discussion_r2166410704
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupCoordinatorService.java:
##########
@@ -540,6 +541,26 @@ private static void throwIfStreamsGroupHeartbeatRequestIsInvalid(
}
}
+ /**
+ * Validates the request. Specifically, throws if any not-yet-supported features are used.
+ *
+ * @param request The request to validate.
+ * @throws InvalidRequestException if the request is not valid.
+ */
+ private static void throwIfStreamsGroupHeartbeatRequestIsUsingUnsupportedFeatures(
+ StreamsGroupHeartbeatRequestData request
+ ) throws InvalidRequestException {
+ throwIfNotNull(request.instanceId(), "Static membership is not yet supported.");
+ throwIfNotNull(request.taskOffsets(), "TaskOffsets are not supported yet.");
+ throwIfNotNull(request.taskEndOffsets(), "TaskEndOffsets are not supported yet.");
+ throwIfNotNullOrEmpty(request.warmupTasks(), "WarmupTasks are not supported yet.");
+ if (request.topology() != null) {
+ for (StreamsGroupHeartbeatRequestData.Subtopology subtopology : request.topology().subtopologies()) {
+ throwIfNotEmptyCollection(subtopology.sourceTopicRegex(), "Regular expressions for source topics is not supported yet.");
Review Comment:
Done
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org