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

job-info: support lookup of updated jobspec, remove manual construction of updated R / jobspec #5635

Merged

Conversation

chu11
Copy link
Member

@chu11 chu11 commented Dec 20, 2023

Problem: It is inconvenient that lookup w/ updates and update-watch support reading/watching an updated R but not an updated jobspec.

Support returning an updated jobspec.

Then remove the manually updated jobspec/R code in flux-job and the Python kvslookup library.

Built on top of #5633.

Could potentially be split into two PRs ....

@garlick
Copy link
Member

garlick commented Dec 20, 2023

Reminder: we created https://flux-framework.readthedocs.io/projects/flux-rfc/en/latest/spec_41.html as a basis for discussing this one. I haven't looked at what you proposed yet but just wanted to let you know that's out there.

@chu11 chu11 force-pushed the job_info_update_jobspec_remove_manual branch 3 times, most recently from d65bc7e to b2c26ce Compare December 20, 2023 06:04
@chu11 chu11 force-pushed the job_info_update_jobspec_remove_manual branch 2 times, most recently from abf4b17 to 7dedabb Compare December 22, 2023 16:51
@chu11 chu11 force-pushed the job_info_update_jobspec_remove_manual branch 4 times, most recently from 068220f to c9f3467 Compare February 1, 2024 04:54
@chu11
Copy link
Member Author

chu11 commented Feb 1, 2024

Reminder: we created https://flux-framework.readthedocs.io/projects/flux-rfc/en/latest/spec_41.html as a basis for discussing this one. I haven't looked at what you proposed yet but just wanted to let you know that's out there.

Yup! started PR flux-framework/rfc#407 to discuss this PR's pre-req PR (#5633) ... although now I see that I left that RFC PR as WIP, so maybe I should make that non-WIP.

@chu11 chu11 force-pushed the job_info_update_jobspec_remove_manual branch from c9f3467 to 7900640 Compare February 20, 2024 23:38
@chu11
Copy link
Member Author

chu11 commented Feb 20, 2024

re-pushed, rebasing on #5633 .. only change amongst this PR's commits was that fixed a comment that needed to say "jobspec & R" vs "R"

Problem: In one python test, data is retrieved after an RPC
call but the data is never verified.

Call the helper function to verify the retrieved data.
@chu11 chu11 force-pushed the job_info_update_jobspec_remove_manual branch from 7900640 to f33f6ec Compare February 21, 2024 00:58
Copy link
Contributor

@grondo grondo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup. LGTM, just one commit message suggestion.

@@ -37,7 +37,7 @@ enum job_lookup_flags {
FLUX_JOB_LOOKUP_JSON_DECODE = 1,
/* get current value of special fields by applying eventlog
* updates for those fields
* - currently works for R
* - currently works for jobspec and R
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit message typo: "an current/update jobspec"

Also, perhaps capitalize the first "current" because it reads as "the current flag" instead of "the flag that is named current" and is a bit confusing with all the other currents in the description.

Problem: It is inconvenient that lookup w/ the CURRENT flag and
update-watch support reading/watching a current/updated R but not
a current/updated jobspec.

Support returning a current/updated jobspec.
Problem: There is no coverage for job-info lookups w/ the
current flag or update-watch for the jobspec key.

Add some coverage in t2233-job-info-update.t.
Problem: flux job info manually reconstructs a current jobspec
from the jobspec and eventlog.  However the job-info.lookup service
w/ the CURRENT flag could be used instead.

Update code to use the lookup service w/ current flag instead of manually
reconstructing the current jobspec.
Problem: In the kvslookup.py module, the current jobspecs and R values
are done manually.  They could instead take advantage of the
job-info.lookup service and the recently added CURRENT flag.

Update kvslookup.py to use job-info.lookup with the CURRENT flag.  Remove
code that manually constructs current jobspecs and R.
@chu11 chu11 force-pushed the job_info_update_jobspec_remove_manual branch from f33f6ec to d5b38ff Compare February 21, 2024 16:21
@chu11
Copy link
Member Author

chu11 commented Feb 21, 2024

@grondo thanks! re-pushed with that commit message cleanup & setting MWP

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

Merging #5635 (d5b38ff) into master (8190b78) will decrease coverage by 0.01%.
The diff coverage is 97.56%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5635      +/-   ##
==========================================
- Coverage   83.48%   83.48%   -0.01%     
==========================================
  Files         488      488              
  Lines       83421    83366      -55     
==========================================
- Hits        69643    69596      -47     
+ Misses      13778    13770       -8     
Files Coverage Δ
src/bindings/python/flux/job/kvslookup.py 97.50% <100.00%> (-0.63%) ⬇️
src/cmd/flux-job.c 87.71% <100.00%> (+0.10%) ⬆️
src/modules/job-info/lookup.c 72.70% <100.00%> (+0.32%) ⬆️
src/modules/job-info/update.c 77.21% <100.00%> (+1.73%) ⬆️
src/modules/job-info/util.c 71.42% <85.71%> (+1.78%) ⬆️

... and 6 files with indirect coverage changes

@mergify mergify bot merged commit 45ad784 into flux-framework:master Feb 21, 2024
35 checks passed
@chu11 chu11 deleted the job_info_update_jobspec_remove_manual branch February 21, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants