This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push: new 0c96b06204 Test connection to Qdrant (#39273) 0c96b06204 is described below commit 0c96b062044a96bcfb83991a4f4fac8e14c0bb57 Author: Anush <anushshett...@gmail.com> AuthorDate: Fri Apr 26 12:21:12 2024 +0530 Test connection to Qdrant (#39273) --- airflow/providers/qdrant/hooks/qdrant.py | 4 ++++ airflow/providers/qdrant/provider.yaml | 2 +- generated/provider_dependencies.json | 2 +- scripts/ci/docker-compose/integration-qdrant.yml | 2 +- tests/integration/providers/qdrant/operators/test_qdrant_ingest.py | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/airflow/providers/qdrant/hooks/qdrant.py b/airflow/providers/qdrant/hooks/qdrant.py index 31aa0b5e1d..0e501b8ac6 100644 --- a/airflow/providers/qdrant/hooks/qdrant.py +++ b/airflow/providers/qdrant/hooks/qdrant.py @@ -126,3 +126,7 @@ class QdrantHook(BaseHook): return True, "Connection established!" except (UnexpectedResponse, RpcError, ValueError) as e: return False, str(e) + + def test_connection(self) -> tuple[bool, str]: + """Test the connection to the Qdrant instance.""" + return self.verify_connection() diff --git a/airflow/providers/qdrant/provider.yaml b/airflow/providers/qdrant/provider.yaml index 7d62ed57e6..7a95d58ae6 100644 --- a/airflow/providers/qdrant/provider.yaml +++ b/airflow/providers/qdrant/provider.yaml @@ -38,7 +38,7 @@ integrations: tags: [software] dependencies: - - qdrant_client>=1.7.0 + - qdrant_client>=1.9.0 - apache-airflow>=2.7.0 hooks: diff --git a/generated/provider_dependencies.json b/generated/provider_dependencies.json index a95bcd312e..d91b488580 100644 --- a/generated/provider_dependencies.json +++ b/generated/provider_dependencies.json @@ -950,7 +950,7 @@ "qdrant": { "deps": [ "apache-airflow>=2.7.0", - "qdrant_client>=1.7.0" + "qdrant_client>=1.9.0" ], "devel-deps": [], "cross-providers-deps": [], diff --git a/scripts/ci/docker-compose/integration-qdrant.yml b/scripts/ci/docker-compose/integration-qdrant.yml index 724c1e92cf..1cafac732d 100644 --- a/scripts/ci/docker-compose/integration-qdrant.yml +++ b/scripts/ci/docker-compose/integration-qdrant.yml @@ -18,7 +18,7 @@ version: "3.8" services: qdrant: - image: qdrant/qdrant:latest + image: qdrant/qdrant:v1.9.0 labels: breeze.description: "Integration required for Qdrant tests." ports: diff --git a/tests/integration/providers/qdrant/operators/test_qdrant_ingest.py b/tests/integration/providers/qdrant/operators/test_qdrant_ingest.py index eed4bd8e78..534622ec90 100644 --- a/tests/integration/providers/qdrant/operators/test_qdrant_ingest.py +++ b/tests/integration/providers/qdrant/operators/test_qdrant_ingest.py @@ -60,7 +60,7 @@ class TestQdrantIngestOperator: hook = operator.hook - hook.conn.recreate_collection( + hook.conn.create_collection( collection_name, vectors_config=VectorParams(size=dimensions, distance=Distance.COSINE) )