[webserver-admin] jobs/logs/terminal panes POST data to bare /api/rpc (-32601 on control-plane peers) — #151 gap #155
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_lib#155
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
The shared jobs, logs, and terminal admin panes (
hero_lifecyclewebserver-admin) hardcode theirrpc_urlto the bare control-plane/api/rpc:components/jobs/mod.rs—JobsPane::from_appcomponents/logs/mod.rs—LogsPane::with_prefixcomponents/terminal/mod.rs—TerminalPane::from_appTheir web components (
<hero-jobs-viewer>,<hero-logs-pane>,<hero-terminal>) POST data methods (job.list, log queries, etc.) to that URL. Post-#151 the bare/api/rpcis the control plane — it answers onlyping/discover_domainsand returns-32601 Method not foundfor data. So these panes are broken against any control-plane peer, exactly like the api-docs pane was in #151. They were the panes #151 missed.Impact
No current consumer mounts these shared panes against a control-plane peer (hero_proc's admin uses its own per-domain
rpc-peerwiring), so nothing is broken in practice today — but a future single-domain admin using the sharedJobsPane/LogsPane/TerminalPanewould hit it. Filing + fixing defensively to close the #151 gap.Fix
Mirror the #151 api-docs pane fix: resolve the peer's domain via
app.openrpc_domains(bp)and scoperpc_urlto/api/{domain}/rpc(the admin proxy forwards that verbatim to the peer'srpc.sock, which dispatches data). The three constructors becomeasync(likeApiDocsPane::from_app) and the pane handlers.awaitthem. Falls back tomainwhen no domain is discovered.Fixed on
development(squash). The jobs/logs/terminal pane constructors now resolve the peer's domain viaapp.openrpc_domains(bp)and scoperpc_urlto/api/{domain}/rpc— mirroring the #151 api-docs pane fix; the admin proxy forwards that verbatim to the peer'srpc.sock, which dispatches data. The constructors areasyncnow (JobsPane::from_app,LogsPane::with_prefix/from_app,TerminalPane::from_app) and the pane handlers.awaitthem; falls back tomainwhen no domain is discovered.Verified:
hero_lifecyclebuilds--features webserver-admin; 51/51 lib tests pass serially; the only callers of these constructors are the internal pane handlers (no external callers). No live consumer mounts these shared panes against a control-plane peer today, so this is a defensive close of the gap #151 left.