-
Notifications
You must be signed in to change notification settings - Fork 141
fix(rivetkit): fix default logic for serveManager & advertiseEndpoint #3789
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
Conversation
|
🚅 Deployed to the rivet-pr-3789 environment in rivet-frontend
🚅 Deployed to the rivet-pr-3789 environment in rivet-frontend-website-preview
|
|
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. |
Pull Request ReviewSummaryThis PR refactors the serverless configuration logic by renaming Code Quality ✅Strengths:
Code organization:
Potential Issues 🔍1. Breaking Change - Documentation RequiredThis is a breaking change for any users currently using
2. Inconsistent Validation Pattern (rivetkit-typescript/packages/rivetkit/src/registry/config/index.ts:214-218)The code uses both Zod validation and runtime
Recommendation: Remove the redundant // Lines 214-218 - Consider removing if Zod validation is sufficient
invariant(
config.serverless.clientEndpoint,
"clientEndpoint is required in production mode without endpoint",
);3. Type Safety Consideration (rivetkit-typescript/packages/rivetkit/src/registry/config/index.ts:193)The variable let clientEndpoint: string;While TypeScript can infer the type, in this case all branches assign a string value so this is safe. However, the production branch (lines 214-218) relies on the invariant to ensure non-null. If you remove the invariant as suggested above, consider using TypeScript's non-null assertion or refactoring to make the type safety explicit. Performance Considerations ⚡No performance concerns. The refactoring simplifies the logic path which should have neutral or slightly positive performance impact. Security Concerns 🔒No security issues identified. The endpoint validation and token handling remain unchanged. Test Coverage 📋Concern: I couldn't locate tests specifically covering the configuration transform logic. Recommendations:
Additional Notes 📝Display Logic Enhancement (rivetkit-typescript/packages/rivetkit/src/registry/index.ts:247): config.endpoint ?? config.serverless.clientEndpointThis is correct, but consider whether displaying the endpoint is still meaningful in all cases. The condition on line 243 checks Overall Assessment ⭐Score: 8/10 This is a solid refactoring that improves code quality and maintainability. The main concerns are:
Recommendation: Approve with suggested changes Action Items
Review generated by Claude Code |
More templates
@rivetkit/cloudflare-workers
@rivetkit/db
@rivetkit/framework-base
@rivetkit/next-js
@rivetkit/react
rivetkit
@rivetkit/sql-loader
@rivetkit/virtual-websocket
@rivetkit/engine-runner
@rivetkit/engine-runner-protocol
commit: |
Merge activity
|

No description provided.