-
Notifications
You must be signed in to change notification settings - Fork 135
chore: fix diff between ee, fix plural api query params #3524
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
chore: fix diff between ee, fix plural api query params #3524
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
PR Review: chore: fix diff between ee, fix plural api query paramsSummaryThis PR introduces proper plural query parameter handling for list APIs (actors, namespaces, runners, runner_configs) by adding singular-form array parameters alongside the existing deprecated comma-separated string parameters. It also adds Code QualityPositive:
Suggestions:
Potential Bugs
Performance
Security
Test Coverage
Minor Notes
RecommendationThe core changes for plural query params in |
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: |
107bfe2 to
3acf83e
Compare
PR Review: chore: fix diff between ee, fix plural api query paramsSummaryThis PR introduces API query parameter improvements by adding proper plural parameter support ( Code Quality and Best Practices ✅Good patterns observed:
Potential Issues
|
3acf83e to
a931dae
Compare
PR Review: Fix diff between EE, fix plural API query paramsOverviewThis PR addresses synchronizing differences between editions and migrating from comma-separated to array-based query parameters. Code QualityStrengths
Issues FoundMust Fixengine/packages/api-public/src/actors/utils.rs:16 - Internal function still uses deprecated parameter Current: actor_ids: Some(actor_id.to_string()),Should be: actor_id: vec![actor_id],Should Consider
Performance
Security
VerdictSolid refactoring with good backward compatibility. Main issue is internal function using deprecated API. Recommendation: Update utils.rs:16 and add backward compatibility tests. |
a931dae to
2e19120
Compare
Pull Request ReviewThis PR modernizes API query parameters by migrating from comma-separated string values to proper array-based query parameters, along with configuration updates for the development environment. Overall, the changes are well-structured and maintain backward compatibility. ✅ Strengths
🔍 Issues & Concerns1. Critical: Inconsistent Validation in api-public/actors/list.rsLocation: engine/packages/api-public/src/actors/list.rs:82-86 The code still only parses the old actor_ids parameter but doesn't include the new actor_id field. This means the public API won't accept the new actor_id array parameter, only the deprecated actor_ids string. This is inconsistent with the peer API implementation. The code should be updated to concatenate both parameters like in the peer API. 2. Docker Config DuplicationAll docker/dev* configs have duplicate 127.0.0.1 in valid_hosts. Remove one of the duplicate entries in the template at docker/template/src/services/edge/rivet-engine.ts:23. 3. Missing Test CoverageThe PR doesn't appear to add new tests for the dual parameter support. Consider adding tests that verify both old and new parameters work correctly. 🎯 Recommendations
SummaryThis is a good cleanup that modernizes the API. The main blocker is issue #1 - the public API actors endpoint needs to be updated to match the peer API implementation. After addressing these issues, this PR will be ready to merge. Verdict: Needs changes before merge |
2e19120 to
441926f
Compare
Code Review - PR #3524This PR fixes differences between enterprise edition (EE) and improves plural API query parameters by introducing proper array-based query parameters while maintaining backward compatibility with the deprecated string-based format. Summary
Positive Aspects ✅
Issues & Concerns 🔴1. Unused Import in api-public/src/actors/list.rs (Line 3)use gas::prelude::*;This import was added but doesn't appear to be used. The Location: 2. Inconsistent Error Handling PatternIn return Err(errors::Validation::InvalidInput {
message: "Cannot provide both actor_id and (name + key)...".to_string(),
}.build());However, in bail!("name is required when not using actor_ids")Recommendation: Standardize on one approach. The structured error approach in api-public is better for API consistency and provides better error metadata. 3. Potential Issue with Array ConcatenationThe array merging logic concatenates let actor_ids = [
query.actor_id,
query.actor_ids.map(|x| /* parse */).unwrap_or_default(),
].concat();Concern: If a user provides both Recommendation: Add validation to ensure only one format is used: if !query.actor_id.is_empty() && query.actor_ids.is_some() {
return Err(/* error about using both formats */);
}4. Missing Validation in Peer APIThe
Recommendation: Since peer API is called by public API, consider whether these validations should exist in both layers or only in public API. Document the decision. 5. Cargo.toml Changes Seem UnrelatedThe changes to Questions:
Recommendation: Ensure these dependency changes are intentional and tested. Performance Considerations ⚡
Security Considerations 🔒
Testing 🧪Missing: The PR doesn't include test updates. Given the API contract changes:
Locations to add tests:
Documentation 📝
Recommendations SummaryMust Fix 🔴
Should Consider 🟡
Nice to Have 🟢
ConclusionThis is a well-structured refactoring that improves API consistency and follows RESTful best practices for array query parameters. The backward compatibility approach is solid. Main concerns are around validation completeness and potential edge cases with simultaneous use of old and new parameter formats. Recommendation: Request changes for the must-fix items, particularly around validation and testing. |
441926f to
29d2a5d
Compare
29d2a5d to
d4c7511
Compare
Merge activity
|

No description provided.