myxce/src/frontend/apiserver
Rongsong Shen fe87dafc85
fix(apiserver): fall back to default HostConfig for unmatched workers (bug-1673, gitea #40)
OnHostConfigUpdated only applied config-sourced fields (MaxSlot,
HostModel, HostType, DisptWindow) onto a host whose name exact-matched
an entry already in the store. hosts.yaml commonly defines only a
wildcard "default" entry, so a dynamically-joined worker never
received its own config push and MaxSlot stayed at Go's zero-value
forever -- decoupled from the C-side scheduling path, which already
resolves the real value via worker.c's wildcard fallback.

The "default" pseudo-host's config is now cached and retroactively
backfilled onto any registered host with no explicit config of its
own, in either arrival order (config-before-worker or
worker-before-config). The -1 HOSTCONFIG_MXJ_AUTO_DETECT sentinel
(bug-1556) is resolved to the host's real NumCPUs when applied via
fallback, mirroring worker.c's own resolution, so the display shows
usable capacity rather than a bare -1.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AgYRU3zDTqNGV5Jk8aiKLg
2026-08-24 14:23:45 +00:00
..
backend fix(apiserver): fall back to default HostConfig for unmatched workers (bug-1673, gitea #40) 2026-08-24 14:23:45 +00:00
cmd feat(dirty-content-fingerprint): apiserver shows fingerprint in -version 2026-08-21 08:04:40 +00:00
common Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
config fix(security): replace exposed admin credential with placeholder 2026-07-31 03:31:23 +00:00
controllers fix(apiserver): jobs list -l/-o validates against the wrong struct (bug-1674, gitea #41) 2026-08-24 14:23:38 +00:00
docs Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
middleware Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
models fix(apiserver): jobs list -l/-o validates against the wrong struct (bug-1674, gitea #41) 2026-08-24 14:23:38 +00:00
router Init commit of jobs output/error message peek project. 2026-05-09 16:57:54 +08:00
services submit job from xcecli 2026-04-14 15:55:52 +08:00
store test(apiserver): add integration tests for P0+P1 backend features 2026-04-18 11:56:31 +00:00
tools/encrypt Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
utils refactor: simplify HA backend peer handling 2026-05-08 03:41:11 +00:00
go.mod Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
go.sum Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
meson.build feat(dirty-content-fingerprint): apiserver/xcecli meson pass fingerprint to go_build 2026-08-21 06:21:21 +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