-
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
support flux uri --wait JOBID
#6443
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6443 +/- ##
==========================================
- Coverage 83.64% 83.64% -0.01%
==========================================
Files 524 524
Lines 87693 87708 +15
==========================================
+ Hits 73355 73365 +10
- Misses 14338 14343 +5
|
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! Just a couple of nits on the docs.
doc/man1/flux-uri.rst
Outdated
|
||
:: | ||
|
||
$ flux uri --wait $(flux batch -n1 --wrap flux run hostname) |
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.
In this example, maybe it would be slightly better to use sleep 3600
or something that runs for a while rather than hostname
?
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.
Good point! If we're making a realistic example, maybe just a placeholder myjob
or something?
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.
Sounds fine!
if the network host specified by an :program:`ssh` URI is not the current | ||
host. |
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 contains reformatting that isn't mentioned in the commit message.
Might be good to at least call it out.
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.
Ok I added that
Ok I addressed those comments and will set MWP. Thanks! |
Problem: It is inconvenient that a user has to ensure a job's memo event containing the subinstance URI has been posted before they can call `flux uri` or other URI resolver. Support a `wait` parameter for the jobid resolver which, when used, causes the resolver to wait for the `memo` event containing the URI before returning. This is only done if the job is not in the INACTIVE or CLEANUP states.
Problem: The `?wait` query parameter to the `jobid` URI resolver scheme and the corresponding `--wait` flag to `flux uri` are not documented. Add documentation to flux-uri(1). Additionally replace use of double-backticks with :program:`prog` where appropriate for readability. Reformat paragraphs where necessary due to longer line length introduced by this change.
Problem: No tests in the testsuite ensure that `flux uri --wait` works. Add a test to t2802-uri-cmd.t.
This PR adds support for a
?wait
query parameter to thejobid
URI resolver, and a new--wait
option toflux-uri
to pass that parameter down to the resolver.This supports waiting until the URI is available for pending or starting jobs, as opposed to the resolver returning "job is not running".
If the
wait
parameter is used with a job that isn't an instance of Flux, then it waits until thefinish
event before giving up and returning "URI not found".