myxce/src/frontend/apiserver
lei.chen 3545aa0d77 apiserver: apply the controller's jobPidInfo start-report push
handleNotifyData had no case for NotifyData_data_jobPidInfo, so the
controller's start-report push (apiserver_job_start_fun, fired from
HOOK_DETAIL_JOB_START the moment WAL_JOB_START commits) was silently
dropped. interactive_job_url then stayed invisible until the next
periodic rusage-driven job UPDATE re-delivered the full row — up to
10s later (job_rusage_collect_interval), the dominant chunk of an
-I --tty job's submit-to-first-output latency (measured ~6s on t1,
server-side work itself is ~0.6s).

Add OnJobPidInfo to the notification interface and DefaultHandler:
it merges the worker-reported pids/pgids and the exdata {"url": ...}
onto the already-stored job record (get-mutate-put, mirroring
OnJobFinished) and publishes a job.updated event. The CGO decode
side is factored into cPidInfoToRaw/pidInfoJSONB, shared with the
existing xce_job_t conversion.

Cluster-verified on t1: URL is pollable ~0.6s after submit
(previously ~11s), full submit/run/finish lifecycle clean, all
daemons healthy.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-15 10:08:23 +00:00
..
backend apiserver: apply the controller's jobPidInfo start-report push 2026-10-15 10:08:23 +00:00
cmd docs(apiserver): fix swag annotations and regenerate the swagger spec (bug-1966) 2026-10-10 10:37:52 +00:00
common style(frontend): gofmt the apiserver and xcecli sources 2026-10-02 09:33:16 +00:00
config merge: sync Rongsong's scheduler-framework (c5b172c7..3442a57d, 781 commits) 2026-10-14 05:17:03 +00:00
controllers attach jobs end with their command: relay watcher, once-only start banner, worker-side ttyd cleanup 2026-10-15 08:32:21 +00:00
docs fix(apiserver): reject submit options the job never gets; add exec_home (bug-1936) 2026-10-10 11:49:28 +00:00
middleware merge: sync Rongsong's scheduler-framework (c5b172c7..3442a57d, 781 commits) 2026-10-14 05:17:03 +00:00
models fix(apiserver): map pidinfo from job start into the job model (interactive_job_url) 2026-10-14 09:20:27 +00:00
router feat(interactive): attach TTY sessions through the apiserver websocket relay 2026-10-14 13:24:09 +00:00
services fix(apiserver): an accepted job is in the job store at once (bug-1894) 2026-09-30 04:23:10 +00:00
store merge: sync Rongsong's scheduler-framework (c5b172c7..3442a57d, 781 commits) 2026-10-14 05:17:03 +00:00
tools/encrypt fix(apiserver): bcrypt passwords and default-credential warnings in config-file auth (bug-1947) 2026-10-10 08:58:19 +00:00
utils fix(apiserver): validate, default and document job.terminate_interval (bug-1957) 2026-10-10 10:04:47 +00:00
vendor feat(interactive): attach TTY sessions through the apiserver websocket relay 2026-10-14 13:24:09 +00:00
go.mod feat(interactive): attach TTY sessions through the apiserver websocket relay 2026-10-14 13:24:09 +00:00
go.sum feat(interactive): attach TTY sessions through the apiserver websocket relay 2026-10-14 13:24:09 +00:00
meson.build feat(eliminate-frontend-makefile): task 1.1 - Meson backend CGO test target 2026-09-03 13:17:06 +00:00
README.md Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00

(1) run server command:

cd cmd go run main.go

(2) run server with different log level: cd cmd go run main.go -level=debug

level options: info/debug/warn/error/fatal