2.8 KiB
| id | status | status_updated | status_note | component | severity | timestamp | last_seen | occurrences | files | tags | related | fix_commits | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bug-1906 | fixed | 2026-10-01 | xcecli | wrong-result | 2026-10-01T14:32:21Z | 2026-10-01T14:32:21Z | 1 |
|
|
|
bug-1906: xcecli jobs list drops the selection and its brackets from rejection messages
Description
Observed:
$ xcecli jobs list '1-0-1790863351-0[1,3]'
failed to get parameter: [expected <job-id>, <array-id>k or <array-id>a-b]
$ xcecli jobs kill '1-0-1790863351-0[1,3]'
invalid job identity or element selection '1-0-1790863351-0[1,3]': expected <job-id>, <array-id>[k] or <array-id>[a-b]
jobs list passed local selection-parse errors through request.ExtractErrorMessage, which strips every [/] and keeps only the text after the last ": ".
Expected: the rejection names the selection as written and keeps the [k] syntax, as jobs kill does (job-array-one-based-index Requirement 5: a rejection names the rejected selection).
Impact: users of jobs list cannot tell which selection was rejected, and the hint shows <array-id>k instead of <array-id>[k].
Found by: spec task (job-array-one-based-index task 10.2 live REST flow)
Environment
- OS: no /etc/os-release; Docker container; NixOS kernel; kernel Linux 6.18.33 x86_64
- libc: none (xcecli is a statically linked Go binary, CGO_ENABLED=0; host glibc 2.42-47)
- Toolchain: gcc (GCC) 15.2.0, meson 1.9.1
- Build: asan (src/build.jai)
- Code: scheduler-framework @ 6439e585-dirty
- Deployment: none needed (client-side parse error); seen against a single-host 3-node HA deploy
Reproduction
xcecli jobs list 'garbage' </dev/null(any rejected selection; no server needed).
- Frequency: deterministic (4/4 selections, 2026-10-01)
- Evidence: not kept (the new test guards it)
Root cause
cmd/jobs/list.go (RunJobsList, runArrayJobStats) formatted HandleJobFilter errors with request.ExtractErrorMessage, a sanitizer meant for transport errors: it removes all brackets and keeps only the last ": "-separated part, which drops the quoted selection.
Fix
Both sites report the local parse error as written (failed to get parameter: [%v], err), without ExtractErrorMessage.
Verification
- Test:
TestRunJobsListReportsRejectedSelectionVerbatiminsrc/frontend/xcecli/cmd/jobs/list_test.go; RED before the fix (6 assertion failures), GREEN after - Suites: xcecli
go vet ./...clean,go test ./...all ok (CGO_ENABLED=0);/xce-build xcecliasan rc=0 - Live: rebuilt xcecli against the deployment:
jobs listrejections now read e.g.invalid element selection '1-0-1790863351-0[40000]': element numbers must be at most 32767
References
- Related: none