-
Notifications
You must be signed in to change notification settings - Fork 51
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
job-info: support annotations (part 2) #3037
Conversation
hmm hit this potentially racy fail?
|
We see this error frequently in various tests:
This means one broker was slow to exit and was killed by |
ecbb4ee
to
5715c57
Compare
just rebasing now that #2960 is in |
06cd560
to
d361bc6
Compare
So I've rebased & added the following on top of this PR:
|
c5b3ca1
to
a523295
Compare
Problem: flux-jobs header row is formatted with the same Formatter as JobInfo rows, which is at odds with simply registering valid field names and their corresponding header strings. E.g. exception info header and valid field names have to inserted into the headers dict in multiple steps. Add a custom HeaderFormatter class that overrides the Formatter get_field() method. This function directly looks up the header name from kwargs[field_name] instead of calling getattr() recursively as is done by the default Formatter. This means "dotted" fields can be literally registered in the headers dict. Update the exception info registration using the new scheme.
If there are no state transitions to publish, do not publish a state transitions event. Fixes flux-framework#3054
If job ID does not exist, error should be ENOENT not EINVAL.
Rename functions to make it clear they are getting / checking via the job manager. Update callers appropriately.
Add context checks, which were missing when reconstructing job info from the eventlog.
Support a new job-annotations event so other modules, such as job-info, can be aware of changes to job annotations.
Listen to the newly created job-annotations event and make job annotations available to be returned by job listing services.
Add flux job list annotation tests to t2203-job-manager-dummysched-single and t2204-job-manager-dummysched-unlimited. Add list attribute tests to t/t2230-job-info-list.
Allow annotation objects to be updated recursively, rather than only at the first level.
Instead of annotating `sched` namespace annotations with a period notation (i.e. `sched.resource_summary`), store annotations within an object (i.e. sched is { "resource_summary" : ... }) Update tests appropriately.
In sched-dummy, annotate `sched` namespace annotations in a sub-object instead of using period notation. Update tests as necessary.
Support listing initial annotations of "annotations", "annotations.sched", "annotations.sched.reason_pending", "annotations.sched.resource_summary", and "annotations.sched.t_estimate".
Ugh, I should have had you wait on tests. I started down reworking |
Add flux jobs annotation tests to t2203-job-manager-dummysched-single and t2204-job-manager-dummysched-unlimited. Add output header tests to t2800-jobs-cmd.t.
a523295
to
c3822c8
Compare
No worries and good timing on your comment. I just realized I forgot to add some tests to |
Ok, a lot more refactoring coming to flux-jobs... |
Codecov Report
@@ Coverage Diff @@
## master #3037 +/- ##
========================================
Coverage 81.16% 81.16%
========================================
Files 285 285
Lines 44035 44140 +105
========================================
+ Hits 35740 35826 +86
- Misses 8295 8314 +19
|
Doh! I just realized I got a bug here:
the |
Given PR #3060 and some other things I discovered, I'm going to re-do PR ordering. Nixing this PR. |
Ugh, sorry for the inconvenience @chu11! |
No worries, its also due to other things I'm uncovering as I do more development! |
This is built upon PR #2960, part #2 in the annotations work. Annotations are distributed from the job-manager to job-info and available via the
job-info.list
service.I think this is a good stopping point for part 2. Adding the ability for users to create their own annotations could possibly go into this PR as well, but I decided to hold off and maybe that'll be part 3 (as it will introduce security checks, thus security tests). Presumably part #4 will be the final
flux-jobs
support.I don't think there's anything too spectacular to mention about the PR. The biggest decision, as discussed in #2608, is that annotations should be sent via an event from the job-manager, vs many of the other options discussed/prototyped.
As an FYI, the additions in this PR are the last 7 commits in this series.