-
Notifications
You must be signed in to change notification settings - Fork 52
[ENG-677] weaviate precheck fix #604
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
Fixes Weaviate cloud precheck to actually establish and close a client connection instead of constructing and discarding a generator, and adds an integration test to verify failure on invalid connection configuration.
- Use get_client() as a context manager in precheck to validate connectivity.
- Add an integration test that expects DestinationConnectionError on invalid Weaviate config.
- Bump version to 1.2.20 and update CHANGELOG.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
unstructured_ingest/processes/connectors/weaviate/weaviate.py | Use get_client() within a context manager in precheck to ensure a real connection attempt and proper cleanup. |
test/integration/connectors/weaviate/test_cloud.py | Add integration test for precheck failure on invalid configuration; update imports. |
unstructured_ingest/version.py | Bump version to 1.2.20. |
CHANGELOG.md | Document the precheck fix in 1.2.20. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
||
@pytest.mark.tags(CONNECTOR_TYPE, DESTINATION_TAG, VECTOR_DB_TAG) | ||
def test_weaviate_precheck_invalid_credentials(): | ||
"""Test that precheck properly validates connection with invalid credentials.""" |
Copilot
AI
Oct 18, 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 docstring states 'invalid credentials', but the test includes an invalid cluster_url as well. Update the docstring to reflect the scenario (e.g., 'invalid configuration or unreachable cluster') or modify the test to isolate invalid-credential behavior.
"""Test that precheck properly validates connection with invalid credentials.""" | |
"""Test that precheck properly validates connection failures due to invalid configuration or unreachable cluster.""" |
Copilot uses AI. Check for mistakes.
in the weaviate cloud precheck we were creating a generator object and discarding it. So everything was passing.
Note
Fixes Weaviate cloud precheck to actually validate the connection (opens client context) and adds tests to ensure invalid credentials fail; bumps version to 1.2.20.
precheck()
to open the client context (with get_client():
) so connection validation actually occurs.DestinationConnectionError
.test_weaviate_precheck_invalid_credentials
to assertDestinationConnectionError
on bad creds.IngestValueError
) in existing tests.__version__
to1.2.20
and updateCHANGELOG.md
.Written by Cursor Bugbot for commit f09c6c9. This will update automatically on new commits. Configure here.