feat: configure rivetkit storage path#4233
feat: configure rivetkit storage path#4233NathanFlurry wants to merge 1 commit into02-16-chore_rivetkit_migrate_file_system_driver_to_sqlitefrom
Conversation
|
🚅 Deployed to the rivet-pr-4233 environment in rivet-frontend
|
|
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. |
PR Review: feat: configure rivetkit storage path (#4233)Summary: This PR adds a Code Quality and Best PracticesThe implementation is clean and consistent with existing patterns. The transform pattern used for The The debug log in Minor Issues1. Missing documentation update The top of // IMPORTANT: When adding or modifying environment variables here, also update the
// documentation at: docs/general/registry-configuration.mdxThe PR updates 2. When /**
* Storage path for RivetKit file-system state when using the default driver.
* Has no effect when `endpoint`, `token`, or a custom `driver` is configured.
* Can also be set via RIVETKIT_STORAGE_PATH.
*/Potential BugsNo functional bugs identified. The wiring is correct:
PerformanceNo performance concerns. The change is purely configuration-time wiring with no impact on hot paths. SecurityPath traversal is not sanitized — Test CoverageThe two tests in
Suggested additional test case:
The use of Style and Convention Compliance
SummaryThis is a well-scoped, clean PR. The core implementation is correct and follows established patterns. The main actionable items are:
|
ee7072e to
c7cc1bf
Compare
49bf396 to
35e2bc0
Compare
| export const DocRegistryConfigSchema = z | ||
| .object({ | ||
| use: z.record(z.string(), z.unknown()).describe("Actor definitions. Keys are actor names, values are actor definitions."), | ||
| storagePath: z.string().optional().describe("Storage path for RivetKit file-system state when using the default driver. Can also be set via RIVETKIT_STORAGE_PATH."), |
There was a problem hiding this comment.
The storagePath field in DocRegistryConfigSchema is missing the .transform() call that exists in the main RegistryConfigSchema (lines 56-59). This inconsistency means the environment variable RIVETKIT_STORAGE_PATH will not be used as a fallback when parsing with DocRegistryConfigSchema, causing different behavior depending on which schema is used.
Fix: Add the transform to match the main schema:
storagePath: z.string().optional()
.transform((val) => val ?? getRivetkitStoragePath())
.describe("Storage path for RivetKit file-system state when using the default driver. Can also be set via RIVETKIT_STORAGE_PATH."),Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
Merge activity
|
# Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. ## Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: