-
Notifications
You must be signed in to change notification settings - Fork 49
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
plugin: frob for system attribute dependency name #5982
base: master
Are you sure you want to change the base?
plugin: frob for system attribute dependency name #5982
Conversation
Problem: we need a quick solution for assigning a jobid dependnecy to run after success (afterok) given a given name. Solution: write a frobnicator plugin that handles this transformation to the jobspec. Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5982 +/- ##
=======================================
Coverage 83.29% 83.30%
=======================================
Files 515 516 +1
Lines 83405 83429 +24
=======================================
+ Hits 69475 69498 +23
- Misses 13930 13931 +1
|
import flux.job | ||
|
||
handle = flux.Flux() | ||
for job in flux.job.list.job_list(handle).get()["jobs"]: |
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.
flux.job.list.job_list()
has an optional name
parameter you could use to get only jobs that match dependency_name
. Also, if you just want the most recent one, I think you could also add max_entries=1
.
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.
And I'm sorry, I see you put NOT FOR REVIEW in the PR 馃う
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.
Oh, since I already commented 馃檪
You'll have to test, but flux.job.list.job_list()
will by default only fetch jobs for the current user. In the frobnicator, this user is the owner of the instance, not necessarily the submitter of the job. You may need to set the userid
parameter to the submission userid.
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 is super helpful! I really appreciate the feedback, regardless of my message.
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.
Quick question @grondo - if I added those things, would the query be efficient enough to be suitable for an actual solution (and not a hacky one I'm working on)? And more specifically, considered for adding as an optional module (not loaded by default) to the core code base?
馃毀 NOT FOR REVIEW! 馃毀
This PR is only opened to share the diff (and discuss possible design for an actual solution). We need this functionality for experiments, and this was the shortest path to get there!
Problem: we need a quick solution for assigning a jobid dependnecy to run after success (afterok) given a given name.
Solution: write a frobnicator plugin that handles this transformation to the jobspec.