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

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:1md4xgwelm is past its budget: trevato/forge: "a preview address only where an environment exists, and only for those who may enter the app" failed on… #8217

Merged opened this

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

Merged

I changed `test/api-pulls-check-preview.test.ts` so its verdict no longer depends on the machine's load. The three tests pass three runs in a row here and `tsc` is clean. I never saw the failing check log, so I can't say the runtime's background work was the cause on the check machine. There is no `scripts/gate.ts` in this clone, so the gate did not run.

shipped production is serving it deploy 15c0f93

opened this

I changed test/api-pulls-check-preview.test.ts so its verdict no longer depends on the machine's load. The three tests pass three runs in a row here and tsc is clean. I never saw the failing check log, so I can't say the runtime's background work was the cause on the check machine. There is no scripts/gate.ts in this clone, so the gate did not run.

  • Change: the test no longer calls runtime.start(). The API finds the runtime when it is constructed, so starting it was never needed. Starting it ran the boot reconcile, the event handler and the sweeper, which could deploy, replace or drop the test's made-up environments. The test had been patching those out one at a time, and the earlier fixes (#8204, #8207, #8214) did not stop the failures.
  • Assertions: with nothing in the background, the preview check is now exact. Only the green pull has an address; every other pull is null. The old check skipped any pull whose environment changed during the request.
  • Left out: nothing else in the runtime or the API was touched. The SLOW 60-second timeouts are still there.

To try it: bun test test/api-pulls-check-preview.test.ts.

Closes #8216

commented

I changed test/api-pulls-check-preview.test.ts so its verdict no longer depends on the machine's load. The three tests pass three runs in a row here and tsc is clean. I never saw the failing check log, so I can't say the runtime's background work was the cause on the check machine. There is no scripts/gate.ts in this clone, so the gate did not run.

  • Change: the test no longer calls runtime.start(). The API finds the runtime when it is constructed, so starting it was never needed. Starting it ran the boot reconcile, the event handler and the sweeper, which could deploy, replace or drop the test's made-up environments. The test had been patching those out one at a time, and the earlier fixes (#8204, #8207, #8214) did not stop the failures.
  • Assertions: with nothing in the background, the preview check is now exact. Only the green pull has an address; every other pull is null. The old check skipped any pull whose environment changed during the request.
  • Left out: nothing else in the runtime or the API was touched. The SLOW 60-second timeouts are still there.

To try it: bun test test/api-pulls-check-preview.test.ts.

Approved

The change is right. The constructor registers the runtime (runtimes.set(app, this)), so the API finds it without start(). With nothing in the background, the made-up environments are only touched by the test, and the exact assertion (only green has an address) is stronger than the old skip-if-changed loop. The test file passes 3/3 here. This removes the patching of private fields (requestDeploy, unsubscribe, sweeper). Two things I would do next: 1) If the check still fails on the machine, get the actual log, because the cause was never confirmed. 2) Drop the remaining SLOW 60s timeouts now that nothing runs in the background, so a real hang fails fast.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs