-
Notifications
You must be signed in to change notification settings - Fork 2k
[ENH] CMEK support in Python and JS client #5991
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
base: main
Are you sure you want to change the base?
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Add CMEK abstractions and schema plumbing to Python and JS clients Introduces a cross-language Key Changes• Added Affected Areas• chromadb/api/types.py This summary was automatically generated by @propel-code-bot |
cf4a53a to
ffaf33f
Compare
19bf9fa to
454424e
Compare
8c321db to
42039db
Compare
| except (ValueError, KeyError) as e: | ||
| warnings.warn( | ||
| f"Could not deserialize CMEK configuration: {e}. Setting to None." | ||
| ) | ||
| instance.cmek = None |
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.
[Maintainability] This line is redundant. instance.cmek is already initialized to None before the if block and will retain that value if an exception is caught. You can safely remove this line to make the except block more concise.
| except (ValueError, KeyError) as e: | |
| warnings.warn( | |
| f"Could not deserialize CMEK configuration: {e}. Setting to None." | |
| ) | |
| instance.cmek = None | |
| except (ValueError, KeyError) as e: | |
| warnings.warn( | |
| f"Could not deserialize CMEK configuration: {e}. Setting to None." | |
| ) |
Context for Agents
This line is redundant. `instance.cmek` is already initialized to `None` before the `if` block and will retain that value if an exception is caught. You can safely remove this line to make the `except` block more concise.
```suggestion
except (ValueError, KeyError) as e:
warnings.warn(
f"Could not deserialize CMEK configuration: {e}. Setting to None."
)
```
File: chromadb/api/types.py
Line: 257042039db to
73cfc36
Compare
454424e to
21dfd10
Compare
73cfc36 to
c1ebea4
Compare

Description of changes
Summarize the changes made by this PR.
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?