Repository navigation
fix: turn off housekeeping dry run so the nightly sweep deletes - #297
Merged
Merged
Conversation
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.
Summary
Sets
HOUSEKEEPING_DRY_RUNto"false"for the production and dev Workers, so the nightly cron (0 3 * * *) actually deletes whatpublic.purge_expired_rowsselects instead of only counting it.The sweep only removes expired or revoked auth rows: OAuth access and refresh tokens and client assertions past a 24h grace, sessions and verifications expired for more than 7 days, and team invite codes revoked for more than 30 days. It caps at 5,000 rows per table per run, and leftovers roll to the next night.
Type of change
Testing
bun run devbun run lint)bun run typecheck)bun run build:cf && bun run smoke:cf) — required when this PR touchesapp/api/**,middleware.ts,worker-cf.ts, or a.node.ts/.workers.tspairConfig only. A read-only count against production with the same predicates confirmed the first live run only touches expired or revoked auth rows. Each run logs a
db_housekeepingevent with per-table counts anddryRun:false.Notes for reviewer
Takes effect on the next deploy of each environment.
Docs impact
Compliance impact