Skip to content

Enforce docs retention on retained production D1 - #200

Merged
PyRo1121 merged 1 commit into
mainfrom
fix/retained-d1-docs-retention
Dec 4, 2026
Merged

PyRo1121 merged 1 commit into
mainfrom
fix/retained-d1-docs-retention

Conversation

@PyRo1121

@PyRo1121 PyRo1121 commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

The production API Cron now targets PostgreSQL. This scheduled-only Worker keeps the retained production D1 database under the 90-day docs retention policy. It deletes only pageview, click, and performance rows whose path is /docs or starts with /docs/ and whose creation time precedes the cutoff.

SQLite fixtures cover the exact cutoff, excluded paths and event types, and retry behavior. The Worker has a single D1 binding and no public route. Its daily run emits the cutoff and affected count.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@snyk-io

snyk-io Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@PyRo1121
PyRo1121 merged commit 24c7100 into main Dec 4, 2026
7 checks passed
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