Skip to content
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

refactor(kubectl-plugin): tidy up error handling and command execution #407

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

tiagolobocastro
Copy link
Contributor

Separate command execution from error handling.
Make use of common cli args and execution trait to remove redundant code. Remove excessing error mapping code.
todo: make execution trait even more generic (in the rest-plugin crate side) Currently the cli args for supportability rely on the fact that clap global allows us to specify "duplicates". I'm not sure if this is a good idea.. todo: Build dump cli args explicitly?

Description

Motivation and Context

Regression

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added unit tests to cover my changes.

Separate command execution from error handling.
Make use of common cli args and execution trait to remove redundant code.
Remove excessing error mapping code.
todo: make execution trait even more generic (in the rest-plugin crate side)
Currently the cli args for supportability rely on the fact that clap global
allows us to specify "duplicates". I'm not sure if this is a good idea..
todo: Build dump cli args explicitly?

Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
@tiagolobocastro
Copy link
Contributor Author

bors merge

@bors-openebs-mayastor
Copy link
Contributor

Build succeeded:

@bors-openebs-mayastor bors-openebs-mayastor bot merged commit c0e3a2f into develop Jan 24, 2024
5 checks passed
@bors-openebs-mayastor bors-openebs-mayastor bot deleted the plugin-refac branch January 24, 2024 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants