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

flux-hostlist: add -F, --find=HOSTS option #6671

Merged
merged 3 commits into from
Feb 28, 2025

Conversation

grondo
Copy link
Contributor

@grondo grondo commented Feb 28, 2025

This simply adds a -F, --find=HOSTS option to flux hostlist, which allows getting the index of one or more hosts in the target hostlist.

Copy link
Member

@chu11 chu11 left a comment

Choose a reason for hiding this comment

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

LGTM!

Problem: Other hostlist commands have a `-F, --find` option, but
flux-hostlist(1) does not. Also, there is not another good way to
determine the index of the current host in a hostlist.

Add a `-F, --find=HOSTS` option to flux-hostlist which takes a
hostlist and returns a space-separated list of indices of each
host in the target hostlist.
Problem: There are no tests of `flux hostlist -F, --find`.

Add some to t2814-hostlist-cmd.t.
Problem: The `-F, --find=HOSTS` option for flux-hostlist is not
documented.

Document it in flux-hostlist(1).
@grondo
Copy link
Contributor Author

grondo commented Feb 28, 2025

Thanks! I'll set MWP.

@mergify mergify bot merged commit f15140e into flux-framework:master Feb 28, 2025
33 checks passed
Copy link

codecov bot commented Feb 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.84%. Comparing base (c57d3b1) to head (520eae5).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6671      +/-   ##
==========================================
- Coverage   83.86%   83.84%   -0.03%     
==========================================
  Files         533      533              
  Lines       88683    88686       +3     
==========================================
- Hits        74375    74358      -17     
- Misses      14308    14328      +20     
Files with missing lines Coverage Δ
src/cmd/flux-hostlist.py 97.36% <100.00%> (+0.04%) ⬆️

... and 5 files with indirect coverage changes

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.

2 participants