mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-10 22:08:48 +01:00
* vector: expose request metrics and registration-aware health endpoints * vector: report immutable read cache and storage fetch metrics * docs: describe vector engine health, metrics, and maintenance * vector: count canceled requests when their handler is dropped * vector: account for uncached large immutable storage reads * vector: reliably release the stalled credential reader in tests * vector: observe large reads as their streamed body is consumed * vector: bound heartbeats on established master registration streams * test: exercise hardened vector maintenance on Go and Rust volumes * vector: register engines in their configured filer group * vector: make retried index creation preserve compatible datasets * vector: allow registration to advertise a separate address * test: release stalled credential readers without blocking FIFO cleanup * test: allow hardened vector coverage in a named filer group * vector: discover engines in the same filer group as their gateway * vector: fall back when the advertised address is empty * admin: expose vector readiness, maintenance, and management tools (#12520) * s3vectors: share vector discovery with trusted management clients * admin: show vector engine readiness and recent maintenance activity * admin: suggest S3 Vectors IAM actions from the supported operations * admin: manage vector indexes, policies, tags, encryption, and query data * admin: validate SSE-S3 support before creating encrypted vector buckets * admin: discover vector engines in their registration group * admin: probe vector engines concurrently with independent time budgets * admin: verify encryption capability on the remote S3 gateway * admin: defer discovery until after the HTTP server can start * admin: distinguish unknown vector health services from failed engines * admin: count workers that can execute vector index maintenance * admin: allow read-only users to query vectors and inspect tags * vector: scope gateway and admin discovery to the configured filer group * admin: refresh policy state after mutations and serialize policy controls * vector: drain active RPCs before closing replaced discovery connections * vector: respect request cancellation while waiting for discovery * vector: prefer another registered engine after a transport failure * admin: check all masters before reporting no registered vector engines * iam: honor attached vector policies without broadening legacy grants * vector: allow short-lived discovery clients to close their connections * vector: refresh cached master addresses for each discovery lookup * iam: enforce vector bucket tag conditions in attached policies * iam: authorize vector bucket creation with the requested tags * test: exercise vector IAM grants and tag denies on Go and Rust volumes * admin: reject authenticated vector mutations without an admin role * test: run vector IAM assertions before the shared engine is stopped * vector: add native mini startup, shell tools, and a runnable Compose example (#12522) * s3vectors: share vector discovery with trusted management clients * admin: show vector engine readiness and recent maintenance activity * admin: suggest S3 Vectors IAM actions from the supported operations * admin: manage vector indexes, policies, tags, encryption, and query data * admin: validate SSE-S3 support before creating encrypted vector buckets * admin: discover vector engines in their registration group * admin: probe vector engines concurrently with independent time budgets * admin: verify encryption capability on the remote S3 gateway * admin: defer discovery until after the HTTP server can start * admin: distinguish unknown vector health services from failed engines * admin: count workers that can execute vector index maintenance * admin: allow read-only users to query vectors and inspect tags * vector: scope gateway and admin discovery to the configured filer group * admin: refresh policy state after mutations and serialize policy controls * vector: drain active RPCs before closing replaced discovery connections * vector: respect request cancellation while waiting for discovery * vector: prefer another registered engine after a transport failure * admin: check all masters before reporting no registered vector engines * iam: honor attached vector policies without broadening legacy grants * vector: allow short-lived discovery clients to close their connections * vector: refresh cached master addresses for each discovery lookup * iam: enforce vector bucket tag conditions in attached policies * iam: authorize vector bucket creation with the requested tags * test: exercise vector IAM grants and tag denies on Go and Rust volumes * admin: reject authenticated vector mutations without an admin role * test: run vector IAM assertions before the shared engine is stopped * mini: optionally start and supervise the vector engine * mini: bootstrap vector buckets with existing Lance catalog helpers * shell: manage vector buckets, indexes, and vector data * docs: provide a runnable vector and maintenance worker Compose stack * shell: scope vector discovery to the session and close its connections * mini: honor the bind address for vector and metrics listeners * mini: reserve vector ports before assigning gRPC and compatibility listeners * mini: wait for vector storage setup and master registration * mini: create requested vector buckets without requiring the Lance HTTP listener * shell: refresh master addresses during vector discovery * mini: resolve sibling vector executables with platform extensions * vector: preserve uncertain creates and fix mini listener allocation (#12525) * vector: retain catalog records when index creation has an unknown outcome * mini: keep chosen listener ports reserved throughout allocation * mini: resolve hostname binds before starting vector listeners * vector: fix integration test imports and recover interrupted index creation (#12533) * shell: register vector operations from the command package * s3vectors: resume interrupted index initialization safely * mini: exclude disabled WebDAV from listener allocation * s3vectors: retain uncertain creates across refused retries * s3vectors: claim pending indexes before retrying initialization * s3vectors: compare resolved distance metrics during recovery * s3vectors: preserve metadata keys when retrying initialization * s3vectors: verify ownership before initializing new catalog records
182 lines
7.3 KiB
YAML
182 lines
7.3 KiB
YAML
name: "Rust Vector Tests"
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ master ]
|
|
paths:
|
|
- 'seaweed-vector/**'
|
|
- 'seaweed-volume/**'
|
|
- 'seaweed-worker/**'
|
|
- 'seaweed-common/**'
|
|
- 'weed/pb/plugin.proto'
|
|
- 'weed/pb/vector.proto'
|
|
- 'weed/pb/vector_pb/**'
|
|
- 'weed/s3api/**'
|
|
- 'weed/command/**'
|
|
- 'test/s3vectors/**'
|
|
- '.github/workflows/rust-vector-tests.yml'
|
|
push:
|
|
branches: [ master, main ]
|
|
paths:
|
|
- 'seaweed-vector/**'
|
|
- 'seaweed-volume/**'
|
|
- 'seaweed-worker/**'
|
|
- 'seaweed-common/**'
|
|
- 'weed/pb/plugin.proto'
|
|
- 'weed/pb/vector.proto'
|
|
- 'weed/pb/vector_pb/**'
|
|
- 'weed/s3api/**'
|
|
- 'weed/command/**'
|
|
- 'test/s3vectors/**'
|
|
- '.github/workflows/rust-vector-tests.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || (github.event_name == 'push' && github.ref) || github.run_id }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/')) }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
rust-vector-build:
|
|
name: Rust Vector Build and Unit Tests
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 45
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Fingerprint build toolchain
|
|
id: toolchain
|
|
run: echo "fingerprint=$(getconf GNU_LIBC_VERSION | tr ' ' '-')-rustc-$(rustc -V | awk '{print $2}')" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Cache cargo registry and target
|
|
if: runner.environment == 'github-hosted'
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
seaweed-vector/target/release
|
|
key: rust-vector-${{ steps.toolchain.outputs.fingerprint }}-${{ hashFiles('seaweed-vector/Cargo.lock') }}
|
|
restore-keys: |
|
|
rust-vector-${{ steps.toolchain.outputs.fingerprint }}-
|
|
|
|
- name: Build the vector crates
|
|
run: cd seaweed-vector && cargo build --release
|
|
|
|
- name: Run unit tests
|
|
run: cd seaweed-vector && cargo test --release --workspace
|
|
|
|
|
|
vectors-e2e:
|
|
name: S3 Vectors Integration (${{ matrix.volume }} volume${{ matrix.hardened && ', hardened' || '' }}${{ matrix.worker && ', worker' || '' }})
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 45
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
volume: [go, rust]
|
|
# Hardened: volume servers behind mutual TLS, every gRPC hop (master,
|
|
# volume, filer, gateway, engine) under mutual TLS, read JWTs
|
|
# required, and every chunk encrypted by the gateway.
|
|
hardened: ["", "1"]
|
|
worker: ["", "1"]
|
|
# Worker: the admin server and the Lance maintenance worker join the
|
|
# cluster, for the tests that build vector indexes through a job.
|
|
|
|
env:
|
|
CARGO_PROFILE_DEV_DEBUG: "0"
|
|
CARGO_BUILD_JOBS: "2"
|
|
CARGO_TARGET_DIR: ${{ github.workspace }}/seaweed-vector/target
|
|
VOLUME_SERVER_IMPL: ${{ matrix.volume }}
|
|
VECTOR_QUERY_MODE: single
|
|
VECTOR_FILER_GROUP: vectors-ci
|
|
VECTOR_TLS: ${{ matrix.hardened }}
|
|
VECTOR_READ_JWT: ${{ matrix.hardened }}
|
|
VECTOR_ENCRYPT_VOLUMES: ${{ matrix.hardened }}
|
|
VECTOR_WORKER: ${{ matrix.worker }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
- uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: ${{ runner.environment == 'github-hosted' }}
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- name: Fingerprint build toolchain
|
|
id: toolchain
|
|
run: echo "fingerprint=$(getconf GNU_LIBC_VERSION | tr ' ' '-')-rustc-$(rustc -V | awk '{print $2}')" >> "$GITHUB_OUTPUT"
|
|
- name: Cache cargo registry and target
|
|
if: runner.environment == 'github-hosted'
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
seaweed-vector/target/debug
|
|
key: vectors-e2e-${{ runner.os }}-${{ runner.arch }}-${{ steps.toolchain.outputs.fingerprint }}-${{ hashFiles('seaweed-vector/Cargo.lock', 'seaweed-volume/Cargo.lock') }}
|
|
restore-keys: |
|
|
vectors-e2e-${{ runner.os }}-${{ runner.arch }}-${{ steps.toolchain.outputs.fingerprint }}-
|
|
- name: Test Go vector gateway
|
|
run: |
|
|
go test ./weed/s3api/s3vectors -count=1
|
|
go test ./weed/command -run 'Vector|Vectors' -count=1
|
|
# The worker workspace has no protoc of its own for lance's build
|
|
# scripts; use the vendored one its lock names, as its own workflow does.
|
|
- name: Use the vendored protoc for the worker
|
|
if: matrix.worker == '1'
|
|
run: |
|
|
cd seaweed-worker
|
|
cargo fetch --locked
|
|
version=$(awk '/^name = "protoc-bin-vendored-linux-x86_64"$/{found=1; next} found && /^version = /{gsub(/"/,"",$3); print $3; exit}' Cargo.lock)
|
|
test -n "$version" || { echo "protoc-bin-vendored-linux-x86_64 is not in Cargo.lock" >&2; exit 1; }
|
|
protoc=$(find ~/.cargo/registry/src -path "*protoc-bin-vendored-linux-x86_64-$version/bin/protoc" | head -1)
|
|
test -x "$protoc" || { echo "no vendored protoc $version in the registry" >&2; exit 1; }
|
|
echo "PROTOC=$protoc" >> "$GITHUB_ENV"
|
|
- name: Build integration binaries
|
|
working-directory: test/s3vectors
|
|
# dev profile: correctness suite, no release codegen needed. weed-volume
|
|
# (the heaviest crate) only builds on the rust leg.
|
|
run: |
|
|
set -e
|
|
make ./weed ./weed-vector CARGO_PROFILE=dev
|
|
if [ "${{ matrix.volume }}" = "rust" ]; then make ./weed-volume CARGO_PROFILE=dev; fi
|
|
if [ "${{ matrix.worker }}" = "1" ]; then make ./weed-vector-cli ./weed-worker CARGO_PROFILE=dev; fi
|
|
- uses: actions/setup-python@v7
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Install test dependencies
|
|
run: python -m pip install -r test/s3vectors/requirements.txt
|
|
- name: Run the S3 Vectors integration matrix
|
|
working-directory: test/s3vectors
|
|
run: |
|
|
./run_test.sh --basetemp="$RUNNER_TEMP/vector-tests" --junitxml="$RUNNER_TEMP/vector-results.xml"
|
|
python - <<'PYTHON'
|
|
import os
|
|
from pathlib import Path
|
|
import xml.etree.ElementTree as ET
|
|
cases = ET.parse(Path(os.environ["RUNNER_TEMP"]) / "vector-results.xml").findall(".//testcase")
|
|
assert len(cases) >= 17, f"expected at least 17 cases, got {len(cases)}"
|
|
assert not any(case.find("skipped") is not None for case in cases), "integration cases were skipped"
|
|
volume = os.environ["VOLUME_SERVER_IMPL"]
|
|
assert all(case.get("name", "").endswith(f"[{volume}-single]") for case in cases), volume
|
|
PYTHON
|
|
- name: Upload integration diagnostics
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: vectors-e2e-diagnostics-${{ matrix.volume }}${{ matrix.hardened && '-hardened' || '' }}${{ matrix.worker && '-worker' || '' }}
|
|
path: |
|
|
${{ runner.temp }}/vector-tests
|
|
${{ runner.temp }}/vector-results.xml
|
|
if-no-files-found: ignore
|
|
retention-days: 7
|