Files
seaweedfs/test/vectors/README.md
T
Chris Lu 4ef123d764 s3vectors: fix shared API behavior and test Go/Rust volume parity (#12216)
* s3vectors: reuse shared authenticated identity context

* s3vectors: encode empty results as arrays

* test: cover S3 Vectors with Go and Rust volume servers

* ci: require both volume implementations in vector integration tests

* s3vectors: keep identityOf as a shim over the shared identity context

Concurrent branches add identityOf call sites; deleting the helper would
break the build when they merge in either order. Route it through
GetIdentityNameFromContext so every caller resolves the same identity.

* test: wait for the vector engine to register before running

The gateway resolves weed-vector lazily through the master cluster list,
so a listening port does not mean the engine is reachable yet; the first
vector write or query could race KeepConnected and fail. Restore the
cluster.ps registration wait the previous harness had, and ignore the
pytest cache directory the suite creates.

* test: wait for master registration across OSS and enterprise

Use the exact engine registration event after AddClusterNode completes. The current enterprise cluster.ps does not list vector nodes, so waiting on its output prevents the shared fixture from starting there.

* s3vectors: keep contextWithIdentity as a shim alongside identityOf

In-flight callers still write the caller name through it; route the
write through SetIdentityNameInContext so both helpers agree on the
shared key whichever lands first.
2026-10-29 13:35:05 -07:00

1.2 KiB

S3 Vectors integration tests

Run python3 -m pip install -r requirements.txt, then make test.

The suite starts a master, volume, filer, authenticated S3/Lance gateway, and vector engine on temporary ports. The same 12 API tests run with both Go and Rust volume servers. Coverage includes bucket/index lifecycle, bucket policies, empty results, ARN addressing, metadata, filters, cosine distance, atomic upserts, pagination, segmented listing, authentication, and writer loss.

Server logs and data stay in pytest's temporary directory for diagnosis. Every child process stops on exit. To select a volume server, set VOLUME_SERVER_IMPL=go or rust.

In an enterprise checkout containing rust/sw-vector-distributed, the build and default matrix also include distributed queries with two search workers. Those queries must still succeed after the writer stops. VECTOR_QUERY_MODE=single or distributed selects one query mode.

To use prebuilt binaries, set WEED_BINARY, VECTOR_BINARY, RUST_VOLUME_SERVER_BINARY, and (for distributed queries) VECTOR_WORKER_BINARY, then run ./run_test.sh. PYTHON selects the Python interpreter. The Makefile accepts CARGO_PROFILE=dev for faster local builds.