-
-
Notifications
You must be signed in to change notification settings - Fork 12
chore(cli): suppress prisma update message #456
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
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds a local Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Claude finished @ymc9's task —— View job PR Review: Suppress Prisma Update MessageTodo List
SummaryThis PR modifies the Code Review✅ Positive Aspects:
Recommendations
Security Assessment✅ No security concerns - The change only sets a Prisma-specific environment variable for UI behavior. Performance Impact✅ Minimal performance impact - Only adds object spread operations which are negligible. Test Coverage❓ Testing Consideration: Consider adding a test to verify that the environment variable is properly set when calling Overall AssessmentThis is a good quality change that addresses a legitimate UX concern. The primary issue is the incorrect environment variable value that would prevent the intended functionality from working. Once fixed, this will improve the developer experience when using ZenStack CLI commands that invoke Prisma. Verdict: Approve with minor fix required for the environment variable value. |
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.
Pull request overview
This PR attempts to suppress Prisma's update notification messages when running Prisma commands through the CLI utility by setting the PRISMA_HIDE_UPDATE_MESSAGE environment variable.
- Sets
PRISMA_HIDE_UPDATE_MESSAGEenvironment variable in theexecPrismafunction - Updates both execution paths (direct and fallback) to use the new options object
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/cli/src/utils/exec-utils.ts (1)
46-60: Clarify default flag value and consider keepingPRISMA_HIDE_UPDATE_MESSAGEoverridableThis correctly ensures the hide-update flag is set for both the direct
node prismapath and thenpx/bunxfallback. Two small points you might want to consider:
Value choice for the flag
Prisma treatsPRISMA_HIDE_UPDATE_MESSAGEas truthy/falsey, so any non-empty string (including'0') hides the message. Using'1'or'true'instead would better reflect intent and avoid confusion for readers who associate0with “off”.Allowing callers to override the default
Right now,_options.envalways overwrites anyPRISMA_HIDE_UPDATE_MESSAGEcoming fromoptions.envorprocess.env. If you ever want consumers ofexecPrismato be able to re-enable the update message, you could flip the merge order so explicit env wins over the default, e.g.:
- const _options = {
...options,env: {...options?.env,PRISMA_HIDE_UPDATE_MESSAGE: '0',},- };
- const _options = {
...options,env: {PRISMA_HIDE_UPDATE_MESSAGE: '1',...options?.env,},- };
That keeps your default behavior (hidden by default) but still lets a caller intentionally override the flag if needed. </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used**: Path: .coderabbit.yaml **Review profile**: CHILL **Plan**: Pro <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 09dabd8387861dff1d5b8f94a7b494782c089ecf and ad1c6c4bb1dedb43f57d92c7473756c3b8c76b25. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `packages/cli/src/utils/exec-utils.ts` (1 hunks) </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>🧠 Learnings (1)</summary> <details> <summary>📚 Learning: 2025-11-26T01:55:04.540Z</summary>Learnt from: CR
Repo: zenstackhq/zenstack-v3 PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-26T01:55:04.540Z
Learning: Database migrations should use Prisma CLI under the hood via ZenStack commands**Applied to files:** - `packages/cli/src/utils/exec-utils.ts` </details> </details> </details> <details> <summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)</summary> * GitHub Check: build-test (20.x, sqlite) * GitHub Check: build-test (20.x, postgresql) </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
|
Claude finished @ymc9's task —— View job PR Review: Suppress Prisma Update MessageTodo List
SummaryThis PR modifies the Code Review✅ Positive Aspects:
Recommendations
Security Assessment✅ No security concerns - The change only sets a Prisma-specific environment variable for UI behavior. Performance Impact✅ Minimal performance impact - Only adds object spread operations which are negligible. Test Coverage❓ Testing Consideration: Consider adding a test to verify that the environment variable is properly set when calling Overall AssessmentThis is a good quality change that addresses a legitimate UX concern. The main issue is the missing Verdict: Approve with fix required for environment variable inheritance. |
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.