Skip to content

Conversation

@rionmonster
Copy link

@rionmonster rionmonster commented Dec 3, 2025

Description

Closes: KAFKA-19941

The goal of this minor pull request was to improve the existing
readability for the kafka-features.sh output which could be difficult
to decipher due to the inadequate spacing between properties. This
change improves that spacing by replacing the previous tab-based spacing
with a fixed-width approach to standardize property alignment.

In addition to these changes all of the affected tests within the
FeatureCommandTest suite were updated to ensure all of the existing
tests were passing after the changes were made.

Discussion and Rationale

These changes were discussed briefly within this mailing list
thread
,
however the conversation was primarily about if adjusting output would
equate to changing a public interface -- thus requiring a KIP.

While there were several possible options to improve the readability or
to support multiple formats potentially via an output parameter (e.g.
--output=table to table-formatted output, similarly with JSON, etc.),
these would be much larger bodies of work. The simplest approach in this
case was to just improve the spacing and allow the end-user to adopt
their preferred transformation from the existing format.

Example Output

kafka-features-alignment-output

Mentions

Tagging @chia7712 for review (as the initial creator of the JIRA)

@github-actions github-actions bot added triage PRs from the community tools small Small PRs labels Dec 3, 2025
Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

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

@rionmonster thanks for this patch. This patch requires a little bit of artistry 😄

short finalizedLevel = (featureMetadata.finalizedFeatures().get(feature) == null) ? 0 : featureMetadata.finalizedFeatures().get(feature).maxVersionLevel();
SupportedVersionRange range = featureMetadata.supportedFeatures().get(feature);
System.out.printf("Feature: %s\tSupportedMinVersion: %s\tSupportedMaxVersion: %s\tFinalizedVersionLevel: %s\tEpoch: %s%n",
System.out.printf("Feature: %s\t\tSupportedMinVersion: %s\t\tSupportedMaxVersion: %s\t\tFinalizedVersionLevel: %s\t\tEpoch: %s%n",
Copy link
Member

Choose a reason for hiding this comment

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

Is there a way to align these console outputs based on tab?

Copy link
Author

@rionmonster rionmonster Dec 4, 2025

Choose a reason for hiding this comment

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

Totally! We could introduce fixed width fields to handle the formatting (instead of tabs) which would make it more consistent as seen below:

image

@github-actions github-actions bot removed the small Small PRs label Dec 4, 2025
…tput

KAFKA-19941: Standardized property alignment for kafka-features.sh output
@rionmonster
Copy link
Author

@chia7712

I've gone ahead and updated the PR to include the width-based alignment approach and adjusted the associated tests. Let me know what you think and if we need to make any other changes on this front.

@github-actions github-actions bot removed the triage PRs from the community label Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants