mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Reland of #2264 (reverted in #2275), trimmed to buzz-relay only per review: - Dropped all Helm chart changes (deployment.yaml, values.yaml, values.schema.json). The worker is configured entirely via BUZZ_GIT_GC_* env vars with safe defaults (disabled); operators can opt in through the chart's existing relay.extraEnv. Dedicated chart knobs can land later as a deploy-only change. - Dropped the Hermit helm 3.16.4 pin (bin/helm) — it existed only to lint the removed chart changes. - Dropped the buzz-db rename (UsageMetricsLeader -> AdvisoryLockLeader). The GC worker reuses the existing try_lock_usage_metrics(lock_key) API with its own advisory lock key; the rename is deferred. The opt-in worker elects one relay replica via a Postgres advisory lock, marks objects reachable from every current repository pointer, and inventories the shared manifests/, packs/, and idx/ namespaces, exporting candidate counts, bytes, scan freshness, and completeness metrics. Bounded pointer count, listed objects, manifest transfer, and wall-clock duration. Dry-run only: nothing is ever deleted, and the worker does not start unless BUZZ_GIT_GC_ENABLED=true. Co-authored-by: Thomas Petersen <thomasp@squareup.com> Signed-off-by: Thomas Petersen <thomasp@squareup.com>