-
Notifications
You must be signed in to change notification settings - Fork 50
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
show response result in message traces #6359
Conversation
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.
This LGTM. Not sure if it makes sense to add some tests...
Yeah could probably add some tests. |
Added a little bit more testing (though it didn't do much for the numbers). Anyway, setting MWP. |
Problem: the numerical constants used in overlay control messages are defined locally to overlay.c but it is useful to decode them in a message trace. Move to overlay.h.
Problem: the broker contains duplicate code for tracing module and overlay messages. Factor out the duplicate code to trace.[ch]. Eliminate the check at each call site for empty 'trace_requests' msglist and put the check in the trace function. Add more defensive checks in the trace function. The response payload now contains both 'name' and 'rank' fields, with "name":null in the overlay response and "rank":-1 in the module response. Both clients already allow extra fields so the clients need not change.
Problem: if there are multiple message tracers and one sets the 'full' flag, all tracers get the message payload. Only send the message payload if requested.
Problem: flux module trace and flux overlay trace do not show whether a response indicates success or failure, but this would be useful. Include the response errnum and error string (if available) in the trace response.
Problem: strerrorname_np() is unavailable on non-glibc systems. Add an implementation from gnulib to libmissing. the license is LGPL-2.1+.
Problem: flux module trace doesn't show whether response messages are a success or failure. Add the errnum value from the message, converted to its short error name, to the end of the message line. If there is a human readable error message in the payload, show it when --full is specified. Show error responses in bright red rather than cyan.
Problem: flux overlay trace doesn't show whether response messages are a success or failure. Add the errnum value from the message, converted to its short error name, to the end of the message line. If there is a human readable error message in the payload, show it when --full is specified. Show error responses in bright red rather than cyan.
Problem: when flux-overlay trace encounters an error decoding the trace response, it prints errors twice. Use flux_msg_exit() not flux_err_exit().
Problem: there is no test coverage for flux module trace and flux overlay trace's special handling of response messages. Add a test for a failing RPC with human-readable error.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ 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
|
Problem:
flux module trace
andflux overlay trace
don't show theerrnum
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.