flux-core
flux-core copied to clipboard
flux-job: point users to flux-jobs(1)
Problem: flux job list is too easy to confuse with flux-jobs(1), but the former is a test tool that emits JSON.
Omit the list, list-inactive, and list-ids subcommands from help output. If output is a tty, assume a human is trying to ingest JSON (blech!) and throw a fatal error that instructs them to try flux-jobs(1).
Fixes #4497
I think this is fine for the short term, but for the long term should these subcommands be split out into a test tool, like flux jobtest or something? While the average person wouldn't want to output the JSON to the command line, I have done this on occasion.
Also, would this effect debugging efforts in sharness when one uses the -v and/or -d options? Maybe? (I'll try real quick)
Edit: yeah, I guess it would if you did some dumb debugging like this
This is not the command you are looking for. Try flux-jobs(1).
not ok 100 - flux job list subcommands are not displayed in help
#
# test_must_fail flux job -h 2>job-help.err &&
# test_must_fail grep "^[ ]*list" job-help.err
# flux job list
#
Meh, I think this is probably enough on this. If we have issues down the road we can deal with it then?
Meh, I think this is probably enough on this. If we have issues down the road we can deal with it then?
Sure, can deal with when it becomes an issue.
Edit: yeah, I guess it would if you did some dumb debugging like this
I ran all the current tests that contain flux job list with -d -v and didn't find any that failed currently, so I think it is probably fine for now.
Oops, broken && chain! I force pushed a fix and I'll set MWP. Thanks!
Codecov Report
Merging #4499 (ee6e91b) into master (ec3a392) will increase coverage by
0.00%. The diff coverage is100.00%.
:exclamation: Current head ee6e91b differs from pull request most recent head 8eb2f8b. Consider uploading reports for the commit 8eb2f8b to get more accurate results
@@ Coverage Diff @@
## master #4499 +/- ##
=======================================
Coverage 83.37% 83.37%
=======================================
Files 401 401
Lines 67539 67549 +10
=======================================
+ Hits 56310 56322 +12
+ Misses 11229 11227 -2
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/cmd/flux-job.c | 87.50% <100.00%> (+0.08%) |
:arrow_up: |
| src/modules/job-archive/job-archive.c | 62.62% <0.00%> (-0.70%) |
:arrow_down: |
| src/shell/output.c | 76.54% <0.00%> (-0.16%) |
:arrow_down: |
| src/modules/job-info/guest_watch.c | 76.75% <0.00%> (ø) |
|
| src/modules/kvs-watch/kvs-watch.c | 81.42% <0.00%> (+0.19%) |
:arrow_up: |
| src/broker/overlay.c | 86.39% <0.00%> (+0.42%) |
:arrow_up: |