feat: new tedge command to collect diagnostic information tedge diag collect#3608
Conversation
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
didier-wenzek
left a comment
There was a problem hiding this comment.
This is a nice first working version
|
@rina23q It seems that the execution order of the plugins is not controlled, as the order keeps on changing, below shows the output from two different runs. Run 1 Run 2 Expected
|
|
@rina23q Overall the feature works nicely. It was able to guess how to use it by simply using the tab completion for the new command, and looking at the existing plugins (a really good sign that it has a solid existing UX). Below are just some minor improvements/suggestions to improve the overall UX (mostly polish).
|
a94113d to
b8ddd6f
Compare
5ba1b27 to
e77cf27
Compare
|
@reubenmiller
Done! Switched from
No, and since now the code uses the same plugin APIs as software management and others, the output log file keeps both stdout and stderr together. I updated the specification markdown file accordingly.
Related to the point 1, since the plugin API outputs some more information other than stdout and stderr, empty file should not be created now.
Changed to output a warning message as below. I'm still now searching for a better crate to address error/warn/info messages in a nice way, the output color and format may be changed in a later point.
I added a new option
Previously, I used RFC3339 format (e.g.
I haven't done it yet. I'll put it in todo.
I think green or blue. Yellow was definitely wrong. Related to the point 3, it's still in todo to improve output messages. |
Robot Results
|
|
To track the progress of #3608 (review)
|
reubenmiller
left a comment
There was a problem hiding this comment.
Approved. Overall nice addition and works nicely.
The Security aspects and writing to stdout can be changed in follow up PRs
tedge diag collecttedge diag collect
tedge diag collecttedge diag collect
Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
Signed-off-by: Rina Fujino <rina.fujino.23@gmail.com>
36fb79c to
c98ab9c
Compare
Proposed changes
tedge diagand its sub-commandcollecthelps users to get debugging information.For the design and the contracts between the runner and the plugin APIs, refer to
docs/src/references/diagnostic-plugin.mdin this PR.How to try
--plugin-diroption and executeTodos in this PR
tedge diag collect#3608 (comment)/usr/share/tedge/diag-plugins(edit the nfpm.yaml file for the tedge binary)configuration/contrib/diag-pluginsand add a template calledtemplate.ignore.ignoreFollow-up
tedge diag collect#3608 (comment)tedge diag collect#3608 (comment)Spinnershould output tostderr; point 7 in feat: new tedge command to collect diagnostic informationtedge diag collect#3608 (review)Note
07_mosquittoplugin may return an error for the case/var/log/mosquitto/mosquitto.lognot readable by userTypes of changes
Paste Link to the issue
#3412
Checklist
just prepare-devonce)just formatas mentioned in CODING_GUIDELINESjust checkas mentioned in CODING_GUIDELINESFurther comments