-
Notifications
You must be signed in to change notification settings - Fork 14.8k
KAFKA-19941: Improved property spacing/readability of kafka-features.sh output #21072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
chia7712
left a comment
There was a problem hiding this 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", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…tput KAFKA-19941: Standardized property alignment for kafka-features.sh output
5c89d5f to
38012e6
Compare
|
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. |

Description
Closes: KAFKA-19941
The goal of this minor pull request was to improve the existing
readability for the
kafka-features.shoutput which could be difficultto 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
FeatureCommandTestsuite were updated to ensure all of the existingtests 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=tableto 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
Mentions
Tagging @chia7712 for review (as the initial creator of the JIRA)