Skip to content

build(monitor): pin the D1 database id for auth-monitor - #86

Merged
matthew-demidoff merged 2 commits into
masterfrom
ops/monitor-d1-database-id
Sep 6, 2026
Merged

matthew-demidoff merged 2 commits into
masterfrom
ops/monitor-d1-database-id

Conversation

@matthew-demidoff

Copy link
Copy Markdown
Member

Summary

  • pin the auth-monitor D1 database id in monitor/wrangler.jsonc so deploys and migrations target the same database
  • document that the database is created once with wrangler d1 create before the first deploy, and that a non-interactive shell does not write the id into the config

Verification

  • monitor typecheck and tests pass locally
  • deployed with this config: wrangler deploy resolves env.DB to auth-monitor, migrations applied, heartbeat pings from the worker and bot land in the heartbeats table, all four checks report up

wrangler d1 create ran non-interactively and declined to write the id into the config, so deploys resolved the binding by name only. Pin the id so wrangler deploy and d1 migrations apply target the same database without a lookup.
@matthew-demidoff
matthew-demidoff merged commit efc7fb7 into master Sep 6, 2026
5 checks passed
@matthew-demidoff
matthew-demidoff deleted the ops/monitor-d1-database-id branch September 6, 2026 06:56
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