:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(tasks): instrument golden bake to diagnose hogpanion at snapshot (#91286)
Tom Owers0753d40764ec
diff --git a/products/tasks/backend/sandbox/images/hogland/bake-golden.sh b/products/tasks/backend/sandbox/images/hogland/bake-golden.shindex d99809a9b0e4..97c52ba2b166 100755--- a/products/tasks/backend/sandbox/images/hogland/bake-golden.sh+++ b/products/tasks/backend/sandbox/images/hogland/bake-golden.sh@@ -222,6 +222,14 @@ if [[ "$setup_rc" -ne 0 ]]; thenfilog "setup-golden.sh completed in the box"+# Diagnostic (temporary): record hogpanion's state at snapshot time. The dev+# smoke finds hogpanion.service with no MainPID in the restored golden; this+# shows whether the daemon is already down HERE (setup left it dead) or only+# after resume. Best-effort over SSH; never fail the bake.+log "hogpanion state at snapshot time (diagnostic)"+"${ssh_base[@]}" "echo '--- hogpanion @ snapshot time ---'; sudo systemctl show hogpanion.service -p MainPID -p ActiveState -p SubState; sudo systemctl status hogpanion.service --no-pager 2>&1 | head -8; echo '--- hogpanion journal (tail) ---'; sudo journalctl -u hogpanion.service --no-pager 2>&1 | tail -40" \+ || log "hogpanion snapshot-time diagnostic failed (non-fatal)"+# Snapshot the seed box, then point the candidate alias at the new snapshot id.# `box snapshot` pauses the box and persists it to S3, emitting the record JSON.log "snapshotting seed box $SEED_BOX_ID"diff --git a/products/tasks/backend/sandbox/images/hogland/smoke-golden.sh b/products/tasks/backend/sandbox/images/hogland/smoke-golden.shindex bab46ded2d4c..1cfec2e9ce9b 100755--- a/products/tasks/backend/sandbox/images/hogland/smoke-golden.sh+++ b/products/tasks/backend/sandbox/images/hogland/smoke-golden.sh@@ -181,7 +181,12 @@ log "asserting exec-daemon (hogpanion) env carries the container-style env"daemon_env_probe='set -eupid=$(systemctl show hogpanion.service -p MainPID --value 2>/dev/null || echo 0)if [ -z "$pid" ] || [ "$pid" = "0" ]; then- echo "hogpanion has no running MainPID" >&2; exit 1+ echo "hogpanion has no running MainPID" >&2+ echo "--- hogpanion.service status ---" >&2+ systemctl status hogpanion.service --no-pager >&2 2>&1 || true+ echo "--- hogpanion journal (tail) ---" >&2+ journalctl -u hogpanion.service --no-pager 2>&1 | tail -40 >&2 || true+ exit 1fienviron=$(sudo cat "/proc/$pid/environ" | tr "\0" "\n")printf "%s\n" "$environ" | grep -qx "IS_SANDBOX=1" || { echo "daemon env missing IS_SANDBOX=1" >&2; exit 1; }