-
Notifications
You must be signed in to change notification settings - Fork 62
Add LangCache integration tests #429
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive integration tests for the LangCache semantic cache functionality and updates the langcache dependency from version 0.9.0 to 0.11.0. The tests verify both synchronous and asynchronous operations against the real LangCache managed service.
- Updates langcache dependency from 0.9.0 to 0.11.0
- Adds 303 lines of integration tests covering store, check, delete operations and error handling
- Configures CI environment variables for LangCache test credentials
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| uv.lock | Updates langcache package from version 0.10.1 to 0.11.0 with new package hashes |
| tests/integration/test_langcache_semantic_cache_integration.py | Adds comprehensive integration tests for LangCache with separate test classes for caches with and without attributes |
| pyproject.toml | Updates langcache optional dependency requirement from >=0.9.0 to >=0.11.0 |
| .github/workflows/test.yml | Adds six environment variables for LangCache test credentials (with/without attributes variants) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
justin-cechmanek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| import pytest | ||
| from dotenv import load_dotenv | ||
| from langcache.errors import BadRequestErrorResponseContent |
Copilot
AI
Nov 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'BadRequestErrorResponseContent' is not used.
| from langcache.errors import BadRequestErrorResponseContent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
tests/integration/test_langcache_semantic_cache_integration.py:21
- Import of 'BadRequestErrorResponseContent' is not used.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| import pytest | ||
| from dotenv import load_dotenv | ||
|
|
Copilot
AI
Nov 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The BadRequestErrorResponseContent import is unused in this test file. The actual error handling in the implementation file (redisvl/extensions/cache/llm/langcache.py) imports this conditionally within exception handlers, and the tests only verify the wrapped RuntimeError exceptions. Consider removing this unused import.
In #429, we found and fixed an issue with LangCache attribute values, which is that some characters are not allowed (commas) and some are accepted but silently fail during retrieval (slashes). Our solution was to encode these characters when we persist them and at query time. This PR decodes the values in retrieved data as well.
This PR adds integration tests for our new integration with LangCache, the managed cache service.