A working prototype. Its source and packages aren't public yet.
Effective Cloud
Deploys to Cloudflare that test the new version before it takes any traffic, and undo everything if anything fails. And apps declared in Effect, whose wiring the compiler checks.
2.53s✓deployed 10% on version 5, 90% on the previous version13.52s✓deployed 50% on version 5, 50% on the previous versionCtrl-C14.21s↩rolled back to 100% on the previous versioninterrupted, after undoing what it did
ship's own fixture, rolled out a step at a time, and stopped with Ctrl-C at 50%.
To a Worker that’s already live, every time, whichever tool runs it:
1ProvisionMakes the KV namespace, D1 database, R2 bucket or queue a binding needs, if it’s missing.
2Upload a versionWith no traffic. The deployed version keeps serving everyone.
3Test itSmoke tests on the new version alone, which pass only if the new version is the one that answered.
4Move the trafficAll at once, a step at a time, or as a canary judged on error rates.
If anything fails, or you press Ctrl-C, it all goes back, in reverse: the traffic to the previous version, and what the ship made, deleted. Resources that existed before are never touched.
A Worker’s first ship goes live at once, as there’s no earlier version to
keep the traffic on; if it fails, it’s deleted.
How a rollout stays safe has the details, and the real
logs.
Book is two things at once: the client your code uses, and the
declaration of the database it needs. Forget the .bind(Book) and
nothing deploys half-wired. You’re stopped before you ship:
$ infra check app.ts
error used-undeclared guestbook.ts:14:16
the Worker uses Book, which it doesn't bind
fix: bind it: .bind(…, Book)
Your editor says the same, as you type: it’s a type error.
And when it’s right, one command makes the database, applies its
migrations, uploads the Worker and checks it answers:
$ infra ship app.ts
2.01s ✓ created D1 database guestbook-book
2.47s ✓ applied migration 1 to D1 database guestbook-book
3.68s ✓ created Worker guestbook-guestbook, live
8.16s ✓ smoke test passed: 3 × GET /, answered by the new Worker