Watch
0
0
Fork
You've already forked hyperhive
0

swarm-controller: keep retrying the forge webhook secret and registration after a startup outage

The webhook secret slot is filled in the background, on the forge token's
capped unbounded backoff, when the store can't answer at start. The hook
registration waits for the secret and retries on the same backoff instead
of giving up after five tries.

Closes #6101
This commit is contained in:
atlas 2026-11-06 04:05:39 +01:00 • committed by mara
commit 68b38a9d44

View file

@ -94,8 +94,8 @@ use routes::AppState;
use startup::{
agent_icon_reader, agent_status_reader, agents_md_reader, build_app,
configured_matrix_homeserver, connect_status_reader, load_hives, load_links, load_swarm_name,
load_webhook_secret, reported_inference, socket_path, spawn_agent_renewal,
spawn_matrix_account_backfill, spawn_per_agent_upkeep, start_forge, wanted_writer,
reported_inference, socket_path, spawn_agent_renewal, spawn_matrix_account_backfill,
spawn_per_agent_upkeep, start_forge, wanted_writer,
};
#[tokio::main]
@ -192,7 +192,7 @@ async fn main() -> Result<()> {
register_cert_gauges(jobq_metrics_provider.as_ref());
held_deploys::register(jobq_metrics_provider.as_ref(), &jobq);
let webhook_secret = load_webhook_secret().await;
let webhook_secret = webhook::load().await;
// Diagnostic only — `put_matrix_account` does not call this yet (see its
// own doc comment), so this cannot change any request's outcome. Logged
@ -215,7 +215,7 @@ async fn main() -> Result<()> {
Arc::clone(&config_prs),
Arc::clone(&jobq),
hives.clone(),
webhook_secret.clone(),
Arc::clone(&webhook_secret),
auth.clone(),
status.as_ref().map(|s| s.queue_client()),
)