From e576ded95803a57d2ea28254883f439c294d0236 Mon Sep 17 00:00:00 2001 From: JSONbored <49853598+JSONbored@users.noreply.github.com> Date: Sun, 12 Jul 2026 23:09:35 -0700 Subject: [PATCH] refactor(infra): rename gittensory-api/-ui Cloudflare Workers and D1 database to loopover Renames both Cloudflare Worker services (gittensory-api -> loopover-api, gittensory-ui -> loopover-ui) -- a genuine in-place rename of the existing Worker resources (same underlying script identity, bindings, and routes), not a provision-new-and-cutover. Renamed live in the Cloudflare dashboard first, then wrangler.jsonc's name field updated to match in this same change, since Workers Builds' git integration requires the dashboard name and the wrangler.jsonc name field to agree or the next auto-deploy fails. Also fixes ui-preview-deploy.yml's hardcoded "gittensory-ui" references (the trusted preview wrangler config's name field, and the grep pattern that locates the deployed preview's workers.dev URL in wrangler's output) -- both would have broken the next PR preview deploy once the live rename landed, since the workflow's assumptions about the worker's name no longer matched reality. Renames the production D1 database's database_name label from "gittensory" to "loopover" in wrangler.jsonc, keeping the exact same database_id (the immutable UUID Cloudflare actually uses to resolve the binding) -- confirmed via `wrangler deploy --dry-run` that this label is a pure local config convenience with zero effect on which physical database gets bound. This is NOT a data migration: no rows moved, no export/import, zero downtime, since database_name was never the real identifier. The Cloudflare-side D1 database record itself has no known rename API and keeps its own registered name -- only the code-side reference changes. Closes #4766. Closes #4767 (via the database_name relabel described above -- no dedicated Cloudflare rename API exists for the D1 database record itself, so a full data migration was not required or attempted). --- .github/workflows/ui-preview-deploy.yml | 12 ++++++------ apps/gittensory-ui/wrangler.jsonc | 2 +- wrangler.jsonc | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ui-preview-deploy.yml b/.github/workflows/ui-preview-deploy.yml index c590d5cac2..d8740ec169 100644 --- a/.github/workflows/ui-preview-deploy.yml +++ b/.github/workflows/ui-preview-deploy.yml @@ -13,7 +13,7 @@ name: UI Preview Deploy # # Required repo secrets: # CLOUDFLARE_API_TOKEN — token with "Workers Scripts:Edit" on the account -# CLOUDFLARE_ACCOUNT_ID — the Cloudflare account id that owns gittensory-ui +# CLOUDFLARE_ACCOUNT_ID — the Cloudflare account id that owns loopover-ui on: workflow_run: @@ -124,7 +124,7 @@ jobs: cat > preview-dist/server/wrangler.preview.json <<'JSON' { "compatibility_date": "2026-05-28", - "name": "gittensory-ui", + "name": "loopover-ui", "workers_dev": true, "preview_urls": true, "compatibility_flags": ["nodejs_compat"], @@ -169,12 +169,12 @@ jobs: run: | set -o pipefail out=$(wrangler versions upload --config preview-dist/server/wrangler.preview.json 2>&1 | tee /dev/stderr) - # Take a workers.dev URL that belongs to the gittensory-ui worker, so any other URL in the logs + # Take a workers.dev URL that belongs to the loopover-ui worker, so any other URL in the logs # (or a changed output format) can't be recorded as the preview by mistake. Tolerant of the - # version-alias prefix (`-gittensory-ui..workers.dev`). - url=$(printf '%s\n' "$out" | grep -oiE 'https://[a-z0-9.-]+\.workers\.dev' | grep -i 'gittensory-ui' | head -n1) + # version-alias prefix (`-loopover-ui..workers.dev`). + url=$(printf '%s\n' "$out" | grep -oiE 'https://[a-z0-9.-]+\.workers\.dev' | grep -i 'loopover-ui' | head -n1) if [ -z "$url" ]; then - echo "::error::Could not parse an expected gittensory-ui preview URL from wrangler output" + echo "::error::Could not parse an expected loopover-ui preview URL from wrangler output" exit 1 fi echo "preview_url=$url" >> "$GITHUB_OUTPUT" diff --git a/apps/gittensory-ui/wrangler.jsonc b/apps/gittensory-ui/wrangler.jsonc index cd8daab4a9..68a9b13fd2 100644 --- a/apps/gittensory-ui/wrangler.jsonc +++ b/apps/gittensory-ui/wrangler.jsonc @@ -1,6 +1,6 @@ { "$schema": "../../node_modules/wrangler/config-schema.json", - "name": "gittensory-ui", + "name": "loopover-ui", "workers_dev": true, "preview_urls": true, "compatibility_date": "2026-05-28", diff --git a/wrangler.jsonc b/wrangler.jsonc index dd5cd8e465..2bf3253df2 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -2,7 +2,7 @@ "$schema": "node_modules/wrangler/config-schema.json", // Auto-deploys to production via Cloudflare Workers Builds on push to `main` // (deploy command: `npm run deploy:api` — applies pending D1 migrations, then `wrangler deploy`). - "name": "gittensory-api", + "name": "loopover-api", "main": "src/index.ts", "workers_dev": true, "preview_urls": false, @@ -252,7 +252,7 @@ "d1_databases": [ { "binding": "DB", - "database_name": "gittensory", + "database_name": "loopover", "database_id": "b2c79dd6-7771-4b1f-aa6b-085d5f3e9528", "migrations_dir": "migrations", },