Skip to content

fix(encoding,ci): silence self-healing warmup 503 alert + robust E2E result check#790

Merged
beveradb merged 1 commit into
mainfrom
feat/sess-20260524-1530-encoding-503-loglevel-e2e-check
May 24, 2026
Merged

fix(encoding,ci): silence self-healing warmup 503 alert + robust E2E result check#790
beveradb merged 1 commit into
mainfrom
feat/sess-20260524-1530-encoding-503-loglevel-e2e-check

Conversation

@beveradb
Copy link
Copy Markdown
Collaborator

Summary

Two unrelated production alert-noise fixes, prompted by two false-alarm Discord alerts on 2026-05-24:

  • Encoding worker 503 → WARNING. A primary-VM warmup hitting 503 SERVICE_UNAVAILABLE (or capacity exhaustion) is self-healing — the encoding flow's ensure_any_running() falls back to an alternate-zone worker and the job completes (verified live on job a40f3024). It no longer logs at ERROR, so it stays below the error monitor's severity>=ERROR filter and stops paging Discord for a non-incident.
  • E2E daily test result check. Both stages now derive pass/fail from Playwright's real exit code instead of grepping the log for "failed". The old check matched the word "failed" inside a benign retry warning (goto attempt 1/3 failed) and reported failure on a run where the job completed and Playwright printed 1 passed.

Changes

  • backend/api/routes/encoding_worker.py — catch EncodingWorkerStartError in /warmup and log at WARNING with a clear fallback message; genuine unexpected errors still log at ERROR.
  • .github/workflows/e2e-daily.yml — capture ${PIPESTATUS[0]} (the pipe to tee was masking Playwright's exit code as 0) and gate the result on it, for both Stage 1 and Stage 2.
  • backend/tests/test_encoding_worker_routes.py — 3 regression tests: 503 start failure → WARNING, capacity error → WARNING, unexpected error → still ERROR.
  • docs/TROUBLESHOOTING.md — note that a WARNING-level warmup 503 is benign/self-healing.
  • pyproject.toml — bump 0.174.11 → 0.174.12.

Testing

  • pytest backend/tests/test_encoding_worker_routes.py backend/tests/test_encoding_worker_manager.py — 46 passed
  • YAML validated
  • CodeRabbit CLI review — 0 findings

Review

  • Local CodeRabbit review completed
  • Issues addressed

@coderabbitai ignore


🤖 Generated with Claude Code

…E2E result check robust

Two unrelated alert-noise fixes:

- Encoding worker /warmup endpoint now logs EncodingWorkerStartError
  (capacity exhaustion / transient 503) at WARNING instead of ERROR.
  The encoding flow's ensure_any_running() falls back to alternate-zone
  workers, so a primary-VM 503 is self-healing and should not trip the
  error monitor (severity>=ERROR) or page Discord. Genuine unexpected
  failures still log at ERROR.

- E2E daily test (both stages) now determines pass/fail from Playwright's
  real exit code (captured via PIPESTATUS[0], since the pipe to tee masked
  it as 0) instead of grepping the log. The old grep matched the word
  "failed" inside benign retry warnings ("goto attempt 1/3 failed"),
  reporting failure on runs where the job completed and Playwright passed.

Adds 3 regression tests for warmup log severity. Updates TROUBLESHOOTING.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@beveradb beveradb merged commit eb1cc7b into main May 24, 2026
57 of 62 checks passed
@beveradb beveradb deleted the feat/sess-20260524-1530-encoding-503-loglevel-e2e-check branch May 24, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant