Skip to content

Conversation

potter-potter
Copy link
Contributor

@potter-potter potter-potter commented Oct 17, 2025

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.

  • Weaviate Cloud Uploader:
    • Fix precheck() to open the client context (with get_client():) so connection validation actually occurs.
    • Maintain collection existence check and wrap failures in DestinationConnectionError.
  • Tests:
    • Add test_weaviate_precheck_invalid_credentials to assert DestinationConnectionError on bad creds.
    • Update imports and expected exceptions (IngestValueError) in existing tests.
  • Release:
    • Bump __version__ to 1.2.20 and update CHANGELOG.md.

Written by Cursor Bugbot for commit f09c6c9. This will update automatically on new commits. Configure here.

Copy link
Contributor

@Copilot Copilot AI left a 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."""
Copy link

Copilot AI Oct 18, 2025

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.

Suggested change
"""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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants