Skip to content

[HOTFIX] applying PR #6573 to rc/2026-03-06#6580

Merged
Sicheng-Pan merged 1 commit intorc/2026-03-06from
hotfix-6573/rc/2026-03-06
Mar 7, 2026
Merged

[HOTFIX] applying PR #6573 to rc/2026-03-06#6580
Sicheng-Pan merged 1 commit intorc/2026-03-06from
hotfix-6573/rc/2026-03-06

Conversation

@chroma-droid
Copy link
Copy Markdown

This PR cherry-picks the commit 9100022 onto rc/2026-03-06. If there are unresolved conflicts, please resolve them manually.

## 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)?_
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 7, 2026

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@propel-code-bot
Copy link
Copy Markdown
Contributor

Add delete limit and deleted count for collection deletions

This PR introduces optional limit support for collection record deletion and returns the number of deleted records in the response. It threads the new limit field through API payloads, request validation, server handlers, frontends, and clients, and updates tests to cover validation and behavior with limits.

This summary was automatically generated by @propel-code-bot

Copy link
Copy Markdown
Contributor

@propel-code-bot propel-code-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

[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

@Sicheng-Pan Sicheng-Pan merged commit 459fd10 into rc/2026-03-06 Mar 7, 2026
128 of 130 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants