feat: complete v0.2 CD — bindings, Pages, D1 migrations, live logs, run/list/rollback#4
Merged
Merged
Conversation
…un/list/rollback Finishes v0.2 to the full PLAN §4 spec, on top of the MVP slice. - Worker bindings: a real YAML-subset parser (deploy/yaml.ts, no heavy dep) lets deploy.yml declare vars/KV/R2/D1/durable_objects/services, emitted into the Workers Scripts metadata.bindings. - Pages: kind: pages deploys via Direct Upload (upload-token → check-missing → upload → create-deployment) with per-branch previews (production_branch). - D1 migrations: applied in order via the D1 query API, opt-in (apply: true), idempotent (applied set tracked per database in the DeployDO). - Live logs: DeployDO streams log lines over a hibernatable WebSocket; the Deployments page subscribes at /r/:name/deployments/stream. - Manual / GitHub-down trigger: `gitflare deploy run` + /control/deploy/run, authed by a CONTROL_SECRET (outside Access, like the webhook). - `gitflare deploy list` + `gitflare deploy rollback [--to <id>]`; rollback redeploys a previous successful commit via a full clone (migrations skipped). 56 unit tests (yaml/workflow/cf-deploy/highlight/access). Worker bundle 939 KB. Still needs one live run against a real Cloudflare account to confirm the Scripts multipart, Pages Direct Upload, and D1 query wire shapes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finishes v0.2 to the full PLAN §4 spec, building on the MVP from #1.
What's added
deploy/yaml.ts, no heavyweight dep — keeps the bundle lean) lets.gitflare/deploy.ymldeclarevars/kv/r2/d1/durable_objects/services, emitted into the Workers Scriptsmetadata.bindings.kind: pages) via Direct Upload (upload-token → check-missing → upload → create-deployment), with per-branch previews (production_branch).apply: true), idempotent (applied set tracked per-database in the DeployDO)./r/:name/deployments/stream.gitflare deploy run→/control/deploy/run, authed by aCONTROL_SECRET(outside Access, like the webhook). This is the escape hatch — deploys the current Artifacts HEAD even when GitHub is down.gitflare deploy listandgitflare deploy rollback [--to <id>]— rollback redeploys a previous successful commit via a full clone (migrations are forward-only and skipped).Tests
56 unit tests (yaml parser, workflow validation incl. bindings/migrations, cf-deploy bindings/upload/Pages hashing, highlight, Access JWT). All packages typecheck; worker bundle 939 KB.
The Cloudflare API wire shapes — Workers Scripts multipart, Pages Direct Upload (the fiddliest), and D1 query — are coded to the docs but not yet validated against a real account. PLAN §12 M7 lists this as the one TODO before marking v0.2 ✅.
Note: overlaps the docs in #3 (which still says v0.2 "in progress"). I'll refresh those docs to "complete" + document the new commands once we settle merge order.
🤖 Generated with Claude Code