mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-27 15:30:45 +01:00
* vector: boto3 s3vectors conformance harness test/vectors spins a mini cluster, an s3 gateway with -port.vectors and -vectors.grpc, and a weed-vector-server, then exercises the AWS client end to end: bucket and index lifecycle, put/get/list/delete vectors, and a filtered query asserting distances and metadata. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * ci: run the s3vectors conformance subset An e2e job in rust-vector-tests: builds weed and weed-vector-server, then runs test/vectors against a mini cluster plus the vectors gateway. The workflow now also watches vector.proto, its stubs, and test/vectors. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * ci: fix e2e protoc and codespell findings The e2e job needed the same vendored-protoc step as the unit-test job — lance's build scripts locate protoc themselves. Codespell flags the AWS `$nin` operator literal and the `lits` variable: exempt `nin` in .codespellrc like the existing word exemptions, rename the variable, and fold the negation into the IN/NOT IN symbol directly. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> * s3: classify catalog errors by code, not message text * s3: drop the implicit vector namespace on vector-bucket delete * test: point the vector engine at the gateway lance port * test: bind the vectors gateway listeners to loopback * test: make the filter and distance assertions load-bearing * test: rebuild the harness binaries on every run * ci: fix the vectors end-to-end job * ci: run the vector tests on gateway and command changes --------- Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
50 lines
1.2 KiB
Bash
Executable File
50 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Spin a mini cluster plus the vectors gateway and engine, run the boto3
|
|
# conformance subset, tear everything down.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
DATA=mini-data
|
|
rm -rf "$DATA"
|
|
PIDS=()
|
|
cleanup() {
|
|
kill "${PIDS[@]}" 2>/dev/null || true
|
|
rm -rf "$DATA"
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
./weed mini -dir "$DATA" \
|
|
-s3=false -webdav=false -admin.ui=false &
|
|
PIDS+=($!)
|
|
|
|
./weed s3 \
|
|
-filer 127.0.0.1:8888 \
|
|
-ip 127.0.0.1 \
|
|
-ip.bind 127.0.0.1 \
|
|
-port 8334 \
|
|
-port.lance 9102 \
|
|
-port.vectors 9201 \
|
|
-vectors.grpc 127.0.0.1:9301 &
|
|
PIDS+=($!)
|
|
|
|
./weed-vector-server \
|
|
--namespace http://127.0.0.1:9102 \
|
|
--listen 127.0.0.1:9301 &
|
|
PIDS+=($!)
|
|
|
|
# Any HTTP response (even an auth rejection) means the lance catalog is up.
|
|
for _ in $(seq 1 60); do
|
|
code=$(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:9102/v1/namespace/root/list || true)
|
|
[ "$code" != "000" ] && break
|
|
sleep 1
|
|
done
|
|
[ "${code:-000}" != "000" ] || { echo "lance catalog on :9102 never came up" >&2; exit 1; }
|
|
|
|
for _ in $(seq 1 60); do
|
|
(exec 3<>/dev/tcp/127.0.0.1/9301) 2>/dev/null && break
|
|
sleep 1
|
|
done
|
|
(exec 3<>/dev/tcp/127.0.0.1/9301) 2>/dev/null || { echo "vector server on :9301 never came up" >&2; exit 1; }
|
|
|
|
python3 -m pytest -xvs s3vectors_test.py
|