Skip to content

fix(young): grant life_ustc_runtime SELECT on YoungEvent - #1004

Merged
tiankaima-copilot merged 1 commit into
mainfrom
fix/grant-young-event-runtime
Sep 2, 2026
Merged

fix(young): grant life_ustc_runtime SELECT on YoungEvent#1004
tiankaima-copilot merged 1 commit into
mainfrom
fix/grant-young-event-runtime

Conversation

@tiankaima-copilot

Copy link
Copy Markdown
Collaborator

Summary

/catalog/young-events and /api/catalog/young-events 500 in production: the 20260901210000_add_young_events migration created the table but granted nothing, so the unprivileged life_ustc_runtime role gets Postgres 42501 (surfaced as Prisma P2039 via the driver adapter) on every query.

Same class of issue as #976 (WeatherObservation); same fix shape — a conditional grant migration that no-ops where the role isn't provisioned.

Verification

  • Applied locally via db:migrate:deploy (NOTICE path without the role).
  • Production log evidence: PrismaClientKnownRequestError P2039 on /catalog/young-events (wrangler tail); migration itself deployed fine per the DB Migrate Deploy run on the merge commit.

The table-creation migration granted nothing, so every runtime query
failed with 42501 (surfaced as P2039 through the driver adapter) and
/catalog/young-events 500s in production. Mirrors the WeatherObservation
grant pattern from ba68c8f.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
life-ustc dca6445 Sep 02 2026, 06:56 AM

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@tiankaima-copilot
tiankaima-copilot merged commit 358eff4 into main Sep 2, 2026
20 checks passed
@tiankaima-copilot
tiankaima-copilot deleted the fix/grant-young-event-runtime branch September 2, 2026 07:17
github-actions Bot pushed a commit that referenced this pull request Sep 2, 2026
## [1.103.1](v1.103.0...v1.103.1) (2026-09-02)

### Bug Fixes

* **young:** grant life_ustc_runtime SELECT on YoungEvent ([#1004](#1004)) ([358eff4](358eff4))
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.103.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants