mirror of
https://github.com/milvus-io/milvus.git
synced 2026-10-12 02:19:10 +00:00
## Summary - Add the positive Scalar Index CMEK matrix for engines 2, 3, and 5 across V2/V3 artifact formats. - Cover 17 cells with repository-owned Go/C++ CipherPlugin fixtures, authoritative object locators, independent V2/V3 envelope inspectors, release/load checks, and type-specific query oracles. - Verify database EZ ID inheritance and configured root-key material propagation: the strict fixtures now fail when an EZ key was not delivered, and the C++ fixture derives encryption keys from the exact forwarded root key. - Keep vector-index setup in every collection with an explicit FLAT/L2 index. - Keep `integration-test` as the aggregate CI gate: it depends on the existing non-CMEK scope and the dedicated CMEK scope, while only the CMEK target builds its fixture plugins. - Group the campaign tests by suite in the V2, V3, and FMINDEX suite files. ## Review follow-up - Complete the ASF license headers in all new source and CMake files. - Remove the unused text-log inspector wrapper. - Link the independent V3 inspector to the format design and production reader/writer sources to make drift reviewable without coupling the oracle to production decoding. - Keep large V2 EZ ID parsing local to the inspector with json.Number; this PR does not modify production descriptor decoding. - Split the default integration gate into `integration-test-base` and `integration-test-cmek`, exclude only the top-level CMEK package from the base run, and append CMEK coverage to the same `it_coverage.txt` only when invoked through the aggregate target. ## Verification - Controlled full Milvus build — passed after merging current master. - `make integration-test-cmek` — 23 tests passed in 3m02s. - CMEK fixture build regression — passed. - Target graph dry-run — the aggregate runs base before CMEK with append enabled, while standalone CMEK resets the single coverage file. - Strict Go fixture unit test — passed after reproducing the fallback gap. - Scoped V2/V3 inspector tests — passed. - `make fmt` — passed. - Controlled static-check — 0 issues in core, pkg, client, and go_client. - All commits are signed off. issue: #52815 --------- Signed-off-by: yangxuan <[email protected]>
80 lines
2.5 KiB
Bash
Executable File
80 lines
2.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Licensed to the LF AI & Data foundation under one
|
|
# or more contributor license agreements. See the NOTICE file
|
|
# distributed with this work for additional information
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
# to you under the Apache License, Version 2.0 (the
|
|
# "License"); you may not use this file except in compliance
|
|
# with the License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
set -euo pipefail
|
|
|
|
test_root=$(mktemp -d)
|
|
trap 'rm -rf "$test_root"' EXIT
|
|
|
|
repo_root="$test_root/repo"
|
|
caller_dir="$test_root/caller"
|
|
fake_bin="$test_root/bin"
|
|
mkdir -p "$repo_root/scripts" "$caller_dir" "$fake_bin"
|
|
cp "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/build_cmek_fixtures.sh" "$repo_root/scripts/"
|
|
|
|
printf '%s\n' \
|
|
'#!/usr/bin/env bash' \
|
|
'set -euo pipefail' \
|
|
'while (( $# > 0 )); do' \
|
|
' if [[ $1 == -o ]]; then' \
|
|
' printf x > "$2"' \
|
|
' exit 0' \
|
|
' fi' \
|
|
' shift' \
|
|
'done' \
|
|
'exit 1' > "$fake_bin/go"
|
|
chmod +x "$fake_bin/go"
|
|
|
|
printf '%s\n' \
|
|
'#!/usr/bin/env bash' \
|
|
'set -euo pipefail' \
|
|
'build_dir=' \
|
|
'output_dir=' \
|
|
'while (( $# > 0 )); do' \
|
|
' case $1 in' \
|
|
' -B)' \
|
|
' build_dir=$2' \
|
|
' shift 2' \
|
|
' ;;' \
|
|
' -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=*)' \
|
|
' output_dir=${1#*=}' \
|
|
' shift' \
|
|
' ;;' \
|
|
' *)' \
|
|
' shift' \
|
|
' ;;' \
|
|
' esac' \
|
|
'done' \
|
|
'if [[ -n $build_dir ]]; then' \
|
|
' mkdir -p "$build_dir" "$output_dir"' \
|
|
' printf x > "$output_dir/libCipherPlugin.so"' \
|
|
' printf "#!/usr/bin/env bash\nexit 0\n" > "$build_dir/CipherPluginTest"' \
|
|
' chmod +x "$build_dir/CipherPluginTest"' \
|
|
'fi' > "$fake_bin/cmake"
|
|
chmod +x "$fake_bin/cmake"
|
|
|
|
(
|
|
cd "$caller_dir"
|
|
GO="$fake_bin/go" PATH="$fake_bin:$PATH" bash "$repo_root/scripts/build_cmek_fixtures.sh" fixtures
|
|
)
|
|
|
|
for artifact in libGoCipherPlugin.so libGoCipherPluginRace.so libCipherPlugin.so; do
|
|
test -f "$caller_dir/fixtures/$artifact"
|
|
done
|
|
test ! -e "$repo_root/fixtures"
|