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-list: misc cleanup #5144

Merged
merged 8 commits into from May 7, 2023
Merged

Conversation

chu11
Copy link
Member

@chu11 chu11 commented May 3, 2023

This is some misc cleanup / doc updates peeled off from another branch. It also include cleanup in flux-job, testsuite, and flux-jobs(1).

@chu11
Copy link
Member Author

chu11 commented May 5, 2023

re-pushed with an extra commit from something I just noticed in the JobList class. I cannot find evidence that we've ever accepted "all" as a filter name. And "all" in the code only sets pending and running, not pending, running, and inactive. So it doesn't make much sense. I suspect its some left over code from development of the class?

Perhaps there is something I just can't remember or some use case I can't find. But there's a cleanup commit in here for the time being.

Copy link
Member

@garlick garlick left a comment

Choose a reason for hiding this comment

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

This all looks good to me.

There was one (slightly fascist) misspelling in the add_filter commit message: "fitler".

@chu11
Copy link
Member Author

chu11 commented May 5, 2023

Thanks. I would like a double check on the last commit from @grondo. cbc306b Just to make sure I'm not forgetting something or its used in some way I can't find.

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.

Yeah, that looks good to me!

@grondo
Copy link
Contributor

grondo commented May 5, 2023

@chu11 I'm going to set MWP here in a bit unless I hear otherwise, we're trying to see if this mergify issue is affecting all PRs our just some...

@chu11
Copy link
Member Author

chu11 commented May 5, 2023

doh, looks like it hit us again

@grondo
Copy link
Contributor

grondo commented May 5, 2023

Ok, we might have to ask the folks at mergify :-(

@chu11
Copy link
Member Author

chu11 commented May 5, 2023

https://github.com/Mergifyio rebase

@mergify
Copy link
Contributor

mergify bot commented May 5, 2023

rebase

✅ Branch has been successfully rebased

@chu11
Copy link
Member Author

chu11 commented May 5, 2023

https://github.com/Mergifyio rebase

chu11 added 8 commits May 5, 2023 23:30
Problem: The function list_inactive_cb() was removed a long
time ago but the prototype for it is still in list.h.

Remove the function prototype.
Problem: There is a comment describing job list filtering with the
'since' filtering.  The comment is a little confusing because it does
not match the code, doesn't describe how a list is sorted, and happens
to use the word "since" in the description.

Clarify the comment with more details.
Problem: Some tabbing was incorrect.

Make tabbing good!
Problem: The wording in the --since option in flux-jobs(1) is a bit
misleading, suggesting that the --since option may apply only to
completed/inactive jobs.

Solution: Note that the --since option applies to jobs that were
active after the given timestamp, which makes it clear that --since
also will list pending and running jobs.
Problem: In a test in t2800-jobs-cmd.t, both the --filter and
--all option are specified, leading to unexpected output.  The
test happens to pass, but may not behave as intended.

Remove the -a option in the test.
Problem: A comment in t2260-job-list.t is out of date.  flux_job_list()
has been deprecated and is no longer used.

Update the comment.
Problem: The t2250-job-archive.t test does not test that active
jobs are not incorrectly archived in the archive database.

Add an additional test to double check for this.
Problem: The JobList class's add_filter() function checks for the
special filter name "all" and sets the filter to pending and running.
As far as I can tell, the special filter name "all" has never been
supported or documented.  In addition, it doesn't make much sense
since it should set pending, running, and inactive to get all jobs.
My suspicion is this may be left over code from development that
did not get removed.

Remove check for the filter name "all".
@mergify
Copy link
Contributor

mergify bot commented May 5, 2023

rebase

✅ Branch has been successfully rebased

@codecov
Copy link

codecov bot commented May 6, 2023

Codecov Report

Merging #5144 (d0597ee) into master (b0baf4e) will decrease coverage by 0.01%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master    #5144      +/-   ##
==========================================
- Coverage   83.13%   83.12%   -0.01%     
==========================================
  Files         453      453              
  Lines       77788    77784       -4     
==========================================
- Hits        64666    64659       -7     
- Misses      13122    13125       +3     
Impacted Files Coverage Δ
src/bindings/python/flux/job/list.py 96.42% <ø> (+2.46%) ⬆️
src/modules/job-list/list.c 77.72% <ø> (ø)
src/cmd/flux-job.c 87.89% <66.66%> (ø)

... and 8 files with indirect coverage changes

@grondo
Copy link
Contributor

grondo commented May 7, 2023

This is approved with MWP so I'll merge since mergify still now working.

@grondo grondo merged commit bb5ee6e into flux-framework:master May 7, 2023
28 of 30 checks passed
@chu11 chu11 deleted the job_list_cleanup branch May 7, 2023 15:22
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.

None yet

3 participants