Skip to content

Commit 07f9750

Browse files
authored
[ENH] Default fallback for delete response (#6582)
## Description of changes _Summarize the changes made by this PR._ - Improvements & Bug fixes - Add default fallback for delete response deserialization so that the rust client is backward compatible to old server impl - New functionality - N/A ## 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)?_
1 parent aaa751c commit 07f9750

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

clients/new-js/packages/chromadb/src/api/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export type DeleteCollectionRecordsPayload = RawWhereFields & {
191191
};
192192

193193
export type DeleteCollectionRecordsResponse = {
194-
deleted: number;
194+
deleted?: number;
195195
};
196196

197197
export type DeleteCollectionResponse = {

rust/types/src/api_types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,6 +1626,7 @@ impl DeleteCollectionRecordsRequest {
16261626
#[derive(Serialize, Deserialize)]
16271627
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
16281628
pub struct DeleteCollectionRecordsResponse {
1629+
#[serde(default)]
16291630
pub deleted: u32,
16301631
}
16311632

0 commit comments

Comments
 (0)