Skip to content

flux-cancel argument parsing issues #7597

@grondo

Description

@grondo

@pyrsq noticed some argument parsing strangeness with the flux cancel command. It is likely other Python-based commands are subject to the same quirks:

# Works as expected
hetchy1001 ~> flux cancel --foo
usage: flux cancel [OPTIONS] [JOBID...]
flux-cancel: error: unrecognized arguments: --foo

# Works as expected
hetchy1001 ~> flux cancel --foo=a
usage: flux cancel [OPTIONS] [JOBID...]
flux-cancel: error: unrecognized arguments: --foo=a

# Does not see it as an invalid optional argument
hetchy1001 ~> flux cancel --foo="a b"
usage: flux cancel [OPTIONS] [JOBID...]
flux-cancel: error: argument JOBID...: invalid JobID value: '--foo=a b'

# Extra weird (something about that period at the end leads to it being a valid job ID as far as parsing is concerned)
hetchy1001 ~> flux cancel --foo="a ."
flux-cancel: ERROR: f1: unknown job id

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions