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 job wait-event: wait on context info #2083

Closed
chu11 opened this issue Mar 19, 2019 · 1 comment
Closed

flux job wait-event: wait on context info #2083

chu11 opened this issue Mar 19, 2019 · 1 comment
Assignees

Comments

@chu11
Copy link
Member

chu11 commented Mar 19, 2019

I noticed in this test

test_expect_success 'job-manager: cancel job' '
	jobid=$(cat list1_jobid.out) &&
	flux job cancel ${jobid} &&
        flux job wait-event --timeout=5.0 ${jobid} exception &&
	flux job eventlog $jobid | grep exception \
		| grep severity=0 | grep type=cancel
'

that the wait-event was sort of pointless. Earlier in the t2202 set of tests another exception was created in the same job (in job-manager: raise non-fatal exception on job). So the wait-event returns after seeing the prior exception, not the "cancel" exception.

Was simply going to fix up this test by not reusing the job id, but I realized that this was a legitimate test case. We want to cancel a job that has already had several exceptions in it, but wait specifically for the cancellation.

Perhaps, wait-event should have options to wait on portions from the context?

@grondo
Copy link
Contributor

grondo commented Mar 19, 2019

Perhaps, should wait-event have options to wait on portions from the context?

Yeah, I was thinking the same thing earlier. The interface for allowing that kind of matching might need a little design work though.

It also might be useful to eventually allow more complex event matching as well, for instance you may want to wait for a "finish" or "exception" event.

@chu11 chu11 self-assigned this Apr 18, 2019
chu11 added a commit to chu11/flux-core that referenced this issue Apr 19, 2019
Add optional test to wait-event, allowing user to check for an
arbitrary key=value in the context of an event.

Add new tests.

Fixes flux-framework#2083
chu11 added a commit to chu11/flux-core that referenced this issue Apr 19, 2019
Add optional test to wait-event, allowing user to check for an
arbitrary key=value in the context of an event.

Add new tests.

Fixes flux-framework#2083
chu11 added a commit to chu11/flux-core that referenced this issue Apr 23, 2019
Add --match-context option to wait-event, allowing user to check
for an arbitrary key=value in the context of an event.

Add new tests.

Fixes flux-framework#2083
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants