fix(apiserver): restore pending_reason in JOB_DEFAULT_COLUMN (merge regression)

The scheduler-framework merge (3b6f53bb) dropped ac6131d's "pending_reason"
from models.JobInfo JOB_DEFAULT_COLUMN during conflict resolution (took
theirs). Default job queries returned pending_reason:null even though the
scheduler attaches reasons, the controller stores them on job->pend_reasons,
and the apiserver's in-memory store has them.

Found during the 2026-09-01 full job cluster verification: scheduler P1
TIME_WINDOW/HOST_UNAVAIL reasons confirmed end-to-end via controller
set_preason/apiserver hook debug logs and apiserver dataset-push debug logs;
only the default query column selection was missing. Verified after the fix:
night queue (window closed) -> main_reason:8 time_window; all workers stopped
-> main_reason:9 host_unavail with per-host details.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
lei.chen 2026-09-01 15:26:33 +00:00
parent c3acd62a17
commit 070e9992f2

View file

@ -206,6 +206,7 @@ var JOB_DEFAULT_COLUMN = []string{
"job_name", "job_name",
"command", "command",
"submit_time", "submit_time",
"pending_reason",
} }
var ARRAY_JOB_DEFAULT_COLUMN = []string{ var ARRAY_JOB_DEFAULT_COLUMN = []string{