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

doc: add warning about Python argparse in flux-jobs(1) #6285

Merged
merged 1 commit into from
Sep 15, 2024

Conversation

grondo
Copy link
Contributor

@grondo grondo commented Sep 15, 2024

Problem: There's a quirk in the Python argparse implementation that causes a required option argument that has a leading dash to be ignored when a space between long option and its argument is used instead of an equals. This is common with the flux jobs --since option because relative FSD is allowed so -1h, -30m, etc are expected option arguments. This can be very confusing to users who may not have an inkling of what's going on.

Add a note in the flux-jobs(1) man page regarding this quirk in hopes users will see and become aware of it. Suggest that = always be used between --since and its argument to avoid the problem.

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.

👍

Problem: There's a quirk in the Python argparse implementation that
causes a required option argument that has a leading dash to be
ignored when a space between long option and its argument is used
instead of an equals. This is common with the `flux jobs --since`
option because relative FSD is allowed so `-1h`, `-30m`, etc are
expected option arguments. This can be very confusing to users who
may not have an inkling of what's going on.

Add a note in the flux-jobs(1) man page regarding this quirk in hopes
users will see and become aware of it. Suggest that `=` always be used
between `--since` and its argument to avoid the problem.
@mergify mergify bot merged commit e055bec into flux-framework:master Sep 15, 2024
33 checks passed
Copy link

codecov bot commented Sep 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.35%. Comparing base (0473720) to head (0bc93e6).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6285      +/-   ##
==========================================
- Coverage   83.36%   83.35%   -0.01%     
==========================================
  Files         522      522              
  Lines       85985    85985              
==========================================
- Hits        71678    71673       -5     
- Misses      14307    14312       +5     

see 11 files with indirect coverage changes

@grondo grondo deleted the doc-argparse-quirk branch September 15, 2024 15: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.

2 participants