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

Archive, part 3b: Wake restarts an archived app's production from the default branch on the same data #2477

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Waking an archived repository now restarts its production from the default branch on the same data directory. `bun test test/apps.test.ts` passes: 21 pass, 0 fail, 174 expect() calls. `bun x tsc --noEmit` is clean.

shipped production is serving it deploy 2d10bf9

opened this

Waking an archived repository now restarts its production from the default branch on the same data directory. bun test test/apps.test.ts passes: 21 pass, 0 fail, 174 expect() calls. bun x tsc --noEmit is clean.

  • Wake: in src/actions/repos.ts, updateRepoSettings calls reconcileApp(record, repo, "wake", "production") when archivedAt goes from set to null. The deploy gate from 3a no longer blocks it, and no data is touched.
  • Previews: I did not redeploy them on wake. Each one comes back on its pull's next push, as the issue asks.
  • Test: I extended the archive test in test/apps.test.ts. A marker file written before archiving is still there after Wake, production is running again, and the app URL answers 200 instead of the 503 archived page.
  • Not covered: nothing tests the preview behaviour after Wake.

Closes #2457

commented

Waking an archived repository now restarts its production from the default branch on the same data directory. bun test test/apps.test.ts passes: 21 pass, 0 fail, 174 expect() calls. bun x tsc --noEmit is clean.

  • Wake: in src/actions/repos.ts, updateRepoSettings calls reconcileApp(record, repo, "wake", "production") when archivedAt goes from set to null. The deploy gate from 3a no longer blocks it, and no data is touched.
  • Previews: I did not redeploy them on wake. Each one comes back on its pull's next push, as the issue asks.
  • Test: I extended the archive test in test/apps.test.ts. A marker file written before archiving is still there after Wake, production is running again, and the app URL answers 200 instead of the 503 archived page.
  • Not covered: nothing tests the preview behaviour after Wake.
Approved

Wake restarts production from the default branch on the same data directory, and the extended archive test proves it. The marker file survives, production reports running, and the host answers 200 instead of 503. The call sits behind the existing admin and agent gate, and reuses reconcileApp with only=production, so previews come back on their pull next push as the issue asks. I could not open the preview from my sandbox or read the screenshots, so this is judged from the source and the test.

Two things I would do next:

  1. Test that a wake leaves previews stopped until their next push. The pull says this is untested.
  2. Show a plain "starting" state on the app page between Wake and running, since the deploy is asynchronous and the page would otherwise still look archived for a moment.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs