Skip to content

[CLI-3798] deprecation of --max-partition-memory-bytes - #3488

Open
Cynthia Qin (cqin-confluent) wants to merge 1 commit into
mainfrom
cli-3798-deprecate-max-partition-memory-bytes
Open

[CLI-3798] deprecation of --max-partition-memory-bytes#3488
Cynthia Qin (cqin-confluent) wants to merge 1 commit into
mainfrom
cli-3798-deprecate-max-partition-memory-bytes

Conversation

@cqin-confluent

@cqin-confluent Cynthia Qin (cqin-confluent) commented Sep 1, 2026

Copy link
Copy Markdown
Member

Release Notes

Bug Fixes

  • Mark the --max-partition-memory-bytes flag as deprecated in the confluent local services kafka produce command

Checklist

  • I have successfully built and used a custom CLI binary, without linter issues from this PR.
  • I have clearly specified in the What section below whether this PR applies to Confluent Cloud, Confluent Platform, or both.
  • I have verified this PR in Confluent Cloud pre-prod or production environment, if applicable.
  • I have verified this PR in Confluent Platform on-premises environment, if applicable.
  • I have attached manual CLI verification results or screenshots in the Test & Review section below.
  • I have added appropriate CLI integration or unit tests for any new or updated commands and functionality.
  • I confirm that this PR introduces no breaking changes or backward compatibility issues.
  • I have indicated the potential customer impact if something goes wrong in the Blast Radius section below.
  • I have put checkmarks below confirming that the feature associated with this PR is enabled in:
    • Confluent Cloud prod
    • Confluent Cloud stag
    • Confluent Platform
    • Check this box if the feature is enabled for certain organizations only

What

Applies to: Confluent Platform — specifically the on-prem confluent local services kafka produce command. No Confluent Cloud surface is affected: the cloud/native produce paths (confluent kafka topic produce, confluent local kafka topic produce) use native producers and never exposed this flag.

KIP-1231 deprecates the --max-partition-memory-bytes option in the Apache Kafka console producer. confluent local services kafka produce wraps that console producer and forwards this flag as a passthrough, so this PR reflects the deprecation in the CLI's help text.

Changes:

  • Prepend the repo-standard DEPRECATED: prefix (matching pkg/featureflags/announcements_and_deprecation.go and the internal/tableflow --record-failure-strategy precedent) to the flag's usage string in internal/local/command_service_kafka.go.
  • Fix a pre-existing typo on the same line ("small" → "smaller").
  • Update the two golden files that capture this help output (produce-help.golden, produce-help-onprem.golden).

The flag is retained and still works — removing it would be a breaking change. This is a help-text-only deprecation notice, matching the existing --record-failure-strategy precedent. It intentionally does not emit a runtime warning when the flag is used; that is the separate, server-driven LaunchDarkly deprecation mechanism and is out of scope here.

Blast Radius

Minimal. This is a help-text-only change to a single Confluent Platform local command flag; the flag's behavior is unchanged and it continues to work. Worst case if something is wrong: the --help output for confluent local services kafka produce renders incorrectly. No runtime, data-path, or Confluent Cloud impact.

References

  • Jira: CLI-3798
  • Blocked by: INIT-15091 — KIP-1231: Deprecate --max-partition-memory-bytes in ConsoleProducer
  • KIP-1231 (Apache Kafka)

Test & Review

Verified locally:

  • make build — pass
  • make lint-go — pass
  • make lint-cli — pass (confirms the DEPRECATED: text passes the user-facing-string spell check)
  • make integration-test INTEGRATION_TEST_ARGS="-run TestCLI/TestHelp" — pass, including the two relevant subtests:
    • TestCLI/TestHelp/local_services_kafka_produce_--help (cloud config)
    • TestCLI/TestHelp/local_services_kafka_produce_--help#01 (on-prem config)

Help output for this flag, before → after:

-      --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)

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 1, 2026 00:45
@confluent-cla-assistant

Copy link
Copy Markdown

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Confluent Platform confluent local services kafka produce help text to reflect KIP-1231’s deprecation of the Kafka console producer --max-partition-memory-bytes option, while keeping the flag behavior unchanged.

Changes:

  • Prepends DEPRECATED: to the --max-partition-memory-bytes flag usage string and fixes the “small” → “smaller” typo.
  • Updates the corresponding CLI help golden outputs for both cloud-config and on-prem-config help snapshots.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
internal/local/command_service_kafka.go Updates the max-partition-memory-bytes flag usage string to include the deprecation notice and corrects a typo.
test/fixtures/output/local/services/kafka/produce-help.golden Updates expected --help output to match the new deprecation-prefixed flag description.
test/fixtures/output/local/services/kafka/produce-help-onprem.golden Updates expected on-prem --help output to match the new deprecation-prefixed flag description.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@cqin-confluent Cynthia Qin (cqin-confluent) changed the title [CLI-3798] Note KIP-1231 deprecation of --max-partition-memory-bytes [CLI-3798] deprecation of --max-partition-memory-bytes Sep 1, 2026
@sonarqube-confluent

Copy link
Copy Markdown

@cqin-confluent
Cynthia Qin (cqin-confluent) marked this pull request as ready for review September 1, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants