-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(memory): complete FalkorDB to LadybugDB migration in memory system #1834
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
base: develop
Are you sure you want to change the base?
Changes from 1 commit
eb28b04
70c2121
33b30c9
b2e68b3
a8864e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1054,20 +1054,23 @@ def test_get_graphiti_status_with_validation_errors(self, clean_env): | |
| assert "OPENAI_API_KEY" in status["errors"][0] | ||
|
|
||
| def test_get_graphiti_status_invalid_config_sets_reason(self, clean_env): | ||
| """Test get_graphiti_status sets reason when config is invalid. | ||
| """Test get_graphiti_status with validation errors (embedder misconfigured). | ||
|
|
||
| This tests lines 628-629 where the reason is set from validation errors. | ||
| When packages are installed but embedder config has errors, available should | ||
| still be True (embedder is optional - keyword search fallback exists). | ||
| Validation errors are reported in the errors list for informational purposes. | ||
| """ | ||
| os.environ["GRAPHITI_ENABLED"] = "true" | ||
| os.environ["GRAPHITI_EMBEDDER_PROVIDER"] = "voyage" | ||
|
|
||
| status = get_graphiti_status() | ||
|
|
||
| assert status["enabled"] is True | ||
| assert status["available"] is False | ||
| # When config is invalid, reason should be set from errors | ||
| assert status["reason"] != "" | ||
| # With LadybugDB/kuzu installed, available should be True | ||
| assert status["available"] is True | ||
| # Validation errors are informational (embedder is optional) | ||
| assert len(status["errors"]) > 0 | ||
| assert "VOYAGE_API_KEY" in status["errors"][0] | ||
|
Comment on lines
1056
to
1078
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test is fragile as it depends on To make the test more robust and isolate the logic under test (that Please also ensure def test_get_graphiti_status_invalid_config_sets_reason(self, clean_env):
"""Test get_graphiti_status with validation errors (embedder misconfigured).
When packages are installed but embedder config has errors, available should
still be True (embedder is optional - keyword search fallback exists).
Validation errors are reported in the errors list for informational purposes.
"""
os.environ["GRAPHITI_ENABLED"] = "true"
os.environ["GRAPHITI_EMBEDDER_PROVIDER"] = "voyage"
# Mock imports to ensure test is independent of environment
with patch.dict(
"sys.modules",
{"graphiti_core": MagicMock(), "real_ladybug": MagicMock()},
):
status = get_graphiti_status()
assert status["enabled"] is True
# With LadybugDB/kuzu installed, available should be True
assert status["available"] is True
# Validation errors are informational (embedder is optional)
assert len(status["errors"]) > 0
assert "VOYAGE_API_KEY" in status["errors"][0]
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| @pytest.mark.slow | ||
| def test_get_graphiti_status_with_graphiti_installed(self, clean_env): | ||
|
|
@@ -1089,9 +1092,9 @@ def test_get_graphiti_status_with_graphiti_installed(self, clean_env): | |
| assert "reason" in status | ||
| assert "errors" in status | ||
|
|
||
| # Note: Line 641 (status["available"] = True) requires falkordb to be installed. | ||
| # Since falkordb is not installed in the test environment, that line is marked | ||
| # with pragma: no cover. The except clause (lines 642-644) is tested here. | ||
| # Note: Line 641 (status["available"] = True) requires LadybugDB/kuzu to be installed. | ||
| # Since LadybugDB/kuzu may not be installed in all test environments, that line | ||
| # may be marked with pragma: no cover. The except clause is tested here. | ||
|
|
||
| def test_get_available_providers_empty(self, clean_env): | ||
| """Test get_available_providers with no credentials.""" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.