-
Notifications
You must be signed in to change notification settings - Fork 131
fix(serverless): general cleanup #3450
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: 11-05-feat_pegboard_serverless_pool
Are you sure you want to change the base?
fix(serverless): general cleanup #3450
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
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. |
More templates
@rivetkit/actor
@rivetkit/cloudflare-workers
@rivetkit/core
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |
|
Review complete - see full review below |
PR Review: fix(serverless): general cleanupSummaryThis PR performs cleanup of the serverless runner implementation, removing a massive number of corrupt/malformed error artifact files (90 files) and refactoring the serverless workflow code for better clarity and maintainability. Code Quality & Best PracticesPositive Changes:
Concerns:
|
Potential Bugs
Performance Considerations
|
Security Concerns
Test CoverageMissing test coverage: This PR does not include any test changes or additions. Given the refactoring scope, integration tests should verify:
|
Recommendations
Verdict✅ Approve with minor suggestions This is a solid cleanup PR that removes technical debt and improves code organization. The core logic changes are well-thought-out and the separation of concerns is clearer. The minor issues noted above are primarily about logging consistency and future improvements rather than blocking problems. The removal of 90+ corrupt error files alone makes this a valuable cleanup, and the refactoring sets a better foundation for future serverless runner work. |
7997106 to
5c32999
Compare
|
This is a solid refactoring that improves code clarity and maintainability of the serverless runner infrastructure. Key improvements include: (1) Simplified architecture - connection workflow now fetches its own config instead of receiving it as parameters, reducing coupling. (2) Improved signal flow - eliminated ConnectionDrainStarted forwarding through runner workflow; connection now signals pool directly. (3) Better state management - runner workflow tracks draining state properly. (4) Code quality - removed unused imports, fixed pegboard_runner_config__get typo (double underscore), cleaned up 90+ corrupt error artifacts. (5) Simplified control flow - removed repeat loop and join_signal macro from runner workflow. Main concern: Potential race condition at connection.rs:75 - if runner workflow has not completed InitState activity yet, parse_state will fail at connection.rs:282. Consider adding error handling for this case. Other observations: (1) connection.rs:72-73 uses infinite timeout and retries which may mask errors. (2) Potential duplicate RunnerDrainStarted signal sending between inline send and fallback. (3) Header filtering at connection.rs:131-139 is good for security but silent - consider logging filtered headers. (4) Sequential runner startup at pool.rs:69-82 could be slow for large start_count - consider parallel dispatch. (5) Verify error generation tooling was fixed to prevent corrupt artifacts. Code follows CLAUDE.md conventions well: structured logging, anyhow::Context for errors, lowercase log messages, hard tabs, proper Result types. Tag ordering standardized to namespace_id then runner_name. Recommendation: Approve with minor fixes for initialization race condition. Great work on eliminating complex signal forwarding! |

No description provided.