-
Notifications
You must be signed in to change notification settings - Fork 50
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
flux-hostlist: allow idset argument to --nth
and --exclude
options
#6478
Conversation
46b94b8
to
ffa8820
Compare
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.
LGTM!
ffa8820
to
bf3a55e
Compare
Thanks! Fixed the issue codeql flagged and forced a push. Will set MWP. |
Problem: There is no way to return a set of hosts at multiple indices in a hostlist with the flux-hostlist command. Enhance the `-n, --nth` option to accept an idset instead of a single integer.
Problem: There is no way to exclude hosts from a hostlist by index instead of hostname. Enhance `-x, --exclude` to take an idset of indices to remove in addition to the current support for a list of hosts.
Problem: The flux-hostlist `-n, --nth` option no longer needs to be in the mutually exclusive group with --expand and --count. Remove `-n, --nth` from the group so it can be used with these options.
Problem: The tests for the flux hostlist command are lacking coverage of some options. Update t2814-hostlist-cmd.t to cover new functionality.
Problem: The flux-hostlist(1) manual is out of date with resepect to recent changes to the command. Update the relevant documentation in flux-hostlist(1).
bf3a55e
to
974dda0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6478 +/- ##
==========================================
- Coverage 83.61% 83.59% -0.03%
==========================================
Files 524 524
Lines 87485 87493 +8
==========================================
- Hits 73148 73137 -11
- Misses 14337 14356 +19
|
This PR makes the following minor improvements to
flux hostlist
:-n, --nth=IDS
: This option now takes an idset instead of a single index into the hostlist. This allows a user to get a "slice" of a hostlist while preserving current behavior, e.g.flux hostlist -n 0-1 JOBID
to get the first two hosts of a job.-x, --exclude=HOSTS|IDS
: As suggested by @vsoch, this option now takes either a hostlist or idset or indices to exclude from the hostlist. This allows a user to exclude the first host for example withflux hostlist -x 0 local
Fixes #6464