Skip to content

Allow empty config values to fallback to cluster defaults#2885

Open
yunasora wants to merge 3 commits intotchiotludo:devfrom
yunasora:dev
Open

Allow empty config values to fallback to cluster defaults#2885
yunasora wants to merge 3 commits intotchiotludo:devfrom
yunasora:dev

Conversation

@yunasora
Copy link
Copy Markdown

Fixes #2601

When creating a new topic, if a user leaves cleanup.policy or retention blank (intending to use the cluster's default settings), the process previously failed. This PR fixes the issue across both the frontend and backend.

Changes made:

  1. Backend: Added a .filter() in the controller to remove empty configuration values ("") from the request payload, preventing Kafka from rejecting them.
  2. Frontend: Updated the Joi validation schema in TopicCreate.jsx to .allow('') for the retention field, ensuring the UI doesn't block the submission when the field is cleared.

Testing:

  • Verified locally that leaving Retention blank successfully creates the topic using the cluster default configuration.
  • Passed all CI tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Allow Cleanup Policy & Retention to Be Empty to Use Cluster Defaults During Topic Creation

1 participant