Skip to content

[APIE-1106] Update kafka topic create/update to support JSON-valued Configs#3412

Draft
Yifei Yuan (yyuan097) wants to merge 10 commits into
mainfrom
apie-1106-inline
Draft

[APIE-1106] Update kafka topic create/update to support JSON-valued Configs#3412
Yifei Yuan (yyuan097) wants to merge 10 commits into
mainfrom
apie-1106-inline

Conversation

@yyuan097

@yyuan097 Yifei Yuan (yyuan097) commented Jul 23, 2026

Copy link
Copy Markdown
Member

Release Notes

Breaking Changes

  • PLACEHOLDER

New Features

  • The confluent kafka topic create command now supports reading configs from a property file
  • The confluent kafka topic [create | update] commands now support reading json-valued configs from a config file with --config flag, or from inline configs

Bug Fixes

  • PLACEHOLDER

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

Allowed two new configs confluent.key.association and confluent.value.association in Confluent Cloud's confluent kafka topic (create | update) <topic> command.
This PR adds file support for kafka topic create and inline JSON support for both kafka topic (create | update).

  • New flag helper pcmd.AddTopicConfigFlag registers the topic config as StringArray instead of StringSlice, so pflag no longer CSV-parses the vales -> this preserves JSON value.
  • New parser properties.GetMapFromArray splits the configs by comma, it validates JSON value for confluent.(key|value).association keys, all other keys keeps the existing behaviour
  • Only applies to Confluent Cloud commands

Blast Radius

Confluent Cloud customers using confluent kafka topic (create | update) with any --config could be impacted if the new parser misparses input
All other --config consumers will not be impacted (still StringSlice and old parser), this change is designed to be backward compatible.

References

This PR extends from #3394

JIRA APIE-1106

INIT-11067 Odyssey Explicit Topic Subject Association - CLI

Test & Review

Manual Verifications & Tests:
APIE-1106 Support JSON-valued Configs from Config File - CLI Testing

WIP: Support Inline JSON-valued configs

@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.

@sonarqube-confluent

Copy link
Copy Markdown

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.

1 participant