Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 57 additions & 2 deletions pkgs/by-name/ve/vectorcode/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Comment on lines 83 to 86

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This test file is still present in the chroma's current main branch: https://github.com/chroma-core/chroma/blob/main/chromadb/test/test_chroma.py

Does that mean the concurrency issue also present on the base package?

Should I copy this to pkgs/development/python-modules/chromadb/default.nix ?

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.

We've never seen the concurrency issue on the base package. It has to do with the way the tests were set up (and was fixed between 0.6.3 and now).

@sarahec sarahec Jun 20, 2025

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.

P.S. Technically, these last two tests could be excluded on Darwin only. Just saw your note about the broken test on x86 linux also. How annoying.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

P.S. Technically, these last two tests could be excluded on Darwin only.

I reproduced the issue on x86_64-linux here: #417811 (comment)

"chromadb/test/test_client.py"
];
});
};
};
Expand Down Expand Up @@ -107,6 +147,10 @@ python.pkgs.buildPythonApplication rec {
];
};

nativeBuildInputs = [
installShellFiles
];

postInstall = ''
$out/bin/vectorcode --print-completion=bash >vectorcode.bash
$out/bin/vectorcode --print-completion=zsh >vectorcode.zsh
Expand All @@ -123,11 +167,16 @@ python.pkgs.buildPythonApplication rec {
};
'';

# Test collection breaks on aarch64-linux, because the transitive onnxruntime
# tries to read /sys/devices/system/cpu, which does not exist in the sandbox.
#
# We inherit the issue from chromadb, so inherit its `doCheck` attribute.
inherit (python.pkgs.chromadb) doCheck;

pythonImportsCheck = [ "vectorcode" ];

nativeCheckInputs =
[
installShellFiles
versionCheckHook
]
++ (with python.pkgs; [
Expand All @@ -145,6 +194,12 @@ python.pkgs.buildPythonApplication rec {
"test_supported_rerankers_initialization"
];

passthru = {
# Expose these overridden inputs for debugging
inherit python;
inherit (python.pkgs) chromadb;
};

meta = {
description = "Code repository indexing tool to supercharge your LLM experience";
homepage = "https://github.com/Davidyz/VectorCode";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/chromadb/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ buildPythonPackage rec {

# Disable on aarch64-linux due to broken onnxruntime
# https://github.com/microsoft/onnxruntime/issues/10038
pythonImportsCheck = lib.optionals (stdenv.hostPlatform.system != "aarch64-linux") [ "chromadb" ];
pythonImportsCheck = lib.optionals doCheck [ "chromadb" ];

# Test collection breaks on aarch64-linux
doCheck = stdenv.hostPlatform.system != "aarch64-linux";
doCheck = with stdenv.buildPlatform; !(isAarch && isLinux);
Comment thread
MattSturgeon marked this conversation as resolved.
Outdated

env = {
ZSTD_SYS_USE_PKG_CONFIG = true;
Expand Down
Loading