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

flux-kvs: improve eventlog error messages #6531

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

chu11
Copy link
Member

@chu11 chu11 commented Dec 20, 2024

Problem: When an improperly formatted eventlog is input into eventlog commands, a non-useful error message is output.

Output a better error message.

Copy link
Member

@garlick garlick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a suggestion inline

if (!(a = eventlog_decode (s)))
if (!(a = eventlog_decode (s))) {
if (errno == EINVAL) {
log_msg ("cannot decode improperly formatted eventlog");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use log_msg_exit()

@@ -2135,8 +2140,13 @@ void eventlog_wait_event_continuation (flux_future_t *f, void *arg)
log_err_exit ("flux_kvs_lookup_get");
}

if (!(a = eventlog_decode (s)))
if (!(a = eventlog_decode (s))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use log_msg_exit()

Problem: When an improperly formatted eventlog is input into eventlog
commands, a non-useful error message is output.

Output a better error message.
Problem: The flux kvs eventlog commands don't have coverage for
improperly formatted eventlogs.

Add some coverage to t1008-kvs-eventlog.t.
@chu11 chu11 force-pushed the flux_kvs_better_errormsg branch from 2cb18ac to 8d7ad52 Compare December 20, 2024 20:12
@chu11
Copy link
Member Author

chu11 commented Dec 20, 2024

thanks, tweaked per comment above, setting MWP

@mergify mergify bot merged commit 9278fa8 into flux-framework:master Dec 20, 2024
33 checks passed
@chu11 chu11 deleted the flux_kvs_better_errormsg branch December 20, 2024 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants