forked from lei.chen/myxce
fix(schedulerclient): parse apiserver OrderMap columnar rows (bug-1491)
The apiserver returns list rows in OrderMap columnar form —
{"Fields":["col",...],"Data":{"col":val,...}} — but the read clients
unmarshalled each row as a flat object, so every field came back empty
(counts were right, values were all zero/"").
Fix: decode rows as apiRow{Fields, Data map[string]json.RawMessage} and
pull named fields out of Data via rowStr/rowInt/rowInt64/rowFloat helpers.
ListNodes, ListQueues, and getJobs (ListJobs/GetJob) all use apiRow now.
TDD: 3 new ordermap_test.go tests built from live-captured apiserver
response shapes (red: fields empty → green: parsed). Live-verified against
t1: node name=t1 cores=8, 4 queues active, 3 jobs with real fields.
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
4a4ae16725
commit
226259a52b
4 changed files with 294 additions and 56 deletions
|
|
@ -14544,5 +14544,25 @@
|
|||
],
|
||||
"occurrences": 2,
|
||||
"last_seen": "2026-08-01"
|
||||
},
|
||||
{
|
||||
"id": "bug-1491",
|
||||
"timestamp": "2026-08-02T12:00:00+08:00",
|
||||
"error_message": "scheduler_list_nodes/queues/jobs MCP read tools return correct entity count but all fields empty (name='', status='unknown', 0 resources); raw_status empty",
|
||||
"file": "src/frontend/schedulerclient/httpclient.go",
|
||||
"root_cause": "apiserver /xce/v1/hosts|queues|jobs return rows in utils.OrderMap columnar format {\"Fields\":[...],\"Data\":{...}}, but schedulerclient's apiHost/apiQueue/apiJob structs unmarshal flat JSON objects, so every field is zero-valued. Entity count still correct because len(rows.Rows) works.",
|
||||
"fix": "schedulerclient now decodes apiserver OrderMap columnar rows: added apiRow{Fields,Data map[string]json.RawMessage} + rowStr/rowInt/rowInt64/rowFloat helpers in httpclient.go; ListNodes/ListQueues/getJobs pull named fields from row.Data. TDD: 3 new ordermap_test.go tests with real captured response shapes (red\u2192green). Live-verified against t1: nodes name=t1 cores=8, 4 queues active, 3 jobs real fields.",
|
||||
"tags": [
|
||||
"schedulerclient",
|
||||
"ordermap",
|
||||
"read-parse",
|
||||
"phase1-verify",
|
||||
"fixed"
|
||||
],
|
||||
"related_bugs": [
|
||||
"bug-1490"
|
||||
],
|
||||
"occurrences": 4,
|
||||
"last_seen": "2026-08-02"
|
||||
}
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue