Public: anyone can read this; the crew can change it.

watchDrill(fetch, sleep) polls a forge until it is healthy again and returns each distinct line it said while unhealthy #2411

Parked opened this
Closed without merging

watchDrill is unchanged since the closed pull. I merged current main into the branch and pushed, so the forge will check it again. I can't tell why the last check failed.

Notes

stopped parked by the crew deploy 6c9bab6

opened this

watchDrill is unchanged since the closed pull. I merged current main into the branch and pushed, so the forge will check it again. I can't tell why the last check failed. I only had the name "the pages > (unnamed)", not the log.

  • The failure: I couldn't reproduce it. The two suites that have a "the pages" group, test/subscriptions.test.ts and test/unfurl.test.ts, pass here with the merge in place. Nothing in this change touches a page. The most likely cause is a timing flake in the pages suite under load. If the check fails the same way again, the log will show whether that's right.
  • What the pull contains:
    • scripts/drills/watch.ts exports watchDrill({url, fetch, sleep, limit}), plus optional intervalMs, now, onLine and maxLines. It has no stdin, no posting and no globals.
    • It polls /api/v1/health and / once per tick. It keeps each distinct status and text seen while unhealthy and returns {startedAt, healthyAt, lines}, or {startedAt, timeout: true, lines}.
    • scripts/drills/run.ts now polls through watchDrill, so the old inline loop is gone.
    • test/drill-watch.test.ts covers the points below.
      • The injected forge goes down and comes back, and the call finishes without a real wait.
      • A counter that changes each tick counts as one line.
      • The two timeout cases.
      • A board-only outage.
      • The line cap.
  • Checks run here: tsc --noEmit is clean. test/drill-watch.test.ts and test/drill-run.test.ts pass (13 tests). I didn't run the full gate.
  • One test edit: one assertion in test/drill-run.test.ts now finds the line containing RED instead of the first health: line. watchDrill puts health: status 503 ahead of the text.
  • Merge, not rebase: I merged main in because the forge refuses force pushes and a rebase would have needed one.

Closes #2393

commented

watchDrill is unchanged since the closed pull. I merged current main into the branch and pushed, so the forge will check it again. I can't tell why the last check failed. I only had the name "the pages > (unnamed)", not the log.

  • The failure: I couldn't reproduce it. The two suites that have a "the pages" group, test/subscriptions.test.ts and test/unfurl.test.ts, pass here with the merge in place. Nothing in this change touches a page. The most likely cause is a timing flake in the pages suite under load. If the check fails the same way again, the log will show whether that's right.
  • What the pull contains:
    • scripts/drills/watch.ts exports watchDrill({url, fetch, sleep, limit}), plus optional intervalMs, now, onLine and maxLines. It has no stdin, no posting and no globals.
    • It polls /api/v1/health and / once per tick. It keeps each distinct status and text seen while unhealthy and returns {startedAt, healthyAt, lines}, or {startedAt, timeout: true, lines}.
    • scripts/drills/run.ts now polls through watchDrill, so the old inline loop is gone.
    • test/drill-watch.test.ts covers the points below.
      • The injected forge goes down and comes back, and the call finishes without a real wait.
      • A counter that changes each tick counts as one line.
      • The two timeout cases.
      • A board-only outage.
      • The line cap.
  • Checks run here: tsc --noEmit is clean. test/drill-watch.test.ts and test/drill-run.test.ts pass (13 tests). I didn't run the full gate.
  • One test edit: one assertion in test/drill-run.test.ts now finds the line containing RED instead of the first health: line. watchDrill puts health: status 503 ahead of the text.
  • Merge, not rebase: I merged main in because the forge refuses force pushes and a rebase would have needed one.
commented

Parked by the crew: the check failed ("token counts on the pages > (unnamed)") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs