Commit bfc288c
authored
fix(spur-cli): accept Slurm's --noconvert on squeue and sinfo (#647)
* fix(spur-cli): accept Slurm's --noconvert on squeue and sinfo
Slurm scripts pass --noconvert to keep output machine-parseable. Neither
command defined it, so clap rejected it as an unknown argument and a wrapper
migrated from Slurm exited non-zero having done nothing.
Spur never humanizes units in these commands: sinfo renders memory as a raw
integer and the format engine performs no conversion anywhere. The flag is
therefore accepted and deliberately inert rather than stubbed out, and output
is byte-identical whether or not it is passed. A test pins that equivalence so
the flag must be revisited if unit conversion is ever introduced.
* refactor(spur-cli): tighten --noconvert help text and test the render path
Both arg structs set disable_help_flag and re-add a long --help, and clap
uses a single-paragraph doc comment as both short and long help, so the
two-sentence rationale became the entire --help entry for the flag, beside
terse neighbours like "Don't print header". Collapse it to one line and
keep the reasoning here.
That reasoning is also narrower than the old wording claimed. On sinfo the
flag is inert because the render path already emits raw values: %m and %e
resolve to memory_mb and free_memory_mb unchanged. On squeue it is inert
for a different reason -- resolve_job_field has no size-valued specifier at
all, so there is nothing to convert either way.
Replace the parse-only test on sinfo with one that drives
render_sinfo_output over a NodeInfo fixture and asserts the memory cells
render as raw megabytes with and without the flag, so humanizing either
column fails the test. Drop the squeue counterpart: its two argv vectors
differed only by the flag under test, so no assertion could diverge, and it
used %m, which squeue does not implement.
* docs(migration): give --noconvert a home in the limitations table
That table is the canonical list of flags Spur accepts without acting on, and
the compatibility page points at it as the full list, so a flag missing from it
has no documented home. The row also records that the other four commands
Slurm defines `--noconvert` on do not accept it yet, which is the part a
migrating script actually trips over.
Two rows go the other way. `squeue --sort` and `sinfo --states` were listed as
accepted but not applied, and both have since been implemented: sorting runs
after `parse_sort_arg`, and node states are filtered server-side from the
request. A limitations table that lists working features misleads exactly the
reader it exists for.
* docs(spur-cli): tighten the --noconvert comment and migration wording
Review nits: collapse the three-line test comment, and say plainly that
squeue has no memory column rather than implying it renders raw values.
* ci: re-trigger E2E after a harness Postgres port collision1 parent 1b2826b commit bfc288c
3 files changed
Lines changed: 57 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
350 | 354 | | |
351 | 355 | | |
352 | 356 | | |
353 | | - | |
| 357 | + | |
354 | 358 | | |
355 | 359 | | |
356 | 360 | | |
| |||
392 | 396 | | |
393 | 397 | | |
394 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
395 | 438 | | |
396 | 439 | | |
397 | 440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
460 | 464 | | |
461 | 465 | | |
462 | 466 | | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
463 | 474 | | |
464 | 475 | | |
465 | 476 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 58 | + | |
| 59 | + | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
| |||
0 commit comments