Skip to content

Cloudflare reg origin prod deploy#408

Merged
jeffreyaven merged 7 commits into
mainfrom
dev
Jun 26, 2026
Merged

Cloudflare reg origin prod deploy#408
jeffreyaven merged 7 commits into
mainfrom
dev

Conversation

@jeffreyaven

Copy link
Copy Markdown
Member

No description provided.

jeffreyaven and others added 7 commits June 26, 2026 18:50
Scaffolds the registry origin server on Cloudflare Workers + R2 + D1 as the
green half of a blue-green migration off Deno Deploy. The Deno origin (blue)
is left fully intact and keeps serving production; this only adds a parallel
path.

origin/
- src/index.ts: port of the Deno origin preserving the URL contract exactly
  (tgz -> application/gzip + logged, providers.yaml -> text/plain + not logged,
  /ping -> 202, /analytics + /analytics/last24hours, 404/405). Reads docs from
  the R2 binding, takes client IP from CF-Connecting-IP, writes one analytics
  row per .tgz pull to D1 inside ctx.waitUntil. Validated locally against all
  acceptance checks.
- wrangler.toml: dev + production envs mirroring the dev/main split, R2 + D1
  bindings, cutover hostnames as commented custom-domain routes.
- schema.sql, bootstrap.sh, README.md, MIGRATION.md, RUNSHEET.md.

.github/workflows/main.yml: adds [DEPLOY-CF] steps that sync the assembled
docs tree to R2 and wrangler deploy the Worker, gated on the same push/branch
conditions as the existing Deno deployctl steps (which are unchanged). The CF
steps run before clean-deploy-dir.py, which flattens the tree and removes
origin/. Build/sign/package/test are untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add Cloudflare Worker origin (green) + dual-path CI
The configure-aws-credentials step exports AWS_REGION=us-west-1 into the job
env for the S3 artifact publish. The AWS CLI prefers AWS_REGION over
AWS_DEFAULT_REGION, so the R2 sync inherited us-west-1 and R2 rejected it
(InvalidRegionName; R2 only accepts auto/wnam/enam/...). Override AWS_REGION=auto
in the step env and pass --region auto explicitly (CLI flag wins regardless of
env precedence) on both the dev and prod sync steps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
AOT Provider Analysis (aot.yml) and Integration Testing and Analysis
(regression.yml) are merge gates. They ran on both pull_request and push to
main/dev, so every merge re-ran the same expensive suite that already passed on
the PR. Drop the branch entries from their push triggers, keeping pull_request
(the gate) and the tag triggers (aot*/robot*/regression*/integration* on-demand
runs). No push/main-only publish exists in either workflow - their publish steps
are gated on IS_TAG/ref_type == 'tag', which is unaffected.

main.yml is unchanged: it must run on push to deploy, and its heavy steps are
already gated on NUM_PROVIDERS > 0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
stackql-core is built from main and its go.mod now requires go >= 1.25.3, but
the workflows requested ~1.22. The newer setup-go (bumped to silence Node 20
warnings) sets GOTOOLCHAIN=local, so it would not auto-download a newer
toolchain and the "Build stackql from core source" step failed with
"go.mod requires go >= 1.25.3 (running go 1.22.12)".

Use GO_VERSION: stable in aot.yml and regression.yml. go.mod requirements only
ever name released Go versions, so the latest stable always satisfies them
(including future core bumps) and works with GOTOOLCHAIN=local.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fix R2 sync region: force AWS_REGION=auto for Cloudflare endpoint
@jeffreyaven jeffreyaven merged commit c0ffec6 into main Jun 26, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant