-
Notifications
You must be signed in to change notification settings - Fork 129
chore(guard): add support for routing runner ws to /runners/connect
#3340
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
Code Review: Add support for routing runner ws to
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the token in path not supported for runners like it is for actors?
0fb4cee to
90a20c3
Compare
PR Review: Add support for routing runner WebSocket to
|
02256ed to
7ee6720
Compare
90a20c3 to
50142b7
Compare
PR Review: Add support for routing runner ws to
|
7ee6720 to
4a27884
Compare
50142b7 to
23c26cd
Compare
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/limits#rate-limits |
Code Review for PR #3340SummaryThis PR adds path-based routing support for runner WebSocket connections via Code Quality & Best Practices✅ Strengths:
Potential Bugs or Issues🔴 Critical:
Performance Considerations✅ Good:
Security Concerns✅ Authentication is preserved:
Test Coverage❌ Missing tests:
Recommendations SummaryMust address:
Should consider:
Overall, this is a solid refactoring that improves the routing architecture. The main concerns are around backward compatibility and test coverage. |
PR Review: Add path-based routing for runner WebSocket connectionsSummaryThis PR adds path-based routing support for runner WebSocket connections to Code Quality & Best Practices ✅Strengths:
Minor improvements to consider:
const baseUrl = wsEndpoint.endsWith("/runners/connect")
? wsEndpoint.slice(0, -"/runners/connect".length)
: wsEndpoint.endsWith("/")
? wsEndpoint.slice(0, -1)
: wsEndpoint;
// In routing/runner.rs or routing/mod.rs
pub(crate) const RUNNER_CONNECT_PATH: &str = "/runners/connect";Potential Bugs 🔍Low severity:
Security Considerations 🔒Good security practices observed:
Observation:
Performance Considerations ⚡Positive:
Note:
Test Coverage 🧪Concerns:
Recommended additions:
Example test structure: #[test]
fn test_route_runner_path_based_valid() {
let path = "/runners/connect?protocol_version=1";
// Test that route_request_path_based returns Some(RoutingOutput)
}
#[test]
fn test_route_runner_path_based_invalid() {
assert!(matches_runner_path("/api/runners/connect").is_none());
assert!(matches_runner_path("/runners/connect/").is_none());
}Documentation 📚
Overall AssessmentRating: 8/10 - Well-implemented feature with good code quality. Main areas for improvement are test coverage and potential edge case handling. Recommendation: Approve with minor suggestions - The code is production-ready, but adding tests would significantly improve confidence in the implementation. Action Items:
🤖 Generated with Claude Code |
23c26cd to
e86c567
Compare
4a27884 to
dc31f94
Compare
Code Review for PR #3340: Add support for routing runner ws to
|
Pull Request Review - PR #3340SummaryThis PR adds support for path-based routing of runner WebSocket connections to Code Quality ✅Strengths
Code StructureThe changes follow established patterns in the codebase:
Potential Issues 🔍1. Query Parameter Handling (Minor)In let path_without_query = path.split('?').next().unwrap_or(path);This is correct, but consider edge cases:
Recommendation: This is likely fine, but could add a comment explaining the query string handling. 2. WebSocket Protocol Simplification (Question)In const protocols = ["rivet", `rivet_target.runner`];to: const protocols = ["rivet"];Questions:
Recommendation: Verify this doesn't break existing runner connections, or document the migration path. 3. Path Matching Strictness (Minor)The path matching in if path_without_query != "/runners/connect" {This means:
Recommendation: Consider if trailing slashes should be handled, though the current strict matching is probably intentional and correct. Performance Considerations ✅
Security Concerns ✅Authentication FlowThe authentication logic in
Potential Concerns
Test Coverage
|
Merge activity
|

No description provided.