mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-27 23:40:41 +01:00
* test/vectors: give the vector server static storage credentials The e2e harness ran weed-vector-server without credentials, so lance's AWS object store fell back to IMDS and CreateIndex died on the runner's 411 from the token endpoint. Point it at the test credentials the s3 gateway now reads from s3.json. * vector: take the list item field from the schema when batching vectors Lance stores the fixed-size list item as nullable even when the write schema declared it non-null, so PutVectors built batches that no longer matched: expected FixedSizeList(4 x Float32) but found FixedSizeList(4 x non-null Float32). * vector: store index metadata as lance jsonb so filters resolve The metadata field was plain Utf8, but the filter functions lance's planner registers (json_get_string, json_get_float, json_exists) take a LargeBinary jsonb column, so QueryVectors with a metadata filter failed to plan. Declare the field with the arrow.json extension — lance encodes it to jsonb on write and back on read — and encode the batch's strings when the stored column is LargeBinary. Also rename the filter's json_get_str call to json_get_string, the name lance registers. --------- Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
53 lines
1.3 KiB
Bash
Executable File
53 lines
1.3 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 \
|
|
-config s3.json \
|
|
-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 \
|
|
--storage-option aws_access_key_id=test \
|
|
--storage-option aws_secret_access_key=test \
|
|
--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
|