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-job: fix wait-event -m, --match-context
#5846
Conversation
Problem: The `flux job wait-event --match-context` option returns a match when the context value matches but they does not. Fix the logic in wait_event_test_context(). Fixes flux-framework#5845
Problem: Many tests in t2231-job-info-eventlog-watch.t submit and cancel a new job when using the same job would work fine. This makes the test much slower than necessary. Reuse the canceled job where possible. Rename the variable to JOBID to avoid collision with other uses of lowercase `jobid`.
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.
LGTM, only the one minor thing I note below
t/t2231-job-info-eventlog-watch.t
Outdated
# Note: in test below, foo=0 would match severity=0 in buggy version | ||
test_expect_success 'flux job wait-event w/ bad match-context fails (bad key, good value)' ' | ||
test_must_fail fj_wait_event --match-context=foo=0 $JOBID exception | ||
' |
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.
perhaps mention issue number?
Problem: No test in t2231-job-info-eventlog-watch.t ensures that the flux-job wait-event -m, --match-context=KEY=VAL doesn't produce a match when the VALUE matches but KEY does not. Add a test.
Thanks! I've added the issue reference to the test as suggested and set MWP. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #5846 +/- ##
==========================================
+ Coverage 83.26% 83.29% +0.02%
==========================================
Files 511 511
Lines 82694 82690 -4
==========================================
+ Hits 68858 68875 +17
+ Misses 13836 13815 -21
|
This PR fixes context matching in
flux job wait-event -m, --match-context
, which currently returns a match if the value matches but key does not.