Skip to content

[CHORE] Drop support for SegmentAPI#6715

Draft
kylediaz wants to merge 3 commits intomainfrom
kylediaz03-23-_chore_drop_support_for_segmentapi
Draft

[CHORE] Drop support for SegmentAPI#6715
kylediaz wants to merge 3 commits intomainfrom
kylediaz03-23-_chore_drop_support_for_segmentapi

Conversation

@kylediaz
Copy link
Copy Markdown
Contributor

Description of changes

Summarize the changes made by this PR.

  • Improvements & Bug fixes
    • ...
  • New functionality
    • ...

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?

@github-actions
Copy link
Copy Markdown

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)

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@blacksmith-sh

This comment has been minimized.

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.

Action required due to a critical cross-version API selection issue and a failing test mock with Rust bindings.

Status: Action Required | Risk: High

Issues Identified & Suggestions
  • Ensure old versions use SegmentAPI or always apply override: chromadb/test/property/test_cross_version_persist.py
  • Align test mocks with Rust bindings or keep SegmentAPI: chromadb/test/test_chroma.py
Review Details

📁 7 files reviewed | 💬 2 comments

👍 / 👎 individual comments to help improve reviews for you

chroma_api_impl="chromadb.api.rust.RustBindingsAPI"
if "CHROMA_RUST_BINDINGS_TEST_ONLY" in os.environ
else "chromadb.api.segment.SegmentAPI",
chroma_api_impl="chromadb.api.rust.RustBindingsAPI",
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.

Critical

[Logic] configurations() now unconditionally uses chromadb.api.rust.RustBindingsAPI, but the runtime patch in persist_generated_data_with_old_version() (lines 187-192) that overrides to SegmentAPI for versions < 0.7.0 only fires when CHROMA_RUST_BINDINGS_TEST_ONLY is set. Without that env var (e.g., local development), old versions like 0.4.1 and 0.5.3 will receive RustBindingsAPI which they don't have, causing test failures.

Options:

  1. Set chroma_api_impl based on the target version in configurations() (e.g., SegmentAPI for versions < 0.7.0).
  2. Remove the CHROMA_RUST_BINDINGS_TEST_ONLY guard from the runtime patch so it always overrides for old versions.
  3. If the intent is that these tests only run with CHROMA_RUST_BINDINGS_TEST_ONLY set (as CI does), document this requirement and/or add an early skip.
Context for Agents
`configurations()` now unconditionally uses `chromadb.api.rust.RustBindingsAPI`, but the runtime patch in `persist_generated_data_with_old_version()` (lines 187-192) that overrides to `SegmentAPI` for versions < 0.7.0 only fires when `CHROMA_RUST_BINDINGS_TEST_ONLY` is set. Without that env var (e.g., local development), old versions like 0.4.1 and 0.5.3 will receive `RustBindingsAPI` which they don't have, causing test failures.

Options:
1. Set `chroma_api_impl` based on the target version in `configurations()` (e.g., `SegmentAPI` for versions < 0.7.0).
2. Remove the `CHROMA_RUST_BINDINGS_TEST_ONLY` guard from the runtime patch so it always overrides for old versions.
3. If the intent is that these tests only run with `CHROMA_RUST_BINDINGS_TEST_ONLY` set (as CI does), document this requirement and/or add an early skip.

File: chromadb/test/property/test_cross_version_persist.py
Line: 133

propel-code-bot[bot]

This comment was marked as outdated.

@blacksmith-sh

This comment has been minimized.

@blacksmith-sh
Copy link
Copy Markdown
Contributor

blacksmith-sh bot commented Mar 24, 2026

Found 14 test failures on Blacksmith runners:

Failures

Test View Logs
test_batch_size_less_than_sync_with_duplicate_adds_results_in_skipped_seq_ids[settings0
]
View Logs
test_collection_was_removed[python_sqlite_persistent] View Logs
test_collection_was_removed[python_sqlite_persistent] View Logs
test_delete_less_than_k[settings0] View Logs
test_log_purge[python_sqlite_persistent] View Logs
test_log_purge_with_multiple_collections[python_sqlite_persistent] View Logs
test_persist[local_persist_api] View Logs
test_persist_index_get_or_create_embedding_function[local_persist_api] View Logs
test_persist_index_loading[local_persist_api] View Logs
test_persist_index_loading_embedding_function[local_persist_api] View Logs
test_persist_index_loading_params[async_integration] View Logs
test_persist_index_loading_params[integration] View Logs
GetAPITest/test_local View Logs
GetAPITest/test_local_db View Logs

Fix in Cursor

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.

Minor maintainability concern noted around an unused test configuration variable.

Status: Minor Suggestions | Risk: Low

Issues Identified & Suggestions
  • Remove or wire unused test config flag to avoid dead logic: chromadb/test/property/test_persist.py
Review Details

📁 7 files reviewed | 💬 1 comments

👍 / 👎 individual comments to help improve reviews for you


configurations = (
[
is_rust_bindings_mode = "CHROMA_RUST_BINDINGS_TEST_ONLY" in os.environ
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.

Recommended

[Maintainability] The new is_rust_bindings_mode variable is never used in this module, which makes the test configuration harder to reason about and can mask dead logic. Remove it or wire it into the configuration selection if it is intended to affect behavior.

Suggested change
is_rust_bindings_mode = "CHROMA_RUST_BINDINGS_TEST_ONLY" in os.environ
Context for Agents
The new `is_rust_bindings_mode` variable is never used in this module, which makes the test configuration harder to reason about and can mask dead logic. Remove it or wire it into the configuration selection if it is intended to affect behavior.

```suggestion

```

File: chromadb/test/property/test_persist.py
Line: 39

@kylediaz kylediaz force-pushed the kylediaz03-23-_chore_drop_support_for_segmentapi branch from fd6bec2 to 343c751 Compare March 26, 2026 21:08
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.

Review found no issues in the proposed changes.

Status: No Issues Found | Risk: Low

Review Details

📁 7 files reviewed | 💬 0 comments

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.

1 participant