-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[ENH]: (Rust client): fix database resolution #5692
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
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
|
Fix for Duplicate Databases in Rust Client This pull request addresses an issue where the Key Changes• Changed Affected Areas• This summary was automatically generated by @propel-code-bot |
| pub user_id: String, | ||
| pub tenant: String, | ||
| pub databases: Vec<String>, | ||
| pub databases: HashSet<String>, |
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.
[BestPractice]
This change from Vec<String> to HashSet<String> is indeed a breaking change for consumers of the api-types crate. While this is a good solution to deduplicate database names, it requires careful handling as a public API change.
According to Rust's semantic versioning guidelines, this requires a major version bump (e.g., 1.0.0 → 2.0.0) since it changes the public API in an incompatible way. Consider:
- Adding a migration guide in the changelog
- Documenting the behavioral differences (no order guarantee, automatic deduplication)
- Potentially providing helper methods for common Vec↔HashSet conversions
This follows RFC 1105 API Evolution guidelines for major breaking changes.
Context for Agents
[**BestPractice**]
This change from `Vec<String>` to `HashSet<String>` is indeed a breaking change for consumers of the `api-types` crate. While this is a good solution to deduplicate database names, it requires careful handling as a public API change.
According to Rust's semantic versioning guidelines, this requires a major version bump (e.g., 1.0.0 → 2.0.0) since it changes the public API in an incompatible way. Consider:
1. Adding a migration guide in the changelog
2. Documenting the behavioral differences (no order guarantee, automatic deduplication)
3. Potentially providing helper methods for common Vec↔HashSet conversions
This follows RFC 1105 API Evolution guidelines for major breaking changes.
File: rust/api-types/src/user_identity.rs
Line: 9d28918b to
0f63693
Compare
Description of changes
/auth/identitycurrently is returning duplicate databases which causes database resolution to fail.Test plan
How are these changes tested?
pytestfor python,yarn testfor js,cargo testfor rustMigration plan
Are there any migrations, or any forwards/backwards compatibility changes needed in order to make sure this change deploys reliably?
Observability plan
What is the plan to instrument and monitor this change?
Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?