pull/20945/head
Bowen Liang 11 months ago
parent b4973cf3b2
commit 93b0151b47

@ -34,7 +34,6 @@ jobs:
- name: Free Disk Space
uses: endersonmenezes/free-disk-space@v2
with:
remove_android: true
remove_dotnet: true
- name: Setup UV and Python
@ -65,7 +64,7 @@ jobs:
tidb
tiflash
- name: Set up Vector Stores (Weaviate, Qdrant, PGVector, Milvus, PgVecto-RS, Chroma, MyScale, ElasticSearch, Couchbase)
- name: Set up Vector Stores (Weaviate, Qdrant, PGVector, Milvus, PgVecto-RS, Chroma, MyScale, ElasticSearch, Couchbase, OceanBase)
uses: hoverkraft-tech/compose-action@v2.0.2
with:
compose-file: |
@ -82,7 +81,7 @@ jobs:
elasticsearch
oceanbase
- name: Check TiDB, Oceanbase Ready
- name: Check VDB Ready (TiDB, Oceanbase)
run: |
uv run --project api python api/tests/integration_tests/vdb/tidb_vector/check_tiflash_ready.py
uv run --project api python api/tests/integration_tests/vdb/oceanbase/check_oceanbase_ready.py

@ -1,4 +1,3 @@
import logging
import time
import pymysql
@ -11,29 +10,10 @@ def check_ocean_ready() -> bool:
port=2881,
user="root",
password="difyai123456",
connect_timeout=15,
read_timeout=20,
autocommit=True,
)
connection.ping(reconnect=True)
a = connection.query("select 1")
print(f"Oceanbase query result: {a}")
if a == 1:
return True
else:
return False
# with connection.cursor() as cursor:
# # SELECT 1;
# # """
# # cursor.execute(select_query)
# # result = cursor.fetchall()
# # return result is not None and len(result) > 0
# cursor.execute("SELECT 1")
# return cursor.fetchone() is not None
affected_rows = connection.query("SELECT 1")
return affected_rows == 1
except Exception as e:
logging.exception("Error checking OceanBase readiness")
print(f"Oceanbase is not ready. Exception: {e}")
return False
finally:

Loading…
Cancel
Save