TaskRun optimizations: dropping FKs and some indexes#3309
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (27)
🧰 Additional context used📓 Path-based instructions (10)**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
{packages/core,apps/webapp}/**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
apps/webapp/app/**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)
Files:
apps/webapp/**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)
Files:
**/*.ts📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)
Files:
**/*.{js,ts,jsx,tsx,json,md,yaml,yml}📄 CodeRabbit inference engine (AGENTS.md)
Files:
apps/**/*📄 CodeRabbit inference engine (CLAUDE.md)
Files:
apps/webapp/**/*.server.{ts,tsx}📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)
Files:
apps/webapp/**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)
Files:
🧠 Learnings (8)📓 Common learnings📚 Learning: 2026-03-22T13:51:25.797ZApplied to files:
📚 Learning: 2026-03-22T13:51:25.797ZApplied to files:
📚 Learning: 2025-07-12T18:06:04.133ZApplied to files:
📚 Learning: 2025-06-14T08:07:46.625ZApplied to files:
📚 Learning: 2026-03-22T13:26:12.060ZApplied to files:
📚 Learning: 2026-03-22T19:24:14.403ZApplied to files:
📚 Learning: 2026-03-29T19:16:28.864ZApplied to files:
🔇 Additional comments (1)
WalkthroughThis PR removes the feature-flag-driven runs repository selection and the Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The schedule engine pre-queues runs ~25s before exactScheduleTime so they're ready to execute on the dot, but overrideCreatedAt stamps the TaskRun's createdAt with the future scheduled time. The getSpan query used createdAt as the window start with only a 1s buffer, causing spans to fall outside the query window for scheduled runs. The same issue was fixed for getTraceSummary in df4ab97 but getSpan was missed. Applying the same 60s buffer.
Summary
overhead on every insert/update with no remaining benefit. Prisma queries are unaffected.
All index drops use CONCURRENTLY IF EXISTS to avoid table locks in production.
Test plan