fix(deploy): deploy worker before d1 migrations - #4113
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
d569d5b to
7eed03a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4113 +/- ##
=======================================
Coverage 93.65% 93.65%
=======================================
Files 384 384
Lines 35865 35865
Branches 13160 13160
=======================================
Hits 33589 33589
Misses 1618 1618
Partials 658 658 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-08 03:34:18 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 4 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Motivation
ALTER TABLE ... DROP COLUMN private_trust_enabledwhich creates a deployment-time window if remote D1 migrations are applied before the new Worker is active, causing older Worker code to crash when it still expects the dropped column.Description
deploy:apiNPM script to runwrangler deploybeforewrangler d1 migrations apply ... --remoteso the Worker is upgraded prior to applying DB migrations.worker-configuration.d.ts) via thecf-typegenstep so the local cf-typegen drift check remains green with the updated Wrangler/runtime output.Testing
git diff --check, which reported no whitespace/conflict issues.npm run db:migrations:check, which passed against the migration set (no gaps/duplicates).npm run cf-typegen, which regeneratedworker-configuration.d.tsand made thecf-typegen:checkparity pass locally.npm run test:ci, which exercised the CI gate but failed due to unrelated unit-test issues intest/unit/queue.test.ts(stack-depth/timeouts), not related to the deployment-sequencing script change, andnpm audit --audit-level=moderatefailed with a registry403 Forbiddenfrom the audit endpoint.Codex Task