Skip to content

HDDS-15367. Shell completion knows too few commands#10360

Merged
adoroszlai merged 1 commit into
apache:masterfrom
adoroszlai:HDDS-15367
May 27, 2026
Merged

HDDS-15367. Shell completion knows too few commands#10360
adoroszlai merged 1 commit into
apache:masterfrom
adoroszlai:HDDS-15367

Conversation

@adoroszlai
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Shell completion, implemented in HDDS-12811, knows about only very few commands:

$ ozone completion bash | grep 'local cmds'
  local cmds0=(genconf)
  local cmds1=(getconf)
  local cmds2=(completion)
  local cmds3=(ratis)
  local cmds4=(getconf confKey)
  local cmds5=(getconf -confKey)
  local cmds6=(getconf storagecontainermanagers)
  local cmds7=(getconf -storagecontainermanagers)
  local cmds8=(getconf ozonemanagers)
  local cmds9=(getconf -ozonemanagers)
  local cmds10=(completion bash)
  local cmds11=(completion zsh)

It was broken by HDDS-14595, which removed ozone-cli-shell etc. from classpath of ozone-tools.

This PR changes ozone completion to run in ozone-dist, the module which depends on all other Ozone modules. This makes all ozone subcommands available on the classpath.

https://issues.apache.org/jira/browse/HDDS-15367

How was this patch tested?

$ ozone completion bash | grep 'local cmds' | wc -l
344

Also tested completion after:

$ source <(ozone completion bash)
$ ozone <TAB><TAB>
admin       completion  debug       freon       genconf     getconf     ratis       repair      s3          sh          tenant      vapor       
$ ozone debug <TAB><TAB>
auditparser  checknative  datanode     kerberos     ldb          log          om           ratis        replicas     version      

CI:
https://github.com/adoroszlai/ozone/actions/runs/26406422556

@adoroszlai adoroszlai self-assigned this May 25, 2026
Copy link
Copy Markdown
Contributor

@dombizita dombizita left a comment

Choose a reason for hiding this comment

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

Thanks @adoroszlai, looks good to me!

@adoroszlai adoroszlai merged commit 5565989 into apache:master May 27, 2026
46 checks passed
@adoroszlai
Copy link
Copy Markdown
Contributor Author

Thanks @dombizita for the review.

@adoroszlai adoroszlai deleted the HDDS-15367 branch May 27, 2026 06:19
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