Remove the retired D1 code path for serving update definitions#348
Merged
Conversation
Now that firmware update data is served from static assets (#347) and has been verified healthy in production, remove the unused D1 backend: - Delete d1Operations, cachedD1Operations, uploadSchema, the /admin/* upload routes and upload.ts, plus the D1 SQL migrations - Drop the CONFIG_FILES D1 binding from wrangler.toml and the CONFIG_FILES/ADMIN_SECRET fields from CloudflareEnvironment - Remove the now-orphaned safeCompare helper and the `upload` script - Rewrite docs/testing-locally.md for the assets flow (yarn dev builds and serves the data; no ADMIN_SECRET, no manual upload) The D1 database and the ADMIN_SECRET/BASE_URL repo secrets are left in place as a rollback anchor; deleting them is a manual follow-up. The Durable Object migrations in wrangler.toml are unrelated and untouched. Co-Authored-By: Claude Opus 4.8 <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.
Follow-up to #347. The firmware update data has been serving from static assets in production since the merge, verified clean (deploy green, smoke test passed, error-filtered
wrangler tailsilent through the cutover). This removes the now-dead D1 backend.Removed
d1Operations.ts,cachedD1Operations.ts,uploadSchema.ts/admin/*upload routes (routes/admin.ts) andmaintenance/upload.tsmigrations/)CONFIG_FILESD1 binding inwrangler.tomland theCONFIG_FILES/ADMIN_SECRETfields onCloudflareEnvironmentsafeComparehelper and theuploadnpm scriptDocs
docs/testing-locally.mdrewritten for the assets flow —yarn devbuilds and serves the data, noADMIN_SECRETand no manual upload step.Deliberately left in place
zwave-js-firmware-updates--prodand theADMIN_SECRET/BASE_URLrepo secrets, as a rollback anchor. Deleting them is a manual follow-up once this has baked. Version rollback still works regardless — older worker versions carry the binding in their own bundle.[[migrations]]inwrangler.toml(the old rate limiter) — unrelated to D1.Verification
yarn check,yarn lint, and the full test suite (55 tests) pass.wrangler deploy --dry-runshows only theDATAassets and rate-limit bindings, no D1.🤖 Generated with Claude Code