-
Notifications
You must be signed in to change notification settings - Fork 142
feat(engine): optionally automatically drain old runners on new runner version connected #3675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 4 Skipped Deployments
|
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR Review: Auto-drain old runners on version upgradeSummaryThis PR adds an optional Code Quality & Best Practices✅ Strengths
|
More templates
@rivetkit/cloudflare-workers
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |
4f348fe to
d9e7133
Compare
…r version connected
d9e7133 to
f160185
Compare
PR Review: Auto-drain runners on version upgradeOverviewThis PR adds an optional Code Quality & Best PracticesGood Patterns
Concerns1. Code Duplication Recommendation: Extract this into a shared module or utility function that both workflows can use. 2. Missing Error Handling Context Recommendation: Consider whether this should log errors and continue (best effort), collect failures and return them, or use a fire-and-forget pattern for non-critical signals. 3. Database Scan Performance Questions:
Potential Bugs & IssuesCritical: Race Condition PotentialIssue: The drain operation happens AFTER
Recommendation: Consider if the drain should happen before insertion (to prevent race) or accept the race as tolerable (actors will just reschedule when old runner drains). Signal Delivery Not GuaranteedThe code sends Stop signals but does not verify they were received or acted upon. Questions:
Version Comparison Edge CaseThe version comparison
Performance Considerations1. Database Transaction Scope 2. Serial Signal Sending 3. Cache Bypass Consideration Security ConcernsNo obvious security issues identified. The feature:
Test CoverageMajor Gap: No tests included This feature needs tests for:
Additional Issues1. Missing Documentation
2. Logging Gaps 3. Metrics
Recommendations SummaryHigh Priority
Medium Priority
Low Priority
VerdictThe implementation is functionally sound but needs tests, better error handling, and should address the code duplication. The race condition should be evaluated to determine if it is acceptable or requires mitigation. Status: Needs work before merge
|

No description provided.