From 3cf4c4b9dd483dfbc72360bd69281dcd4e5a3dfb Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Wed, 18 Jun 2025 11:42:38 +0100 Subject: [PATCH] vectorcode.chromadb: enable check phase Using a subset of disabled tests from the base package, as others only apply to >1.0 --- Additionally, disable test_chroma.py and test_client.py: These tests have issues running in parallel, such as when building the python 3.12 and 3.13 versions simultaneously. E.g. when running nixpkgs-review or unlucky timing in hydra. Usually issues show up as: ValueError: An instance of Chroma already exists for ephemeral with different settings --- pkgs/by-name/ve/vectorcode/package.nix | 42 +++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/ve/vectorcode/package.nix b/pkgs/by-name/ve/vectorcode/package.nix index 7ada551b10b0..a54aac009134 100644 --- a/pkgs/by-name/ve/vectorcode/package.nix +++ b/pkgs/by-name/ve/vectorcode/package.nix @@ -45,7 +45,47 @@ let dependencies = old.dependencies ++ [ self.chroma-hnswlib ]; - doCheck = false; + + # The base package disables additional tests, so explicitly override + disabledTests = [ + # Tests are flaky / timing sensitive + "test_fastapi_server_token_authn_allows_when_it_should_allow" + "test_fastapi_server_token_authn_rejects_when_it_should_reject" + + # Issue with event loop + "test_http_client_bw_compatibility" + + # httpx ReadError + "test_not_existing_collection_delete" + ]; + + disabledTestPaths = [ + # Tests require network access + "chromadb/test/auth/test_simple_rbac_authz.py" + "chromadb/test/db/test_system.py" + "chromadb/test/ef/test_default_ef.py" + "chromadb/test/property/" + "chromadb/test/property/test_cross_version_persist.py" + "chromadb/test/stress/" + "chromadb/test/test_api.py" + + # httpx failures + "chromadb/test/api/test_delete_database.py" + + # Cannot be loaded by pytest without path hacks (fixed in 1.0.0) + "chromadb/test/test_logservice.py" + "chromadb/test/proto/test_utils.py" + "chromadb/test/segment/distributed/test_protobuf_translation.py" + + # Hypothesis FailedHealthCheck due to nested @given tests + "chromadb/test/cache/test_cache.py" + + # Tests fail when running in parallel. + # E.g. when building the building python 3.12 and 3.13 versions simultaneously. + # ValueError: An instance of Chroma already exists for ephemeral with different settings + "chromadb/test/test_chroma.py" + "chromadb/test/test_client.py" + ]; }); }; };