-
-
Notifications
You must be signed in to change notification settings - Fork 12
chore: make datasource url optional #135
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
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
Claude finished @ymc9's task —— View job PR Review: Make Datasource URL OptionalReview Tasks
Review SummaryThis PR makes the datasource ✅ Positive AspectsClean Implementation: The changes are minimal and focused:
Consistent with ZenStack V3 Architecture: Since ZenStack v3 uses Kysely as the query builder instead of Prisma runtime, making the datasource URL optional aligns with a more flexible configuration approach. Backwards Compatible: Existing schemas with URLs will continue to work - the validator just doesn't require them anymore.
|
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
Makes the datasource URL field optional in the schema generator. This appears to be a refactoring that simplifies datasource configuration by removing the requirement for URL fields.
- Removed URL validation and processing logic from the schema generator
- Updated datasource validator to treat URL field as optional instead of required
- Simplified the return type of
getDataSourceProvidermethod
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/sdk/src/ts-schema-generator.ts | Simplified getDataSourceProvider method by removing URL processing and validation logic |
| packages/language/src/validators/datasource-validator.ts | Modified URL validation to make the URL field optional instead of required |
Comments suppressed due to low confidence (1)
packages/language/src/validators/datasource-validator.ts:49
- The removal of the loop that validates both 'url' and 'shadowDatabaseUrl' fields means that 'shadowDatabaseUrl' validation is no longer performed. This could allow invalid shadowDatabaseUrl values to pass validation.
const value = getStringLiteral(urlField.value);
No description provided.