Files
wehub-resource-sync 498b235461
Build and test / Build and test AMD64 Ubuntu 22.04 (push) Failing after 0s
Publish Builder / amazonlinux2023 (push) Failing after 1s
Build and test / UT for Go (push) Has been skipped
Publish KRTE Images / KRTE (push) Failing after 1s
Build and test / Integration Test (push) Has been skipped
Build and test / Upload Code Coverage (push) Has been skipped
Publish Builder / rockylinux9 (push) Failing after 1s
Publish Builder / ubuntu22.04 (push) Failing after 0s
Publish Builder / ubuntu24.04 (push) Failing after 0s
Publish Gpu Builder / publish-gpu-builder (push) Failing after 1s
Publish Test Images / PyTest (push) Failing after 0s
Build and test / UT for Cpp (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:31:17 +08:00

36 lines
1.2 KiB
Python

from collections import defaultdict
import json
import argparse
from pymilvus import connections, list_collections
TIMEOUT = 120
def save_all_checker_collections(host="127.0.0.1", prefix="Checker"):
# create connection
connections.connect(host=host, port="19530")
all_collections = list_collections()
if prefix is None:
all_collections = [c_name for c_name in all_collections]
else:
all_collections = [c_name for c_name in all_collections if prefix in c_name]
m = defaultdict(list)
for c_name in all_collections:
prefix = c_name.split("_")[0]
if len(m[prefix]) <= 10:
m[prefix].append(c_name)
selected_collections = []
for v in m.values():
selected_collections.extend(v)
data = {
"all": selected_collections
}
print("selected_collections is")
print(selected_collections)
with open("/tmp/ci_logs/all_collections.json", "w") as f:
f.write(json.dumps(data))
parser = argparse.ArgumentParser(description='host ip')
parser.add_argument('--host', type=str, default='127.0.0.1', help='host ip')
args = parser.parse_args()
save_all_checker_collections(args.host)