feat(vdb): add client_name to Valkey GlideClient configuration#36697
Open
iAbhi001 wants to merge 10 commits into
Open
feat(vdb): add client_name to Valkey GlideClient configuration#36697iAbhi001 wants to merge 10 commits into
iAbhi001 wants to merge 10 commits into
Conversation
Signed-off-by: Daria Korenieva <daric2612@gmail.com>
- Fix S110 lint: replace bare except-pass with logger.debug in __del__ - Fix type-check: use Literal type for VALKEY_DISTANCE_METRIC in config - Fix VDB CI: expose valkey port in CI, read host/port from env vars in tests Signed-off-by: Daria Korenieva <daric2612@gmail.com>
- Add valkey service definition to docker-compose-template.yaml - Change VALKEY_HOST default from localhost to valkey in .env.example - Prevents autofix from removing valkey service on regeneration Signed-off-by: Daria Korenieva <daric2612@gmail.com>
- Fix list type annotation in integration test field_pairs - Add type: ignore for intentional invalid arg in unit test Signed-off-by: Daria Korenieva <daric2612@gmail.com>
Signed-off-by: Daria Korenieva <daric2612@gmail.com>
Contributor
Pyrefly Type Coverage
|
Contributor
Pyrefly Diffbase → PR--- /tmp/pyrefly_base.txt 2026-05-26 21:52:47.936918679 +0000
+++ /tmp/pyrefly_pr.txt 2026-05-26 21:52:40.433862426 +0000
@@ -520,6 +520,8 @@
--> providers/vdb/vdb-upstash/tests/unit_tests/test_upstash_vector.py:33:5
ERROR Object of class `ModuleType` has no attribute `Index` [missing-attribute]
--> providers/vdb/vdb-upstash/tests/unit_tests/test_upstash_vector.py:34:5
+ERROR Could not find name `ValidationError` [unknown-name]
+ --> providers/vdb/vdb-valkey/tests/unit_tests/test_valkey_vector.py:240:28
ERROR Object of class `ModuleType` has no attribute `SimpleConnectionPool` [missing-attribute]
--> providers/vdb/vdb-vastbase/tests/unit_tests/test_vastbase_vector.py:27:5
ERROR Object of class `ModuleType` has no attribute `execute_values` [missing-attribute]
@@ -4701,7 +4703,7 @@
ERROR Argument `list[Document | SimpleNamespace]` is not assignable to parameter `texts` with type `list[Document]` in function `core.rag.datasource.vdb.vector_base.BaseVector._get_uuids` [bad-argument-type]
--> tests/unit_tests/core/rag/datasource/vdb/test_vector_base.py:87:30
ERROR Class member `_Expr.__eq__` overrides parent class `object` in an inconsistent manner [bad-override]
- --> tests/unit_tests/core/rag/datasource/vdb/test_vector_factory.py:249:13
+ --> tests/unit_tests/core/rag/datasource/vdb/test_vector_factory.py:250:13
ERROR Argument `list[str]` is not assignable to parameter `docs` with type `Sequence[Document]` in function `core.rag.docstore.dataset_docstore.DatasetDocumentStore.add_documents` [bad-argument-type]
--> tests/unit_tests/core/rag/docstore/test_dataset_docstore.py:307:37
ERROR Argument `None` is not assignable to parameter `orig` with type `BaseException` in function `sqlalchemy.exc.DBAPIError.__init__` [bad-argument-type]
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #36696
This Pull Request resolves issue #36696 by adding the
client_name="dify_valkey"parameter to theGlideClientConfigurationinside the Valkey vector store backend (valkey_vector.py). Currently, Dify initializes theGlideClientwithout an explicit application identifier, causing its active connections to appear completely anonymous in server tracking metrics. In production environments where multiple microservices share a single Valkey cluster or an AWS ElastiCache deployment, this anonymity prevents DevOps engineers and database administrators from isolating Dify's resource footprint during troubleshooting. Injecting this explicit client name triggers a nativeCLIENT SETNAMEcommand upon connection, allowing the application to be instantly identifiable within standardCLIENT LISTcommands, cloud monitoring dashboards, and infrastructure management tools.