From 37c0fa8dc26273907a08c1e20cc3dc9852dfc2c5 Mon Sep 17 00:00:00 2001 From: Cynthia Qin Date: Mon, 31 Aug 2026 17:43:32 -0700 Subject: [PATCH] [CLI-3798] Note KIP-1231 deprecation of --max-partition-memory-bytes KIP-1231 deprecates the `--max-partition-memory-bytes` option in the Apache Kafka console producer, which `confluent local services kafka produce` wraps. Reflect the deprecation by adding the repo-standard `DEPRECATED: ` prefix to the flag help text, and update the two produce-help golden files. Also fix a pre-existing typo ("small" -> "smaller") on the same line. Co-Authored-By: Claude Opus 4.8 --- internal/local/command_service_kafka.go | 2 +- .../output/local/services/kafka/produce-help-onprem.golden | 2 +- test/fixtures/output/local/services/kafka/produce-help.golden | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/local/command_service_kafka.go b/internal/local/command_service_kafka.go index 7b8caa5681..935a7d6754 100644 --- a/internal/local/command_service_kafka.go +++ b/internal/local/command_service_kafka.go @@ -74,7 +74,7 @@ var ( "line-reader": `The class name of the class to use for reading lines from stdin. By default each line is read as a separate message. (default "kafka.tools.ConsoleProducer$LineMessageReader")`, "max-block-ms": "The max time that the producer will block for during a send request. (default 60000)", "max-memory-bytes": "The total memory used by the producer to buffer records waiting to be sent to the server. (default 33554432)", - "max-partition-memory-bytes": "The buffer size allocated for a partition. When records are received which are small than this size, the producer will attempt to optimistically group them together until this size is reached. (default 16384)", + "max-partition-memory-bytes": "DEPRECATED: The buffer size allocated for a partition. When records are received which are smaller than this size, the producer will attempt to optimistically group them together until this size is reached. (default 16384)", "message-send-max-retries": "This property specifies the number of retries before the producer gives up and drops this message. Brokers can fail receiving a message for multiple reasons, and being unavailable transiently is just one of them. (default 3)", "metadata-expiry-ms": "The amount of time in milliseconds before a forced metadata refresh. This will occur independent of any leadership changes. (default 300000)", "producer-property": "A mechanism to pass user-defined properties in the form key=value to the producer.", diff --git a/test/fixtures/output/local/services/kafka/produce-help-onprem.golden b/test/fixtures/output/local/services/kafka/produce-help-onprem.golden index 92974b59a5..ebb3d3b016 100644 --- a/test/fixtures/output/local/services/kafka/produce-help-onprem.golden +++ b/test/fixtures/output/local/services/kafka/produce-help-onprem.golden @@ -23,7 +23,7 @@ Flags: --line-reader string The class name of the class to use for reading lines from stdin. By default each line is read as a separate message. (default "kafka.tools.ConsoleProducer$LineMessageReader") --max-block-ms int The max time that the producer will block for during a send request. (default 60000) --max-memory-bytes int The total memory used by the producer to buffer records waiting to be sent to the server. (default 33554432) - --max-partition-memory-bytes int The buffer size allocated for a partition. When records are received which are small than this size, the producer will attempt to optimistically group them together until this size is reached. (default 16384) + --max-partition-memory-bytes int DEPRECATED: The buffer size allocated for a partition. When records are received which are smaller than this size, the producer will attempt to optimistically group them together until this size is reached. (default 16384) --message-send-max-retries int This property specifies the number of retries before the producer gives up and drops this message. Brokers can fail receiving a message for multiple reasons, and being unavailable transiently is just one of them. (default 3) --metadata-expiry-ms int The amount of time in milliseconds before a forced metadata refresh. This will occur independent of any leadership changes. (default 300000) --producer\-property string A mechanism to pass user-defined properties in the form key=value to the producer. diff --git a/test/fixtures/output/local/services/kafka/produce-help.golden b/test/fixtures/output/local/services/kafka/produce-help.golden index 92974b59a5..ebb3d3b016 100644 --- a/test/fixtures/output/local/services/kafka/produce-help.golden +++ b/test/fixtures/output/local/services/kafka/produce-help.golden @@ -23,7 +23,7 @@ Flags: --line-reader string The class name of the class to use for reading lines from stdin. By default each line is read as a separate message. (default "kafka.tools.ConsoleProducer$LineMessageReader") --max-block-ms int The max time that the producer will block for during a send request. (default 60000) --max-memory-bytes int The total memory used by the producer to buffer records waiting to be sent to the server. (default 33554432) - --max-partition-memory-bytes int The buffer size allocated for a partition. When records are received which are small than this size, the producer will attempt to optimistically group them together until this size is reached. (default 16384) + --max-partition-memory-bytes int DEPRECATED: The buffer size allocated for a partition. When records are received which are smaller than this size, the producer will attempt to optimistically group them together until this size is reached. (default 16384) --message-send-max-retries int This property specifies the number of retries before the producer gives up and drops this message. Brokers can fail receiving a message for multiple reasons, and being unavailable transiently is just one of them. (default 3) --metadata-expiry-ms int The amount of time in milliseconds before a forced metadata refresh. This will occur independent of any leadership changes. (default 300000) --producer\-property string A mechanism to pass user-defined properties in the form key=value to the producer.