fix(#2560): make hive-core git non-interactive + bound stalled fetches
This commit is contained in:
parent
d00b349102
commit
618d774467
2 changed files with 18 additions and 0 deletions
|
|
@ -34,6 +34,15 @@ let
|
|||
[credential "http://${config.services.hyperhive.forge.domain}"]
|
||||
helper = hive-forge
|
||||
username = core
|
||||
[http]
|
||||
# Abort a stalled fetch instead of blocking startup indefinitely. If a
|
||||
# git+http transfer (e.g. `nix flake lock` of the forge-hosted config
|
||||
# inputs) drops below 1 KiB/s for 30s -- forge unreachable / not ready
|
||||
# on cold boot -- git fails fast rather than hanging the whole daemon.
|
||||
# Pairs with GIT_TERMINAL_PROMPT=0 (no credential-prompt hang) and the
|
||||
# migration shellout timeout in migrate.rs.
|
||||
lowSpeedLimit = 1024
|
||||
lowSpeedTime = 30
|
||||
'';
|
||||
|
||||
# git credential helper for hive-core's authenticated fetches of the
|
||||
|
|
|
|||
|
|
@ -18,6 +18,15 @@ in
|
|||
# the writable StateDirectory.
|
||||
HOME = "/var/lib/hyperhive";
|
||||
HYPERHIVE_GIT = "${pkgs.git}/bin/git";
|
||||
# Never let git block on an interactive credential prompt. hive-core is a
|
||||
# TTY-less system user, so a prompt (e.g. the forge credential helper
|
||||
# returns nothing because the forge isn't reachable yet on cold boot)
|
||||
# would hang forever — this is what froze the whole daemon during startup
|
||||
# migration's `nix flake lock` of the forge-hosted config inputs. With
|
||||
# this set, git fails fast instead of prompting. Paired with the git http
|
||||
# low-speed abort in `safeDirGitconfig` (bounds a stalled transfer) and
|
||||
# the 120s migration shellout timeout in migrate.rs.
|
||||
GIT_TERMINAL_PROMPT = "0";
|
||||
# No HIVE_STATIC_DIR: the gateway static-serves the dashboard dist
|
||||
# (see the hive-gateway module); this router is API-only.
|
||||
# Path to the base agent frontend dist. hive-c0re's
|
||||
|
|
|
|||
Loading…
Reference in a new issue