[HOTFIX] applying PR #6573 to rc/2026-03-06#6580
Conversation
## Description of changes _Summarize the changes made by this PR._ - Improvements & Bug fixes - N/A - New functionality - Introduce `limit: Option<u32>` in the collection delete route. The response now returns how many records have been deleted. ## Test plan _How are these changes tested?_ - [ ] Tests pass locally with `pytest` for python, `yarn test` for js, `cargo test` for rust ## Migration 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](https://github.com/chroma-core/chroma/tree/main/docs/docs.trychroma.com)?_
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
|
Add delete limit and deleted count for collection deletions This PR introduces optional This summary was automatically generated by @propel-code-bot |
There was a problem hiding this comment.
Documentation mismatch noted; update OpenAPI response type to align with handler.
Status: Changes Suggested | Risk: Medium
Issues Identified & Suggestions
- Fix OpenAPI response type mismatch for delete endpoint:
rust/frontend/src/server.rs
Review Details
📁 10 files reviewed | 💬 1 comments
👍 / 👎 individual comments to help improve reviews for you
| Path((tenant, database, collection_name)): Path<(String, String, String)>, | ||
| State(mut server): State<FrontendServer>, | ||
| ) -> Result<Json<UpdateCollectionResponse>, ServerError> { | ||
| ) -> Result<Json<DeleteCollectionResponse>, ServerError> { |
There was a problem hiding this comment.
[Documentation] The handler now returns DeleteCollectionResponse, but the #[utoipa::path] docs above still declare UpdateCollectionResponse. This will generate incorrect OpenAPI for the delete-collection endpoint.
Action: update the response body in the OpenAPI annotation to match the new return type, e.g.
responses(
(status = 200, description = "Collection deleted successfully", body = DeleteCollectionResponse),
...
)Context for Agents
The handler now returns `DeleteCollectionResponse`, but the `#[utoipa::path]` docs above still declare `UpdateCollectionResponse`. This will generate incorrect OpenAPI for the delete-collection endpoint.
Action: update the response body in the OpenAPI annotation to match the new return type, e.g.
```rust
responses(
(status = 200, description = "Collection deleted successfully", body = DeleteCollectionResponse),
...
)
```
File: rust/frontend/src/server.rs
Line: 1619
This PR cherry-picks the commit 9100022 onto rc/2026-03-06. If there are unresolved conflicts, please resolve them manually.