-
Notifications
You must be signed in to change notification settings - Fork 1
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
NAS-121797 / 24.04 / CLI for ixdiagnose #61
Conversation
1db72a7
to
55d5447
Compare
Codecov Report
@@ Coverage Diff @@
## master #61 +/- ##
==========================================
+ Coverage 93.13% 95.09% +1.96%
==========================================
Files 89 90 +1
Lines 1675 1836 +161
==========================================
+ Hits 1560 1746 +186
+ Misses 115 90 -25
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
29ca50c
to
c078750
Compare
c078750
to
c3738cb
Compare
ixdiagnose/plugin.py
Outdated
@@ -28,6 +27,7 @@ def generate_plugins_debug(percentage: int = 0, total_percentage: int = 100) -> | |||
|
|||
plugins_report[plugin_name] = report | |||
percentage += plugin_percentage | |||
send_event(int(percentage + 0.5), f'Gathered debug information for {plugin_name!r} plugin') |
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.
We changed this to log what plug-in is being captured so it's easier to troubleshoot as well as be more intuitive for the end-user to know what's going on.
ixdiagnose/artifact.py
Outdated
@@ -25,6 +29,7 @@ def gather_artifacts(percentage: int = 0, total_percentage: int = 100) -> None: | |||
|
|||
artifacts_report[artifact_name] = report | |||
percentage += artifact_percentage | |||
send_event(int(percentage + 0.5), f'Gathered artifact {artifact_name!r}') |
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.
Same issue here. Please revert these changes.
c3738cb
to
1660751
Compare
Context
This PR addresses the request to enhance the ixdiagnose command-line interface (CLI). We've added subcommands and multiple options to provide users with increased flexibility when generating system debug from command line.
Features
Streamlined debugging with Python Click framework.
Added CLI commands: run, artifact, plugin.
Options for serialization, compression, exclude, timeout etc.
Example use:
ixdiagnose run --compress --serialized --> generates complete structured debug and compresses it.
ixdiagnose plugin --debug-path /tmp/debug -X vm,network --> generates only plugins' debug excluding vm,network and saves it at /tmp/debug
Appropriate help text for each command and subcommand is added.
Docs and Testing
Edited docs accordingly
Added unit tests of the feature using click.testing CliRunner