You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MINOR: Include numeric bound in group config validation errors (#22185)
When a dynamic group config value is out of range, the error message
referenced the broker-level config name that defines the bound (e.g.
`group.consumer.min.heartbeat.interval.ms`). Operators had to look up
the broker config to know which value would be accepted.
This patch updates the `validateIntRange`, `validateIntMin`, and
`validateIntMax` helpers in `GroupConfig` to include the numeric bound
directly. For example, setting `consumer.heartbeat.interval.ms` below
the minimum now reports `consumer.heartbeat.interval.ms must be greater
than or equal to 5`.
A new parameterized test `testValidationErrorMessageIncludesBound`
covers both directions for each range-bounded config and the max-only
and min-only checks.
Reviewers: Andrew Schofield <aschofield@confluent.io>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
assertTrue(message.contains("org.apache.kafka.common.errors.InvalidConfigurationException: streams.session.timeout.ms must be greater than or equal to group.streams.min.session.timeout.ms"));
319
+
assertTrue(message.contains("org.apache.kafka.common.errors.InvalidConfigurationException: streams.session.timeout.ms must be in the range 45000 to 60000 inclusive."));
assertTrue(message.contains("org.apache.kafka.common.errors.InvalidConfigurationException: streams.session.timeout.ms must be less than or equal to group.streams.max.session.timeout.ms"));
327
+
assertTrue(message.contains("org.apache.kafka.common.errors.InvalidConfigurationException: streams.session.timeout.ms must be in the range 45000 to 60000 inclusive."));
328
328
}
329
329
330
330
@ClusterTest(serverProperties = {
@@ -347,15 +347,15 @@ public void testAlterStreamsGroupHeartbeatInterval() {
assertTrue(message.contains("org.apache.kafka.common.errors.InvalidConfigurationException: streams.heartbeat.interval.ms must be greater than or equal to group.streams.min.heartbeat.interval.ms"));
350
+
assertTrue(message.contains("org.apache.kafka.common.errors.InvalidConfigurationException: streams.heartbeat.interval.ms must be in the range 5000 to 55000 inclusive."));
assertTrue(message.contains("org.apache.kafka.common.errors.InvalidConfigurationException: streams.heartbeat.interval.ms must be less than or equal to group.streams.max.heartbeat.interval.ms"));
358
+
assertTrue(message.contains("org.apache.kafka.common.errors.InvalidConfigurationException: streams.heartbeat.interval.ms must be in the range 5000 to 55000 inclusive."));
359
359
360
360
// Should fail to set above session timeout
361
361
command = Stream.concat(quorumArgs(), Stream.of(
@@ -398,7 +398,7 @@ public void testAlterStreamsGroupNumOfStandbyReplicas() {
0 commit comments