flux-framework / flux-core

core services for the Flux resource management framework
GNU Lesser General Public License v3.0
168 stars 50 forks source link

show response result in message traces #6359

Closed garlick closed 1 month ago

garlick commented 1 month ago

Problem: flux module trace and flux overlay trace don't show the errnum value for response messages, but this would be helpful when interpreting message traces.

Append "success" or the error name associated with the errnum value in the one line trace output for responses. When --full is specified, include human readable error message (if any) from the payload. Change the color of failure response messages to bright red so they stand out.

garlick commented 1 month ago

Yeah could probably add some tests.

garlick commented 1 month ago

Added a little bit more testing (though it didn't do much for the numbers). Anyway, setting MWP.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 64.00000% with 45 lines in your changes missing coverage. Please review.

Project coverage is 83.28%. Comparing base (47040bc) to head (d462260). Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
src/cmd/builtin/overlay.c 0.00% 26 Missing :warning:
src/broker/trace.c 76.56% 15 Missing :warning:
src/cmd/flux-module.c 84.00% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6359 +/- ## ========================================== - Coverage 83.31% 83.28% -0.03% ========================================== Files 523 524 +1 Lines 86199 86224 +25 ========================================== - Hits 71814 71813 -1 - Misses 14385 14411 +26 ``` | [Files with missing lines](https://app.codecov.io/gh/flux-framework/flux-core/pull/6359?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework) | Coverage Δ | | |---|---|---| | [src/broker/module.c](https://app.codecov.io/gh/flux-framework/flux-core/pull/6359?src=pr&el=tree&filepath=src%2Fbroker%2Fmodule.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2Jyb2tlci9tb2R1bGUuYw==) | `78.81% <100.00%> (+0.75%)` | :arrow_up: | | [src/broker/overlay.c](https://app.codecov.io/gh/flux-framework/flux-core/pull/6359?src=pr&el=tree&filepath=src%2Fbroker%2Foverlay.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2Jyb2tlci9vdmVybGF5LmM=) | `83.82% <100.00%> (+0.14%)` | :arrow_up: | | [src/cmd/flux-module.c](https://app.codecov.io/gh/flux-framework/flux-core/pull/6359?src=pr&el=tree&filepath=src%2Fcmd%2Fflux-module.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2NtZC9mbHV4LW1vZHVsZS5j) | `79.48% <84.00%> (+0.20%)` | :arrow_up: | | [src/broker/trace.c](https://app.codecov.io/gh/flux-framework/flux-core/pull/6359?src=pr&el=tree&filepath=src%2Fbroker%2Ftrace.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2Jyb2tlci90cmFjZS5j) | `76.56% <76.56%> (ø)` | | | [src/cmd/builtin/overlay.c](https://app.codecov.io/gh/flux-framework/flux-core/pull/6359?src=pr&el=tree&filepath=src%2Fcmd%2Fbuiltin%2Foverlay.c&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2NtZC9idWlsdGluL292ZXJsYXkuYw==) | `77.47% <0.00%> (-2.43%)` | :arrow_down: | ... and [12 files with indirect coverage changes](https://app.codecov.io/gh/flux-framework/flux-core/pull/6359/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework)