Skip to content

[TST] WIP - NOCOMMIT - Testing #4522

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

Closed
wants to merge 16 commits into from
Closed

[TST] WIP - NOCOMMIT - Testing #4522

wants to merge 16 commits into from

Conversation

rescrv
Copy link
Contributor

@rescrv rescrv commented May 12, 2025

Description of changes

I'm adding debug statements to catch a bug.

Test plan

CI is the test plan.

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes

N/A

Copy link

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

Please tag your PR title with one of: [ENH | BUG | DOC | TST | BLD | PERF | TYP | CLN | CHORE]. See https://docs.trychroma.com/contributing#contributing-code-and-ideas

Copy link
Contributor

propel-code-bot bot commented May 12, 2025

Fix Version-based Wait Issues in Distributed Tests

This PR fixes bugs in the wait_for_version_increase mechanism in distributed tests. It resolves a race condition by capturing the initial version before performing operations, then waiting for a version increase compared to that specific version, rather than potentially using an already-increased version as the comparison baseline.

Key Changes:
• Fixed version tracking in test_embeddings.py and test_sanity.py to avoid race conditions
• Enhanced GRPC logging instrumentation to include return values
• Added support for alt_for_tenants routing in GRPC log configuration

Affected Areas:
• chromadb/test/property/test_embeddings.py
• chromadb/test/distributed/test_sanity.py
• rust/log/src/log.rs
• rust/log/src/grpc_log.rs
• CI configuration

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

Copy link

Please tag your PR title with one of: [ENH | BUG | DOC | TST | BLD | PERF | TYP | CLN | CHORE]. See https://docs.trychroma.com/contributing#contributing-code-and-ideas

@@ -115,7 +115,7 @@ impl Log {
}
}

#[tracing::instrument(skip(self), err(Display))]
#[tracing::instrument(skip(self), ret, err(Display))]
Copy link
Contributor

Choose a reason for hiding this comment

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

[BestPractice]

The tracing instrumentation for get_collections_with_new_data is now improved with the addition of ret to include return values in traces, which is helpful for debugging and monitoring. This will make it easier to trace and debug issues with collection data retrieval.

@@ -371,6 +371,7 @@ impl GrpcLog {
._get_collections_with_new_data(false, min_compaction_size)
.await?;
if self.config.use_alt_host_for_everything
|| !self.config.use_alt_for_tenants.is_empty()
Copy link
Contributor

Choose a reason for hiding this comment

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

[BestPractice]

Added support for alternative tenants routing with use_alt_for_tenants in the condition check. This is an important addition for the distributed setup to properly handle tenant routing to alternative hosts.

@rescrv rescrv changed the title WIP - NOCOMMIT - Testing [TST] WIP - NOCOMMIT - Testing May 12, 2025
@rescrv rescrv force-pushed the rescrv/bug-hunt branch from 9ddd522 to 1edb0b7 Compare May 12, 2025 16:53
rescrv added 11 commits May 12, 2025 09:56
It would add and delete items in such a way that it's theoretically
possible to have a version increase before checking the current version.
Waiting for "current", then, actually begs the question and waits for
itself.
@rescrv rescrv closed this May 12, 2025
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