-
Notifications
You must be signed in to change notification settings - Fork 129
chore(scripts): add engine shell command #3311
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(scripts): add engine shell command #3311
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
Code ReviewThis PR adds a new development helper script for opening a subshell with Rivet engine environment variables. Overall, the implementation is clean and follows good practices. Here are my findings: ✅ Strengths
💡 Suggestions1. Missing Postgres Availability CheckThe script hardcodes the Postgres URL but doesn't verify that Postgres is actually running. Consider adding a check similar to if ! command -v nc >/dev/null 2>&1; then
echo "warning: 'nc' not found, cannot verify postgres availability"
else
if ! nc -z localhost 5432 >/dev/null 2>&1; then
echo "warning: Postgres is not reachable at localhost:5432."
echo "You may need to start postgres with: ./scripts/run/postgres.sh"
fi
fiThis would provide a better developer experience by catching the issue early. 2. Documentation ConsiderationSince this is a new development tool, consider:
Example header: #!/usr/bin/env bash
# Opens a subshell with Rivet engine environment variables configured.
# Useful for running engine commands without cargo run, or for debugging.
# Example: After running this, you can use 'rivet-engine' directly.3. Minor: PATH OrderThe PATH prepends debug before release binaries. This is likely intentional (prefer debug builds), but worth confirming this is the desired behavior for all use cases. 🔒 SecurityNo security concerns. The script:
🧪 TestingThe script is straightforward and follows established patterns. Manual testing should verify:
📊 PerformanceN/A - This is a simple shell script with negligible performance impact. ✅ ConclusionLGTM with suggestions! The script is functional and follows good practices. The suggestions above would enhance the developer experience but aren't blocking issues. |
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: |
d825c16 to
e17af20
Compare
2ec6506 to
ad122ff
Compare
Code ReviewThank you for this contribution! This is a useful developer utility script. Here's my review: ✅ Strengths
💡 Suggestions1. Consider PostgreSQL availability checkThe script sets # Check if postgres is running
if ! command -v nc >/dev/null 2>&1; then
echo "warning: 'nc' not found. Cannot verify postgres is running."
elif ! nc -z localhost 5432 >/dev/null 2>&1; then
echo "warning: postgres does not appear to be running at localhost:5432"
echo "consider running: ./scripts/run/postgres.sh"
fiThis would provide better developer experience by catching configuration issues early. 2. Script naming clarityThe script name
Consider either:
Example header comment: #!/usr/bin/env bash
# Opens a subshell with environment variables configured for running rivet-engine
# with PostgreSQL backend. Useful for manual testing and debugging.
set -euo pipefail3. Document the script's purposeSince this is a developer utility, consider adding it to project documentation or a README in the 🔒 SecurityNo security concerns - this is a local development script with hardcoded localhost credentials, which is appropriate for dev environments. 🎯 Use CasesThis script would be particularly useful for:
Overall AssessmentThis is a solid addition to the developer tooling. The suggestions above are minor improvements that would enhance discoverability and user experience, but the script is functional and follows repository conventions as-is. Recommendation: Approve with optional improvements |
PR Review: Add engine shell commandSummaryThis PR adds a new utility script Code Quality ✅Positives:
Suggestions:
Potential IssuesNone identified - The script is straightforward and doesn't have any bugs or security concerns. Performance ConsiderationsN/A - This is a simple shell script with negligible performance impact. Security ConcernsLow Risk - The hardcoded credentials ( Test CoverageN/A - This is a developer utility script. Manual testing is sufficient. Overall AssessmentLGTM! ✅ This is a clean, simple utility that follows repository conventions. The suggestions above are minor improvements that could enhance usability but are not blockers. The script is ready to merge as-is. Review generated with assistance from Claude Code |
ad122ff to
87a9fb6
Compare
Code ReviewOverviewThis PR adds a new utility script ✅ Positive Observations
💡 Suggestions for Improvement1. Consider PostgreSQL Availability CheckThe related script if ! command -v nc >/dev/null 2>&1; then
echo "warning: 'nc' not found, cannot verify postgres connectivity"
elif ! nc -z localhost 5432 >/dev/null 2>&1; then
echo "warning: Postgres may not be reachable at localhost:5432"
echo "Consider running ./scripts/run/postgres.sh first"
fiThis is optional since a shell environment might be used for various purposes, not just immediate database access. 2. Environment Variable DocumentationConsider adding a brief comment at the top explaining what this script does and when to use it: #!/usr/bin/env bash
# Opens a subshell with Rivet engine environment variables configured
# Useful for running engine binaries or debugging without starting the full engine
set -euo pipefail3. Hardcoded CredentialsThe PostgreSQL URL contains hardcoded credentials (
🔍 Security Considerations
🧪 Testing Considerations
📊 Performance
SummaryThis is a solid addition to the developer tooling. The script is well-structured, follows repository conventions, and provides clear value. The suggestions above are optional enhancements that could improve the user experience slightly, but the script is merge-ready as-is. Recommendation: ✅ Approve |
Merge activity
|
141efff to
33ba42a
Compare
87a9fb6 to
2d5829b
Compare
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/limits#rate-limits |
Code ReviewSummaryThis PR adds a new shell script ✅ Strengths
🔍 Observations & Suggestions1. Missing Postgres availability checkUnlike Suggestion: Consider adding a check similar to
2. Environment variable consistencyThe script exports Question: Is there a reason for this difference? If this script is meant to provide an interactive development environment, exporting makes sense. Just want to ensure this is intentional. 3. Documentation/CommentsThe script lacks a header comment explaining its purpose and usage. Suggestion: Add a brief comment at the top explaining the script's purpose. 4. Hard-coded credentialsThe Postgres URL contains hard-coded credentials ( Security: ✅ No concerns - these are local development credentials only. 📊 Code Quality Assessment
🎯 VerdictRecommendation: ✅ Approve with minor suggestions This is a useful developer experience improvement. The script is solid and ready to merge. The suggestions above are optional enhancements that could improve consistency and user experience, but they're not blockers. 📝 Optional Enhancements (Non-blocking)
Great work on improving the developer workflow! 🚀 |
Code Review SummaryThis PR adds a helper script to open a subshell with engine environment variables pre-configured for local development. Overall, the implementation is clean and follows good shell scripting practices. ✅ Positives
🔍 Observations & Suggestions1. Security Note: Hardcoded CredentialsThe script contains hardcoded postgres credentials (
2. Potential Enhancement: Postgres Availability CheckUnlike
3. Minor: Path Export Orderexport PATH="${REPO_ROOT}/target/debug:${REPO_ROOT}/target/release:${PATH}"This prepends both debug and release directories, with debug taking precedence. This is fine, but worth noting that debug builds will shadow release builds. Consider if this is intentional or if only one should be included based on build mode. 🎯 Code Quality Assessment
📝 RecommendationApprove with minor suggestions. The code is production-ready for its intended purpose. The suggestions above are optional enhancements that could improve user experience but aren't blockers. Optional Enhancement ExampleIf you want to add the Postgres check, here's a pattern from if ! command -v nc >/dev/null 2>&1; then
echo "warning: 'nc' not found, cannot check if postgres is running"
elif ! nc -z localhost 5432 >/dev/null 2>&1; then
echo "warning: postgres is not reachable at localhost:5432"
echo "Run './scripts/run/postgres.sh' to start postgres"
fiGreat addition to the developer tooling! 🚀 |

No description provided.