From 4a1e667306e10e6b9aa9aadf0c2afcbd0ce4182a Mon Sep 17 00:00:00 2001 From: didericis Date: Wed, 1 Jul 2026 11:53:26 -0400 Subject: [PATCH] fix(git-gate): inline GIT_GATE_TIMEOUT_SECS to fix git-http ImportError git_http_backend.py is copied flat into the sidecar bundle image as a standalone script, not as part of the bot_bottle package, and git_gate.py/git_gate_render.py are never copied in. Its relative import of GIT_GATE_TIMEOUT_SECS crashed the git-http daemon (port 9420) on every startup, silently leaving the smart-HTTP git-gate transport down while the other sidecar daemons stayed up. Co-Authored-By: Claude Sonnet 5 --- bot_bottle/git_http_backend.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bot_bottle/git_http_backend.py b/bot_bottle/git_http_backend.py index 1b45a38..69bd30c 100644 --- a/bot_bottle/git_http_backend.py +++ b/bot_bottle/git_http_backend.py @@ -16,11 +16,16 @@ from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer from pathlib import Path from urllib.parse import urlsplit -from .git_gate import GIT_GATE_TIMEOUT_SECS - DEFAULT_PORT = 9420 +# Mirrors git_gate_render.GIT_GATE_TIMEOUT_SECS. Duplicated rather than +# imported: this module ships as a flat top-level sibling in the sidecar +# bundle image (see Dockerfile.sidecars), not as part of the bot_bottle +# package, so `bot_bottle.git_gate` and its dependency chain aren't +# available at runtime. +GIT_GATE_TIMEOUT_SECS = 15 + # Bound memory use while still allowing ordinary git push packfiles. MAX_BODY_BYTES = 100 * 1024 * 1024