fix: make orchestrator teardown timeout configurable (closes #435)

Resolves via ENV VAR -> orchestrator DB config -> default (30 s, up from 5 s):
  BOT_BOTTLE_ORCHESTRATOR_TEARDOWN_TIMEOUT_SECONDS
  teardown_timeout_seconds key in new orchestrator_config table (bot-bottle.db)

New OrchestratorConfigStore (same DbStore/TableMigrations pattern as the
registry) stores the DB-level setting. resolve_teardown_timeout() implements
the priority chain and is called at stack.callback registration time in all
three backends (macos_container, docker, firecracker).
This commit is contained in:
2026-07-20 19:36:41 +00:00
committed by didericis
parent 28fcc3f2d2
commit 0b36c3eb48
7 changed files with 146 additions and 7 deletions
@@ -65,6 +65,7 @@ from .gateway_hosts import (
set_gateway_host,
)
from .bottle_plan import MacosContainerBottlePlan
from ...orchestrator.config_store import resolve_teardown_timeout
from .consolidated_launch import (
GatewayEndpoint,
ensure_gateway,
@@ -153,6 +154,7 @@ def launch(
stack.callback(
teardown_consolidated, ctx.bottle_id,
orchestrator_url=ctx.orchestrator_url,
timeout=resolve_teardown_timeout(),
)
info(
f"agent {plan.container_name} registered "