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

add -B, --bank= option to submission commands #6195

Merged
merged 5 commits into from
Aug 7, 2024

Conversation

grondo
Copy link
Contributor

@grondo grondo commented Aug 6, 2024

Now that bank and project have been proposed as official members of canonical jobspec, and since they are supported by job-list, it seems like there are excellent arguments to at least support -B, --bank= options in our cli as suggested most recently by @ilumsden.

This PR starts with @ilumsden's draft PR #6157 (thanks Ian!), reworks the commit message to project standards, then adds the docs, testing, and new option to tab completions.

I didn't add --project here, even though it is also proposed as canonical in the rfc PR above. I like the idea of -Sproject=NAME for rarer cases such as this, though I'm not opposed to --project if people think that's a good idea.

For now, this seems like a good and simple ui improvement.

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.

Thanks @ilumsden and @grondo! LGTM - just one doc nit for @grondo.

.. option:: -B, --bank=NAME

Set the bank name for this job to ``NAME``. This option is equivalent
to `--setattr=bank=NAME`, and results in the ``bank`` attribute being
Copy link
Member

Choose a reason for hiding this comment

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

Isn't it --setattr=system.bank=NAME?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. See flux-submit(1):

If KEY does not begin with system., user., or ., then system. is assumed.

Copy link
Member

Choose a reason for hiding this comment

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

Ah OK. All good then.

@grondo
Copy link
Contributor Author

grondo commented Aug 7, 2024

Thanks! I've set MWP.

ilumsden and others added 5 commits August 7, 2024 00:51
Problem: Users are forced to use --setattr=bank=BANK to set a bank
attribute in their jobspec, but this is an attribute documented
in RFC 14 and is commonly required in production system instance
usage.

Add a `-B,--bank=` to all flux submission cli commands to make
use of banks more user friendly.
Problem: The `-B, --bank=` option is not documented.

Add documentation of this option to job-param-additional.rst so it
appears in the manual of the submission commands.
Problem: The `-B, --bank=` option does not appear in the set of
mutable options/args in submit/bulksubmit.

Add it to mutable_args.
Problem: No tests ensure that the submission commands support the
`-B, --bank=` option.

Add a couple tests to t2710-python-cli-submit.t for this purpose.
Problem: The `-B, --bank` option is not supported in bash tab
completions.

Add this option to the supported bash tab completions for cli
submission commands.
@mergify mergify bot merged commit 823417f into flux-framework:master Aug 7, 2024
31 checks passed
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.36%. Comparing base (58becf5) to head (5d52d9f).
Report is 474 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6195      +/-   ##
==========================================
+ Coverage   83.35%   83.36%   +0.01%     
==========================================
  Files         521      521              
  Lines       84942    84945       +3     
==========================================
+ Hits        70807    70818      +11     
+ Misses      14135    14127       -8     
Files with missing lines Coverage Δ
src/bindings/python/flux/cli/base.py 95.66% <100.00%> (+0.01%) ⬆️

... and 11 files with indirect coverage changes

@grondo grondo deleted the cli-bank branch December 11, 2024 00:59
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