Update cron job overview to opt to skip JOIN depending on query cost#1167
Update cron job overview to opt to skip JOIN depending on query cost#1167everettbu wants to merge 12 commits into
Conversation
🎭 Playwright Test ResultsDetails
Flaky testsFeatures › cron-jobs.spec.ts › High Query Cost Banner › shows banner and still displays cron jobs when query cost exceeds threshold Skipped testsFeatures › assistant.spec.ts › AI Assistant › Can send a message to the assistant and receive a response |
This comment has been minimized.
This comment has been minimized.
|
Upstream PR was closed or merged. Code is synced via branch mirror. |
Mirror of supabase/supabase#42492
Original author: joshenlim
Context
The Integrations -> Cron overview page renders a list of cron jobs by doing a join on both
cron.jobsandcron.job_run_detailsin order to pull the data for "Latest run" and "Status" ("Next run" is just derived from "Latest Run" and the job's schedule)In the past, we've had users run into issues where this query would time out, likely due to the join on
job_run_detailsespecially if that table is really big (and the columns on that table aren't indexed), and our solution was to inform users to clear out that table + schedule a job to clean thejob_run_detailstable on a certain cadence. This CTA however blocks the UI from rendering the cron jobs overview entirelyChanges involved
Am opting to use the new preflight check introduced here
job_run_detailstable + schedule a clean up job still remainsSummary by CodeRabbit
New Features
Bug Fixes
Performance
Tests