flux-framework / flux-core

core services for the Flux resource management framework
GNU Lesser General Public License v3.0
168 stars 50 forks source link

support `flux uri --wait JOBID` #6443

Open grondo opened 1 week ago

grondo commented 1 week ago

This PR adds support for a ?wait query parameter to the jobid URI resolver, and a new --wait option to flux-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 the finish event before giving up and returning "URI not found".

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 90.90909% with 2 lines in your changes missing coverage. Please review.

Project coverage is 83.64%. Comparing base (ae1f516) to head (27fbc7b).

Files with missing lines Patch % Lines
src/bindings/python/flux/uri/resolvers/jobid.py 89.47% 2 Missing :warning:
Additional details and impacted files ```diff @@ 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 ``` | [Files with missing lines](https://app.codecov.io/gh/flux-framework/flux-core/pull/6443?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework) | Coverage Δ | | |---|---|---| | [src/cmd/flux-uri.py](https://app.codecov.io/gh/flux-framework/flux-core/pull/6443?src=pr&el=tree&filepath=src%2Fcmd%2Fflux-uri.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2NtZC9mbHV4LXVyaS5weQ==) | `93.10% <100.00%> (+0.79%)` | :arrow_up: | | [src/bindings/python/flux/uri/resolvers/jobid.py](https://app.codecov.io/gh/flux-framework/flux-core/pull/6443?src=pr&el=tree&filepath=src%2Fbindings%2Fpython%2Fflux%2Furi%2Fresolvers%2Fjobid.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework#diff-c3JjL2JpbmRpbmdzL3B5dGhvbi9mbHV4L3VyaS9yZXNvbHZlcnMvam9iaWQucHk=) | `94.00% <89.47%> (-3.37%)` | :arrow_down: | ... and [7 files with indirect coverage changes](https://app.codecov.io/gh/flux-framework/flux-core/pull/6443/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework)