Skip to content

Conversation

m1a2st
Copy link
Collaborator

@m1a2st m1a2st commented Sep 8, 2025

When using the find command, it currently lists all directories and
files. However, if it cannot find a child node, it throws an exception
and prevents the subsequent directories from being printed. I think we
should change this behavior to print an error message instead of
throwing an exception, which would be more user-friendly.

In addition, since zkMigrationState is not used in Kafka 4.X, we should
remove this child node. This was missed in this
772aa24

Trunk:

>> find
.
// skip
./image/features/metadataVersion
Unexpected error: Expected zkMigrationState to be a valid child of
./image/features, but it was not.
java.lang.RuntimeException: Expected zkMigrationState to be a valid
child of ./image/features, but it was not.
        at
org.apache.kafka.shell.command.FindCommandHandler.find(FindCommandHandler.java:115)
        at
org.apache.kafka.shell.command.FindCommandHandler.find(FindCommandHandler.java:118)
        at
org.apache.kafka.shell.command.FindCommandHandler.find(FindCommandHandler.java:118)
        at
org.apache.kafka.shell.command.FindCommandHandler.lambda$run$0(FindCommandHandler.java:98)
        at
org.apache.kafka.shell.glob.GlobVisitor.accept(GlobVisitor.java:115)
        at
org.apache.kafka.shell.glob.GlobVisitor.accept(GlobVisitor.java:103)
        at
org.apache.kafka.shell.command.FindCommandHandler.run(FindCommandHandler.java:102)
        at
org.apache.kafka.shell.InteractiveShell.runMainLoop(InteractiveShell.java:113)
        at
org.apache.kafka.shell.MetadataShell.run(MetadataShell.java:169)
        at
org.apache.kafka.shell.MetadataShell.main(MetadataShell.java:226)

This branch if not find that node:

// skip
./image/features/metadataVersion
Expected zkMigrationState to be a valid child of ./image/features, but
it was not.
./image/producerIds
./image/producerIds/nextProducerId
./image/provenance
./image/scram
./image/scram/SCRAM-SHA-256
// skip

@github-actions github-actions bot added triage PRs from the community tools kraft small Small PRs labels Sep 8, 2025
Copy link

A label of 'needs-attention' was automatically added to this PR in order to raise the
attention of the committers. Once this issue has been triaged, the triage label
should be removed to prevent this automation from happening again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant