test: instrument qdrant_setup fixture (log url + collections before/after create)
PR Checks / hadolint (pull_request) Successful in 18s
Docker Build and Push / test (pull_request) Successful in 2m32s
Docker Build and Push / integration-test (pull_request) Failing after 2m26s
Docker Build and Push / build (pull_request) Skipped
PR Checks / pytest (pull_request) Successful in 2m0s
PR Checks / build-test (pull_request) Successful in 2m33s
PR Checks / hadolint (pull_request) Successful in 18s
Docker Build and Push / test (pull_request) Successful in 2m32s
Docker Build and Push / integration-test (pull_request) Failing after 2m26s
Docker Build and Push / build (pull_request) Skipped
PR Checks / pytest (pull_request) Successful in 2m0s
PR Checks / build-test (pull_request) Successful in 2m33s
This commit is contained in:
1 parent
aa30111a8e
commit
a597ecf6a2
1 file changed
+20
@@ -60,6 +60,18 @@ def qdrant_setup():
|
|||||||
model = get_embedding_model()
|
model = get_embedding_model()
|
||||||
collection_name = os.environ["COLLECTION_NAME"]
|
collection_name = os.environ["COLLECTION_NAME"]
|
||||||
|
|
||||||
|
# Debug instrumentalisation — truth about which server we are talking to
|
||||||
|
# and what it holds (CI 404 diagnosis).
|
||||||
|
import logging
|
||||||
|
dbg = logging.getLogger("integration.debug")
|
||||||
|
dbg.warning("qdrant client url: %s", client.rest_uri)
|
||||||
|
server_info = None
|
||||||
|
try:
|
||||||
|
server_info = client.get_collections()
|
||||||
|
dbg.warning("collections BEFORE: %s", [c.name for c in server_info.collections])
|
||||||
|
except Exception as e:
|
||||||
|
dbg.warning("get_collections FAILED: %s", e)
|
||||||
|
|
||||||
# Clean up from previous runs
|
# Clean up from previous runs
|
||||||
try:
|
try:
|
||||||
client.delete_collection(collection_name)
|
client.delete_collection(collection_name)
|
||||||
@@ -74,6 +86,14 @@ def qdrant_setup():
|
|||||||
size=len(probe), distance=models.Distance.COSINE
|
size=len(probe), distance=models.Distance.COSINE
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
# Assert the collection is actually visible right after creation
|
||||||
|
names_after = [c.name for c in client.get_collections().collections]
|
||||||
|
dbg.warning("collections AFTER create: %s", names_after)
|
||||||
|
if collection_name not in names_after:
|
||||||
|
raise RuntimeError(
|
||||||
|
f"Fixture created collection {collection_name} but it is not in "
|
||||||
|
f"get_collections(): {names_after} — pointing at {client.rest_uri}"
|
||||||
|
)
|
||||||
|
|
||||||
# Index test emails
|
# Index test emails
|
||||||
for email in TEST_EMAILS:
|
for email in TEST_EMAILS:
|
||||||
|
|||||||
Reference in new issue
Block a user