flux-core icon indicating copy to clipboard operation
flux-core copied to clipboard

flux job list should probably not be installed

Open garlick opened this issue 3 years ago • 4 comments

Problem: it's easy to confuse flux job with flux jobs.

Perhaps flux job list, which outputs JSON, should just be a test program that is not installed (or a hidden command).

garlick avatar Aug 16 '22 17:08 garlick

FYI, there is an optparse flag to hide subcommands. We should do the same for flux job list-inactive and flux job list-ids. I do find it useful sometimes to dump the raw JSON listing of jobs, but that can always be done with a trivial Python script, so I wouldn't object to making these all test-only commands.

grondo avatar Aug 16 '22 21:08 grondo

Yeah I was just going to propose a PR that hides the subcommands, and also aborts if stdout is a tty (with a message to try flux-jobs(1)). Both John G and Trent hit this today, so it seemed like a problem.

garlick avatar Aug 16 '22 22:08 garlick

and also aborts if stdout is a tty (with a message to try flux-jobs(1))

Oh, clever idea.

grondo avatar Aug 16 '22 22:08 grondo

Danger: you are about to inhale JSON! It was remarkable how patient Trent was about this. ("can you tell me how to convert the userids to names?")

garlick avatar Aug 16 '22 22:08 garlick