chore: import upstream snapshot with attribution
Build and test / Build and test AMD64 Ubuntu 22.04 (push) Failing after 0s
Publish Builder / amazonlinux2023 (push) Failing after 1s
Build and test / UT for Cpp (push) Waiting to run
Build and test / UT for Go (push) Has been skipped
Publish KRTE Images / KRTE (push) Failing after 1s
Build and test / Integration Test (push) Has been skipped
Build and test / Upload Code Coverage (push) Has been skipped
Publish Builder / rockylinux9 (push) Failing after 1s
Publish Builder / ubuntu22.04 (push) Failing after 0s
Publish Builder / ubuntu24.04 (push) Failing after 0s
Publish Gpu Builder / publish-gpu-builder (push) Failing after 1s
Publish Test Images / PyTest (push) Failing after 0s

This commit is contained in:
wehub-resource-sync
2026-07-13 12:31:17 +08:00
commit 498b235461
5446 changed files with 2748612 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
# Licensed to the Apache Software Foundation (ASF) 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.
---
# Below is copied from milvus project
BasedOnStyle: Google
DerivePointerAlignment: false
ColumnLimit: 80
IndentWidth: 4
AccessModifierOffset: -3
AlwaysBreakAfterReturnType: All
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AlignTrailingComments: true
# Appended Options
SortIncludes: false
Standard: Latest
AlignAfterOpenBracket: Align
BinPackParameters: false
BinPackArguments: false
ReflowComments: false
+44
View File
@@ -0,0 +1,44 @@
# Licensed to the Apache Software Foundation (ASF) 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.
# The checks defined here will be run and will display by default as warnings.
Checks: >
-*, clang-diagnostic-*, -clang-diagnostic-error,
clang-analyzer-*,
google-*, -google-runtime-references, -google-readability-todo,
modernize-*, -modernize-use-trailing-return-type, -modernize-use-nodiscard,
performance-*,
bugprone-bool-pointer-implicit-conversion,
bugprone-branch-clone,
bugprone-dangling-handle,
bugprone-exception-escape,
bugprone-inaccurate-erase,
# produce HeaderFilterRegex from core/build-support/lint_exclusions.txt with:
# echo -n '^?!('; sed -e 's/*/\.*/g' core/build-support/lint_exclusions.txt | tr '\n' '|'; echo ')$'
HeaderFilterRegex: '^?!(.*cmake-build-debug.*|.*cmake-build-release.*|.*cmake_build.*|.*thirdparty.*|.*src/grpc.*|.*output.*|.*unittest.*|.*src/pb.*)$'
AnalyzeTemporaryDtors: true
CheckOptions:
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: google-readability-function-size.StatementThreshold
value: '200'
- key: google-readability-namespace-comments.ShortNamespaceLines
value: '10'
- key: google-readability-namespace-comments.SpacesBeforeComments
value: '2'
+17
View File
@@ -0,0 +1,17 @@
# Licensed to the Apache Software Foundation (ASF) 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.
#
+8
View File
@@ -0,0 +1,8 @@
[
{
"avatar_url": "https://avatars.githubusercontent.com/u/219938?v=4",
"html_url": "https://github.com/sworddish",
"login": "sworddish"
}
]
+12
View File
@@ -0,0 +1,12 @@
{
"name": "Milvus Distributed Dev Container Definition",
"dockerComposeFile": ["./docker-compose-devcontainer.yml"],
"service": "builder",
"initializeCommand": "scripts/devcontainer.sh",
"workspaceFolder": "/go/src/github.com/milvus-io/milvus",
"remoteEnv": { "GOPROXY": "https://goproxy.cn" },
"extensions": [
"ms-vscode.cpptools",
"golang.go"
]
}
+3
View File
@@ -0,0 +1,3 @@
cmake_build
.git
.docker
+19
View File
@@ -0,0 +1,19 @@
# to define environment variables available to docker-compose.yml
IMAGE_REPO=milvusdb
IMAGE_ARCH=amd64
OS_NAME=ubuntu22.04
# for services.builder.image in docker-compose.yml
DATE_VERSION=20260610-5cdf891
LATEST_DATE_VERSION=20260610-5cdf891
# for services.gpubuilder.image in docker-compose.yml
GPU_DATE_VERSION=20260610-5cdf891
LATEST_GPU_DATE_VERSION=20260610-5cdf891
# for other services in docker-compose.yml
MINIO_ADDRESS=minio:9000
PULSAR_ADDRESS=pulsar://pulsar:6650
ETCD_ENDPOINTS=etcd:2379
AZURITE_CONNECTION_STRING="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite:10000/devstoreaccount1;"
ENABLE_GCP_NATIVE=ON
+11
View File
@@ -0,0 +1,11 @@
header:
license:
spdx-id: Apache-2.0
copyright-owner: LF AI & Data foundation
paths:
- 'internal/**/*.go'
dependency:
files:
- go.mod
@@ -0,0 +1,95 @@
---
name: "\U0001F916 Agentic Bug Report"
about: Structured bug report optimized for AI Agent to analyze, reproduce, and fix autonomously
title: "[Bug]: "
labels: kind/bug, needs-triage
assignees: yanliang567
---
## Environment
- **Milvus Version**: <!-- image tag (e.g. master-20260204-e12a5b0b-amd64) or commit hash -->
- **Deployment Mode**: <!-- standalone | cluster -->
- **MQ**: <!-- rocksmq | pulsar | kafka -->
- **SDK**: <!-- e.g. pymilvus v2.6.0 / go-sdk v2.6.0 -->
- **OS**: <!-- e.g. Ubuntu 22.04 -->
## Reproduction
<!-- Provide ONE of the following: -->
### Option A: Script (preferred for functional bugs)
<!--
Complete, runnable script that reproduces the bug.
Requirements:
- Must be self-contained (include collection creation, data insertion, index building, loading, etc.)
- Must use a unique collection name to avoid conflicts
- Connection defaults: host="localhost", port="19530"
- End with an assertion or clear print that shows the bug
-->
```python
```
### Option B: Steps (for systemic / stability / timing issues)
<!--
Structured steps with specific parameters.
Be precise: not "insert some data", but "10k rows/sec for 30 minutes".
-->
1. Deploy: <!-- deployment topology, e.g. 3 QueryNodes, 2 DataNodes -->
2. Setup: <!-- collection schema, index params, load params -->
3. Workload: <!-- exact operations, rate, duration -->
4. Trigger: <!-- what operation or condition triggers the bug -->
5. Observed via: <!-- metrics / logs / query result / crash -->
### Trigger Conditions
- **Frequency**: <!-- always | intermittent (~30%) | rare -->
- **First observed after**: <!-- e.g. ~20 minutes of continuous load -->
- **Does NOT happen when**: <!-- e.g. only 1 QueryNode / no compaction / default config -->
## Expected Behavior
<!-- What should happen. Be specific with numbers when possible. -->
## Actual Behavior
<!-- What actually happens. Be specific with numbers when possible. -->
## Error Logs
<!--
Key error logs or stack traces. Only the relevant part, not full logs.
If no error is raised (silent wrong result), state:
"No error in logs, results are incorrect."
-->
```
```
## Non-default Configuration
<!--
Milvus server config that differs from default. Skip if all defaults.
Only include relevant sections.
-->
```yaml
```
## Analysis Hints (Optional)
<!--
Any clues that help narrow down the root cause:
- Suspect code location: e.g. internal/proxy/task_search.go
- Related PR/commit: e.g. might be introduced by #12345
- Trigger boundary: e.g. only happens with sealed segments, growing is fine
- Already ruled out: e.g. not a SDK issue, confirmed by raw gRPC call
- Related issues: e.g. #46820, #46972
-->
+76
View File
@@ -0,0 +1,76 @@
name: 🐞 Bug report
description: Create a bug report to help us improve Milvus
title: "[Bug]: "
labels: [kind/bug, needs-triage]
assignees:
- yanliang567
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please fill the form in English!
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Environment
description: |
Enter the Environment Details:
value: |
- Milvus version:
- Deployment mode(standalone or cluster):
- MQ type(rocksmq, pulsar or kafka):
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS):
- CPU/Memory:
- GPU:
- Others:
render: markdown
validations:
required: false
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
placeholder: |
When I do <X>, <Y> happens and I see the error message attached below:
```...```
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
placeholder: When I do <X>, <Z> should happen instead.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
render: markdown
validations:
required: false
- type: textarea
attributes:
label: Milvus Log
description: Detailed error log information is helpful for finding Milvus problems. **You can use this <a href="https://github.com/milvus-io/milvus/tree/master/deployments/export-log" target="_blank">script</a> to export Milvus logs.**
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
validations:
required: false
+5
View File
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/milvus-io/milvus/discussions
about: Ask questions and discuss with other community members
+37
View File
@@ -0,0 +1,37 @@
name: Enhancement request
description: As a developer, I want to make an enhancement for Milvus
title: "[Enhancement]: "
labels: [kind/enhancement]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to request/suggest an enhancement for Milvus! Please fill the form in English!
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue related to this already exists.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: What would you like to be added?
description: A concise description of what you're expecting/suggesting.
placeholder: |
I would like to suggest/request a feature that's like...
validations:
required: true
- type: textarea
attributes:
label: Why is this needed?
description: A concise description of the reason/motivation
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Screenshots? Anything that will give us more context about this!
validations:
required: false
+21
View File
@@ -0,0 +1,21 @@
---
name: "\U0001F680 Feature request"
about: As a user, I want to request a feature for Milvus
title: ''
labels: kind/feature
assignees: ''
---
<!-- Please state your issue using the following template and, most importantly, in English. -->
#### Is your feature request related to a problem? Please describe:
#### Describe the solution you'd like:
#### Describe alternatives you've considered:
#### Additional context:
@@ -0,0 +1,45 @@
name: 🚀 Feature request
description: As a user, I want to request a feature for Milvus
title: "[Feature]: "
labels: [kind/feature]
assignees:
- xiaofan-luan
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to request a feature for Milvus! Please fill the form in English!
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue related to this feature request already exists.
options:
- label: I have searched the existing issues
required: true
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe.
description: A concise description of the problem you are facing or the motivetion behind this feature request.
placeholder: |
I faced a problem due to which ...
validations:
required: true
- type: textarea
attributes:
label: Describe the solution you'd like.
description: A concise description of the solution for the issue.
validations:
required: false
- type: textarea
attributes:
label: Describe an alternate solution.
description: Is there any other approack to solve the problem?
validations:
required: false
- type: textarea
attributes:
label: Anything else? (Additional Context)
description: |
Links? References? Anything that will give us more context about this!
validations:
required: false
+8
View File
@@ -0,0 +1,8 @@
# Maintainers of GitHub Actions and Mergify
reviewers:
- LoveEachDay
- scsven
- XuanYang-cn
approvers:
- pr-inspection
@@ -0,0 +1,55 @@
name: 'Bump Builder Version'
description: 'bump builder version in the .env file'
inputs:
tag:
description: 'Tag name'
required: true
type:
description: 'the type of builder image, cpu or gpu'
required: true
default: 'cpu'
token:
description: 'github token to create pull request'
required: true
runs:
using: "composite"
steps:
- name: Bump Builder Version when cpu type
if: ${{ inputs.type == 'cpu' }}
shell: bash
run: |
sed -i "s#^DATE_VERSION=.*#DATE_VERSION=${{ inputs.tag }}#g" .env
sed -i "s#^LATEST_DATE_VERSION=.*#LATEST_DATE_VERSION=${{ inputs.tag }}#g" .env
- name: Bump Builder Version when gpu type
if: ${{ inputs.type == 'gpu' }}
shell: bash
run: |
sed -i "s#^GPU_DATE_VERSION=.*#GPU_DATE_VERSION=${{ inputs.tag }}#g" .env
sed -i "s#^LATEST_GPU_DATE_VERSION=.*#LATEST_GPU_DATE_VERSION=${{ inputs.tag }}#g" .env
- name: git config
shell: bash
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .env
git commit -m "Update Builder image changes"
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
continue-on-error: true
with:
token: ${{ inputs.token }}
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: update_${{ inputs.type }}_builder_${{ github.sha }}
delete-branch: true
title: '[automated] Update ${{ inputs.type }} Builder image changes'
body: |
Update ${{ inputs.type }} Builder image changes
See changes: https://github.com/milvus-io/milvus/commit/${{ github.sha }}
Signed-off-by: ${{ github.actor }} ${{ github.actor }}@users.noreply.github.com
- name: Check outputs
shell: bash
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
+49
View File
@@ -0,0 +1,49 @@
name: 'Milvus Cache'
description: ''
inputs:
os:
description: 'OS name'
required: true
default: 'ubuntu20.04'
kind:
description: 'Cache kind'
required: false
default: 'all'
runs:
using: "composite"
steps:
- name: Generate CCache Hash
env:
CORE_HASH: ${{ hashFiles( 'internal/core/**/*.cpp', 'internal/core/**/*.cc', 'internal/core/**/*.c', 'internal/core/**/*.h', 'internal/core/**/*.hpp', 'internal/core/**/CMakeLists.txt') }}
run: |
echo "corehash=${CORE_HASH}" >> $GITHUB_ENV
echo "Set CCache hash to ${CORE_HASH}"
shell: bash
- name: Cache CCache Volumes
if: ${{ inputs.kind == 'all' || inputs.kind == 'cpp' }}
uses: actions/cache/restore@v4
with:
path: .docker/amd64-${{ inputs.os }}-ccache
key: ${{ inputs.os }}-ccache-${{ env.corehash }}
restore-keys: ${{ inputs.os }}-ccache-
- name: Cache Conan Packages
if: ${{ inputs.kind == 'all' || inputs.kind == 'cpp' }}
uses: actions/cache/restore@v4
with:
path: .docker/amd64-${{ inputs.os }}-conan2
key: ${{ inputs.os }}-conan2-${{ hashFiles('internal/core/conanfile.*') }}
restore-keys: ${{ inputs.os }}-conan2-
- name: Cache Third Party
if: ${{ inputs.kind == 'all' || inputs.kind == 'thirdparty' }}
uses: actions/cache/restore@v4
with:
path: .docker/thirdparty
key: ${{ inputs.os }}-thirdparty-${{ hashFiles('internal/core/thirdparty/**') }}
restore-keys: ${{ inputs.os }}-thirdparty-
- name: Cache Go Mod Volumes
if: ${{ inputs.kind == 'all' || inputs.kind == 'go' }}
uses: actions/cache/restore@v4
with:
path: .docker/amd64-${{ inputs.os }}-go-mod
key: ${{ inputs.os }}-go-mod-${{ hashFiles('go.sum, */go.sum') }}
restore-keys: ${{ inputs.os }}-go-mod-
+42
View File
@@ -0,0 +1,42 @@
name: 'Milvus Cache'
description: ''
inputs:
os:
description: 'OS name'
required: true
default: 'ubuntu20.04'
kind:
description: 'Cache kind'
required: false
default: 'all'
runs:
using: "composite"
steps:
- name: Cache CCache Volumes
if: ${{ inputs.kind == 'all' || inputs.kind == 'cpp' }}
uses: actions/cache/save@v4
with:
path: .docker/amd64-${{ inputs.os }}-ccache
key: ${{ inputs.os }}-ccache-${{ env.corehash }}
restore-keys: ${{ inputs.os }}-ccache-
- name: Cache Conan Packages
if: ${{ inputs.kind == 'all' || inputs.kind == 'cpp' }}
uses: actions/cache/save@v4
with:
path: .docker/amd64-${{ inputs.os }}-conan2
key: ${{ inputs.os }}-conan2-${{ hashFiles('internal/core/conanfile.*') }}
restore-keys: ${{ inputs.os }}-conan2-
- name: Cache Third Party
if: ${{ inputs.kind == 'all' || inputs.kind == 'thirdparty' }}
uses: actions/cache/save@v4
with:
path: .docker/thirdparty
key: ${{ inputs.os }}-thirdparty-${{ hashFiles('internal/core/thirdparty/**') }}
restore-keys: ${{ inputs.os }}-thirdparty-
- name: Cache Go Mod Volumes
if: ${{ inputs.kind == 'all' || inputs.kind == 'go' }}
uses: actions/cache/save@v4
with:
path: .docker/amd64-${{ inputs.os }}-go-mod
key: ${{ inputs.os }}-go-mod-${{ hashFiles('go.sum, */go.sum') }}
restore-keys: ${{ inputs.os }}-go-mod-
+49
View File
@@ -0,0 +1,49 @@
name: 'Milvus Cache'
description: ''
inputs:
os:
description: 'OS name'
required: true
default: 'ubuntu20.04'
kind:
description: 'Cache kind'
required: false
default: 'all'
runs:
using: "composite"
steps:
- name: Generate CCache Hash
env:
CORE_HASH: ${{ hashFiles( 'internal/core/**/*.cpp', 'internal/core/**/*.cc', 'internal/core/**/*.c', 'internal/core/**/*.h', 'internal/core/**/*.hpp', 'internal/core/**/CMakeLists.txt') }}
run: |
echo "corehash=${CORE_HASH}" >> $GITHUB_ENV
echo "Set CCache hash to ${CORE_HASH}"
shell: bash
- name: Cache CCache Volumes
if: ${{ inputs.kind == 'all' || inputs.kind == 'cpp' }}
uses: actions/cache@v3
with:
path: .docker/amd64-${{ inputs.os }}-ccache
key: ${{ inputs.os }}-ccache-${{ env.corehash }}
restore-keys: ${{ inputs.os }}-ccache-
- name: Cache Conan Packages
if: ${{ inputs.kind == 'all' || inputs.kind == 'cpp' }}
uses: actions/cache@v3
with:
path: .docker/amd64-${{ inputs.os }}-conan2
key: ${{ inputs.os }}-conan2-${{ hashFiles('internal/core/conanfile.*') }}
restore-keys: ${{ inputs.os }}-conan2-
- name: Cache Third Party
if: ${{ inputs.kind == 'all' || inputs.kind == 'thirdparty' }}
uses: actions/cache@v3
with:
path: .docker/thirdparty
key: ${{ inputs.os }}-thirdparty-${{ hashFiles('internal/core/thirdparty/**') }}
restore-keys: ${{ inputs.os }}-thirdparty-
- name: Cache Go Mod Volumes
if: ${{ inputs.kind == 'all' || inputs.kind == 'go' }}
uses: actions/cache@v3
with:
path: .docker/amd64-${{ inputs.os }}-go-mod
key: ${{ inputs.os }}-go-mod-${{ hashFiles('go.sum, */go.sum') }}
restore-keys: ${{ inputs.os }}-go-mod-
@@ -0,0 +1,54 @@
name: 'Milvus Cache'
description: ''
runs:
using: "composite"
steps:
- name: 'Generate CCache Hash'
run: |
CORE_HASH=""
if [ -d "internal/core" ]; then
# Find all matching files and calculate hash (macOS compatible)
FILES=$(find internal/core -type f \( -name "*.cpp" -o -name "*.cc" -o -name "*.c" -o -name "*.h" -o -name "*.hpp" -o -name "CMakeLists.txt" \) 2>/dev/null | sort)
if [ -n "$FILES" ]; then
CORE_HASH=$(echo "$FILES" | xargs cat 2>/dev/null | shasum -a 256 | cut -d' ' -f1)
fi
fi
echo "corehash=${CORE_HASH}" >> $GITHUB_ENV
echo "Set CCache hash to ${CORE_HASH:-empty}"
shell: bash
- name: Mac Cache CCache Volumes
uses: actions/cache/restore@v4
with:
path: /var/tmp/ccache
key: macos15-arm-ccache-${{ env.corehash }}
restore-keys: macos15-arm-ccache-
- name: Mac Cache Go Mod Volumes
id: go-mod-cache
run: |
GO_MOD_HASH=""
if find . -name "go.sum" -type f | grep -q .; then
GO_MOD_HASH=$(find . -name "go.sum" -type f -exec cat {} \; 2>/dev/null | shasum -a 256 | cut -d' ' -f1)
fi
echo "hash=${GO_MOD_HASH}" >> $GITHUB_OUTPUT
shell: bash
- name: Restore Go Mod Cache
uses: actions/cache/restore@v4
with:
path: ~/go/pkg/mod
key: macos15-arm-go-mod-${{ steps.go-mod-cache.outputs.hash }}
restore-keys: macos15-arm-go-mod-
- name: Mac Cache Conan Packages
id: conan-cache
run: |
CONAN_HASH=""
if find internal/core -name "conanfile.*" -type f 2>/dev/null | grep -q .; then
CONAN_HASH=$(find internal/core -name "conanfile.*" -type f -exec cat {} \; 2>/dev/null | shasum -a 256 | cut -d' ' -f1)
fi
echo "hash=${CONAN_HASH}" >> $GITHUB_OUTPUT
shell: bash
- name: Restore Conan Cache
uses: actions/cache/restore@v4
with:
path: ~/.conan2
key: macos15-arm-conan2-${{ steps.conan-cache.outputs.hash }}
restore-keys: macos15-arm-conan2-
@@ -0,0 +1,61 @@
name: 'Milvus Cache'
description: ''
inputs:
os:
description: 'OS name'
required: true
default: 'ubuntu20.04'
kind:
description: 'Cache kind'
required: false
default: 'all'
runs:
using: "composite"
steps:
- name: Generate CCache Hash
run: |
CORE_HASH=""
if [ -d "internal/core" ]; then
# Find all matching files and calculate hash (macOS compatible)
FILES=$(find internal/core -type f \( -name "*.cpp" -o -name "*.cc" -o -name "*.c" -o -name "*.h" -o -name "*.hpp" -o -name "CMakeLists.txt" \) 2>/dev/null | sort)
if [ -n "$FILES" ]; then
CORE_HASH=$(echo "$FILES" | xargs cat 2>/dev/null | shasum -a 256 | cut -d' ' -f1)
fi
fi
echo "corehash=${CORE_HASH}" >> $GITHUB_ENV
echo "Set CCache hash to ${CORE_HASH:-empty}"
shell: bash
- name: Mac Cache CCache Volumes
uses: actions/cache/save@v4
with:
path: /var/tmp/ccache
key: macos15-arm-ccache-${{ env.corehash }}
- name: Generate Go Mod Hash
id: go-mod-hash
run: |
GO_MOD_HASH=""
if find . -name "go.sum" -type f | grep -q .; then
GO_MOD_HASH=$(find . -name "go.sum" -type f -exec cat {} \; 2>/dev/null | shasum -a 256 | cut -d' ' -f1)
fi
echo "hash=${GO_MOD_HASH}" >> $GITHUB_OUTPUT
shell: bash
- name: Mac Cache Go Mod Volumes
uses: actions/cache/save@v4
with:
path: ~/go/pkg/mod
key: macos15-arm-go-mod-${{ steps.go-mod-hash.outputs.hash }}
- name: Generate Conan Hash
id: conan-hash
run: |
CONAN_HASH=""
if find internal/core -name "conanfile.*" -type f 2>/dev/null | grep -q .; then
CONAN_HASH=$(find internal/core -name "conanfile.*" -type f -exec cat {} \; 2>/dev/null | shasum -a 256 | cut -d' ' -f1)
fi
echo "hash=${CONAN_HASH}" >> $GITHUB_OUTPUT
shell: bash
- name: Mac Cache Conan Packages
uses: actions/cache/save@v4
with:
path: ~/.conan2
key: macos15-arm-conan2-${{ steps.conan-hash.outputs.hash }}
+887
View File
@@ -0,0 +1,887 @@
# ==============================================================================
# Mergify Configuration for Milvus Project
# This file defines automated rules for pull request management
# ==============================================================================
# ==============================================================================
# GLOBAL CONFIGURATIONS AND ALIASES
# Define reusable conditions and patterns for better maintainability
# ==============================================================================
misc:
# File pattern matchers
- &source_code_files files~=^(?=.*((\.(rs|go|h|cpp)|go.sum|go.mod|CMakeLists.txt|conanfile\.*))).*$
- &no_source_code_files -files~=^(?=.*((\.(rs|go|h|cpp)|go.sum|go.mod|CMakeLists.txt|conanfile\.*))).*$
- &only_go_unittest_files -files~=^(?!(client|internal|pkg|tests)\/.*_test\.go).*$
- &morethan_go_unittest_files files~=^(?!(client|internal|pkg|tests)\/.*_test\.go).*$
# Build and test status conditions
- when_build_and_test_status_successs: &Build_AND_TEST_STATUS_SUCESS_ON_UBUNTU_20_OR_UBUNTU_22
- 'status-success=Build and test AMD64 Ubuntu 20.04'
- 'status-success=Build and test AMD64 Ubuntu 22.04'
- when_build_and_test_status_failed: &Build_AND_TEST_STATUS_FAILED_ON_UBUNTU_20_OR_UBUNTU_22
- &failed_on_ubuntu_20 'check-failure=Build and test AMD64 Ubuntu 20.04'
- &failed_on_ubuntu_22 'check-failure=Build and test AMD64 Ubuntu 22.04'
- when_go_sdk_status_success: &WHEN_GO_SDK_STATUS_SUCCESS
- 'status-success=go-sdk'
- 'status-success=milvus-sdk-go'
- 'status-success=ci-v2/go-sdk'
- when_cpp_unit_test_success: &WHEN_CPP_UNIT_TEST_SUCCESS
- 'status-success=cpp-unit-test'
- 'status-success=UT for Cpp'
- 'status-success=ci-v2/ut-cpp'
- when_go_unit_test_success: &WHEN_GO_UNIT_TEST_SUCCESS
- 'status-success=go-unit-test'
- 'status-success=UT for Go'
- 'status-success=ci-v2/ut-go'
- when_integration_unit_test_success: &WHEN_INTEGRATION_UNIT_TEST_SUCCESS
- 'status-success=integration-test'
- 'status-success=Integration Test'
- 'status-success=ci-v2/integration-test'
- when_e2e_test_success: &WHEN_E2E_TEST_SUCCESS
- 'status-success=cpu-e2e'
- 'status-success=ci-v2/e2e-default'
- when_build_success: &WHEN_BUILD_SUCCESS
- 'status-success=Build and test AMD64 Ubuntu 22.04'
- 'status-success=ci-v2/build'
- when_code_check_ubuntu_success: &WHEN_CODE_CHECK_UBUNTU_SUCCESS
- 'status-success=Code Checker AMD64 Ubuntu 22.04'
- 'status-success=ci-v2/code-check'
# CI-v2 checker conditions (3.0 branch)
- when_build_ut_cov_success: &WHEN_BUILD_UT_COV_SUCCESS
- 'status-success=ci-v2/build-ut-cov'
- when_e2e_amd_success: &WHEN_E2E_AMD_SUCCESS
- 'status-success=ci-v2/e2e-amd'
- when_master_legacy_build_ut_cov_success: &WHEN_MASTER_LEGACY_BUILD_UT_COV_SUCCESS
and:
- or: *WHEN_BUILD_SUCCESS
- or: *WHEN_CPP_UNIT_TEST_SUCCESS
- or: *WHEN_GO_UNIT_TEST_SUCCESS
- or: *WHEN_INTEGRATION_UNIT_TEST_SUCCESS
- or: *WHEN_CODE_CHECK_UBUNTU_SUCCESS
- when_master_go_unit_legacy_build_ut_cov_success: &WHEN_MASTER_GO_UNIT_LEGACY_BUILD_UT_COV_SUCCESS
and:
- or: *WHEN_BUILD_SUCCESS
- or: *WHEN_GO_UNIT_TEST_SUCCESS
- or: *WHEN_CODE_CHECK_UBUNTU_SUCCESS
- when_master_build_ut_cov_gate_success: &WHEN_MASTER_BUILD_UT_COV_GATE_SUCCESS
or:
- status-success=ci-v2/build-ut-cov
- *WHEN_MASTER_LEGACY_BUILD_UT_COV_SUCCESS
- when_master_go_unit_build_ut_cov_gate_success: &WHEN_MASTER_GO_UNIT_BUILD_UT_COV_GATE_SUCCESS
or:
- status-success=ci-v2/build-ut-cov
- *WHEN_MASTER_GO_UNIT_LEGACY_BUILD_UT_COV_SUCCESS
- when_master_legacy_build_ut_cov_failure: &WHEN_MASTER_LEGACY_BUILD_UT_COV_FAILURE
or:
- and:
- not:
or:
- 'status-success=Build and test AMD64 Ubuntu 22.04'
- 'status-success=ci-v2/build'
- or:
- 'status-failure=Build and test AMD64 Ubuntu 22.04'
- 'status-failure=ci-v2/build'
- and:
- not:
or:
- 'status-success=UT for Go'
- 'status-success=ci-v2/ut-go'
- or:
- 'status-failure=UT for Go'
- 'status-failure=ci-v2/ut-go'
- and:
- not:
or:
- 'status-success=Integration Test'
- 'status-success=ci-v2/integration-test'
- or:
- 'status-failure=Integration Test'
- 'status-failure=ci-v2/integration-test'
- and:
- *morethan_go_unittest_files
- not:
or:
- 'status-success=cpp-unit-test'
- 'status-success=ci-v2/ut-cpp'
- or:
- 'status-failure=cpp-unit-test'
- 'status-failure=ci-v2/ut-cpp'
- and:
- not:
or:
- 'status-success=Code Checker AMD64 Ubuntu 22.04'
- 'status-success=ci-v2/code-check'
- or:
- 'status-failure=Code Checker AMD64 Ubuntu 22.04'
- 'status-failure=ci-v2/code-check'
- when_master_go_unit_legacy_build_ut_cov_failure: &WHEN_MASTER_GO_UNIT_LEGACY_BUILD_UT_COV_FAILURE
or:
- and:
- not:
or:
- 'status-success=Build and test AMD64 Ubuntu 22.04'
- 'status-success=ci-v2/build'
- or:
- 'status-failure=Build and test AMD64 Ubuntu 22.04'
- 'status-failure=ci-v2/build'
- and:
- not:
or:
- 'status-success=UT for Go'
- 'status-success=ci-v2/ut-go'
- or:
- 'status-failure=UT for Go'
- 'status-failure=ci-v2/ut-go'
- and:
- not:
or:
- 'status-success=Code Checker AMD64 Ubuntu 22.04'
- 'status-success=ci-v2/code-check'
- or:
- 'status-failure=Code Checker AMD64 Ubuntu 22.04'
- 'status-failure=ci-v2/code-check'
- when_master_build_ut_cov_gate_failure: &WHEN_MASTER_BUILD_UT_COV_GATE_FAILURE
and:
- -status-success=ci-v2/build-ut-cov
- status-failure=ci-v2/build-ut-cov
- *WHEN_MASTER_LEGACY_BUILD_UT_COV_FAILURE
- when_master_go_unit_build_ut_cov_gate_failure: &WHEN_MASTER_GO_UNIT_BUILD_UT_COV_GATE_FAILURE
and:
- -status-success=ci-v2/build-ut-cov
- status-failure=ci-v2/build-ut-cov
- *WHEN_MASTER_GO_UNIT_LEGACY_BUILD_UT_COV_FAILURE
# Branch configurations
- branch: &BRANCHES
- &MASTER_BRANCH base=master
- &2X_BRANCH base~=^2(\.\d+){1,2}$
- &3X_BRANCH base=3.0
# ==============================================================================
# PULL REQUEST RULES
# Organized by functionality for better maintenance and understanding
# ==============================================================================
pull_request_rules:
# ==========================================================================
# DCO (Developer Certificate of Origin) MANAGEMENT
# Handles DCO compliance for all contributions
# ==========================================================================
- name: Add needs-dco label when DCO check failed
conditions:
- or: *BRANCHES
- -status-success=DCO
actions:
label:
remove:
- dco-passed
add:
- needs-dco
comment:
message: |
@{{author}} Thanks for your contribution. Please submit with DCO, see the contributing guide https://github.com/milvus-io/milvus/blob/master/CONTRIBUTING.md#developer-certificate-of-origin-dco.
- name: Add dco-passed label when DCO check passed
conditions:
- or: *BRANCHES
- status-success=DCO
actions:
label:
remove:
- needs-dco
add:
- dco-passed
# ==========================================================================
# CONTINUOUS INTEGRATION (CI) STATUS MANAGEMENT
# Rules for managing CI test results and labeling PRs accordingly
# ==========================================================================
- name: Test passed for code changed on master
conditions:
- *MASTER_BRANCH
- *WHEN_MASTER_BUILD_UT_COV_GATE_SUCCESS
- or: *WHEN_GO_SDK_STATUS_SUCCESS
- or: *WHEN_E2E_TEST_SUCCESS
# - 'status-success=codecov/patch'
# - 'status-success=codecov/project'
actions:
label:
add:
- ci-passed
- name: Test passed for code changed on 2.* branch
conditions:
- *2X_BRANCH
- or: *WHEN_BUILD_SUCCESS
# 2.* skip WHEN_GO_SDK_STATUS_SUCCESS
- or: *WHEN_CPP_UNIT_TEST_SUCCESS
- or: *WHEN_GO_UNIT_TEST_SUCCESS
- or: *WHEN_INTEGRATION_UNIT_TEST_SUCCESS
- or: *WHEN_E2E_TEST_SUCCESS
- or: *WHEN_CODE_CHECK_UBUNTU_SUCCESS
# - 'status-success=codecov/patch'
# - 'status-success=codecov/project'
actions:
label:
add:
- ci-passed
- name: Test passed for code changed on 3.0 branch
conditions:
- *3X_BRANCH
- or: *WHEN_BUILD_UT_COV_SUCCESS
- or: *WHEN_E2E_AMD_SUCCESS
- or: *WHEN_GO_SDK_STATUS_SUCCESS
actions:
label:
add:
- ci-passed
# Special cases for minimal testing requirements
- name: Test passed for tests changed
conditions:
- or:
- *MASTER_BRANCH
- *2X_BRANCH
- -files~=^(?!tests\/python_client).+
- or: *WHEN_E2E_TEST_SUCCESS
actions:
label:
add:
- ci-passed
- name: Test passed for tests changed on 3.0
conditions:
- *3X_BRANCH
- -files~=^(?!tests\/python_client).+
- or: *WHEN_E2E_AMD_SUCCESS
actions:
label:
add:
- ci-passed
- name: Test passed for docs changed only
conditions:
- or: *BRANCHES
- -files~=^(?!.*\.(md)).*$
actions:
label:
add:
- ci-passed
- name: Test passed for non rust go or c++ code changed
conditions:
- or:
- *MASTER_BRANCH
- *2X_BRANCH
- or: *WHEN_E2E_TEST_SUCCESS
- *no_source_code_files
actions:
label:
add:
- ci-passed
- name: Test passed for non source code changed on 3.0
conditions:
- *3X_BRANCH
- or: *WHEN_E2E_AMD_SUCCESS
- *no_source_code_files
actions:
label:
add:
- ci-passed
- name: Test passed for go unittest code changed on master
conditions:
- *MASTER_BRANCH
- *only_go_unittest_files
- *WHEN_MASTER_GO_UNIT_BUILD_UT_COV_GATE_SUCCESS
actions:
label:
add:
- ci-passed
- name: Test passed for go unittest code changed on 2.* branch
conditions:
- *2X_BRANCH
- *only_go_unittest_files
- or: *WHEN_BUILD_SUCCESS
- or: *WHEN_CODE_CHECK_UBUNTU_SUCCESS
- or: *WHEN_GO_UNIT_TEST_SUCCESS
actions:
label:
add:
- ci-passed
- name: Test passed for go unittest code changed on 3.0
conditions:
- *3X_BRANCH
- *only_go_unittest_files
- or: *WHEN_BUILD_UT_COV_SUCCESS
actions:
label:
add:
- ci-passed
- name: Test passed for mergify changed
conditions:
- or: *BRANCHES
- -files~=^(?!\.github\/mergify\.yml).*$
actions:
label:
add:
- ci-passed
# Skip E2E testing rules
- name: Test passed for title skip e2e when no source code changed
conditions:
- or: *BRANCHES
- title~=\[skip e2e\]
- label=kind/enhancement
- *no_source_code_files
actions:
label:
add:
- ci-passed
- name: Test passed for skip e2e when source code changed on master
conditions:
- *MASTER_BRANCH
- title~=\[skip e2e\]
- *WHEN_MASTER_BUILD_UT_COV_GATE_SUCCESS
- *source_code_files
actions:
label:
add:
- ci-passed
- name: Test passed for skip e2e when source code changed on 2.* branch
conditions:
- *2X_BRANCH
- or: *WHEN_BUILD_SUCCESS
- title~=\[skip e2e\]
- or: *WHEN_CPP_UNIT_TEST_SUCCESS
- or: *WHEN_GO_UNIT_TEST_SUCCESS
- or: *WHEN_INTEGRATION_UNIT_TEST_SUCCESS
- or: *WHEN_CODE_CHECK_UBUNTU_SUCCESS
- *source_code_files
actions:
label:
add:
- ci-passed
- name: Test passed for skip e2e when source code changed on 3.0
conditions:
- *3X_BRANCH
- title~=\[skip e2e\]
- or: *WHEN_BUILD_UT_COV_SUCCESS
- *source_code_files
actions:
label:
add:
- ci-passed
# ==========================================================================
# CI FAILURE HANDLING
# Remove ci-passed labels when tests fail
# ==========================================================================
- name: Remove ci-passed when E2E test not success for tests changed
conditions:
- or:
- *MASTER_BRANCH
- *2X_BRANCH
- -files~=^(?!tests\/python_client).+
- label!=manual-pass
- label=ci-passed
- not:
or:
- status-success=cpu-e2e
- status-success=ci-v2/e2e-default
actions:
label:
remove:
- ci-passed
- name: Remove ci-passed when E2E test not success for tests changed on 3.0
conditions:
- *3X_BRANCH
- -files~=^(?!tests\/python_client).+
- label!=manual-pass
- label=ci-passed
- -status-success=ci-v2/e2e-amd
actions:
label:
remove:
- ci-passed
# ==========================================================================
# CONSOLIDATED MIGRATION FAILURE HANDLING
# Handle failure scenarios during CI system migration with optimized rules
# ==========================================================================
- name: Remove ci-passed when any CI system fails during master build-ut-cov migration
conditions:
- *MASTER_BRANCH
- label!=manual-pass
- *source_code_files
- or:
# build-ut-cov replaces the legacy build/ut/code-check group on master:
# remove ci-passed only when both systems indicate failure.
- and:
- *only_go_unittest_files
- *WHEN_MASTER_GO_UNIT_BUILD_UT_COV_GATE_FAILURE
- and:
- *morethan_go_unittest_files
- *WHEN_MASTER_BUILD_UT_COV_GATE_FAILURE
# E2E tests: remove only when E2E is required by the matching pass rule.
- and:
- -title~=\[skip e2e\]
- *morethan_go_unittest_files
- not:
or:
- status-success = cpu-e2e
- status-success = ci-v2/e2e-default
- or:
- status-failure = cpu-e2e
- status-failure = ci-v2/e2e-default
# E2E tests: required case - remove if no success AND has failure (when not skipped)
- and:
- -title~=\[skip e2e\]
- files~=^(?!(.*_test\.go|.*\.md|\.github\/mergify\.yml)).*$
- not:
or:
- status-success = cpu-e2e
- status-success = ci-v2/e2e-default
- or:
- status-failure = cpu-e2e
- status-failure = ci-v2/e2e-default
actions:
label:
remove:
- ci-passed
- name: Remove ci-passed when any CI system fails during migration on 2.* branch
conditions:
- *2X_BRANCH
- label!=manual-pass
- *source_code_files
# Comprehensive failure logic: remove ci-passed when any required system fails
- or:
# Build systems: remove if no success AND has failure
- and:
- not:
or:
- status-success = Build and test AMD64 Ubuntu 22.04
- status-success = ci-v2/build
- or:
- status-failure = Build and test AMD64 Ubuntu 22.04
- status-failure = ci-v2/build
# Go unit tests: remove if no success AND has failure
- and:
- not:
or:
- status-success = UT for Go
- status-success = ci-v2/ut-go
- or:
- status-failure = UT for Go
- status-failure = ci-v2/ut-go
# Integration tests: remove if no success AND has failure
- and:
- not:
or:
- status-success = Integration Test
- status-success = ci-v2/integration-test
- or:
- status-failure = Integration Test
- status-failure = ci-v2/integration-test
# Cpp unit tests: remove if no success AND has failure (only when cpp files changed)
- and:
- *morethan_go_unittest_files
- not:
or:
- status-success = cpp-unit-test
- status-success = ci-v2/ut-cpp
- or:
- status-failure = cpp-unit-test
- status-failure = ci-v2/ut-cpp
# Code checker Ubuntu: remove if no success AND has failure
- and:
- not:
or:
- status-success = Code Checker AMD64 Ubuntu 22.04
- status-success = ci-v2/code-check
- or:
- status-failure = Code Checker AMD64 Ubuntu 22.04
- status-failure = ci-v2/code-check
# E2E tests: regular case - remove if no success AND has failure
- and:
- not:
or:
- status-success = cpu-e2e
- status-success = ci-v2/e2e-default
- or:
- status-failure = cpu-e2e
- status-failure = ci-v2/e2e-default
# E2E tests: required case - remove if no success AND has failure (when not skipped)
- and:
- -title~=\[skip e2e\]
- files~=^(?!(.*_test\.go|.*\.md|\.github\/mergify\.yml)).*$
- not:
or:
- status-success = cpu-e2e
- status-success = ci-v2/e2e-default
- or:
- status-failure = cpu-e2e
- status-failure = ci-v2/e2e-default
actions:
label:
remove:
- ci-passed
- name: Remove ci-passed when any CI fails on 3.0 branch
conditions:
- *3X_BRANCH
- label!=manual-pass
- *source_code_files
- or:
- and:
- -status-success = ci-v2/build-ut-cov
- status-failure = ci-v2/build-ut-cov
- and:
- -status-success = ci-v2/e2e-amd
- status-failure = ci-v2/e2e-amd
- and:
- -status-success = ci-v2/go-sdk
- status-failure = ci-v2/go-sdk
actions:
label:
remove:
- ci-passed
# ==========================================================================
# PR VALIDATION AND BLOCKING RULES
# Ensure PRs meet project standards before merging
# ==========================================================================
- name: Blocking PR if missing a related issue or doesn't have kind/enhancement label
conditions:
- or: *BRANCHES
- and:
- -body~=\#[0-9]{1,6}(\s+|$)
- -body~=https://github.com/milvus-io/milvus/issues/[0-9]{1,6}(\s+|$)
- or:
- and:
- label=kind/enhancement
- or:
- label=size/L
- label=size/XL
- label=size/XXL
- label=kind/bug
- label=kind/feature
- -label=kind/doc
- -label=kind/test
- -title~=\[automated\]
actions:
label:
add:
- do-not-merge/missing-related-issue
comment:
message: |
@{{author}} Please associate the related issue to the body of your Pull Request. (eg. "issue: #<xyz>")
- name: Dismiss block label if related issue be added into PR
conditions:
- and:
- or: *BRANCHES
- or:
- body~=\#[0-9]{1,6}(\s+|$)
- body~=https://github.com/milvus-io/milvus/issues/[0-9]{1,6}(\s+|$)
actions:
label:
remove:
- do-not-merge/missing-related-issue
- name: Blocking PR if missing a related master PR or doesn't have kind/branch-feature label
conditions:
- or:
- *2X_BRANCH
- *3X_BRANCH
- and:
- -body~=pr\:\ \#[0-9]{1,6}(\s+|$)
- -body~=https://github.com/milvus-io/milvus/pull/[0-9]{1,6}(\s+|$)
- -label=kind/branch-feature
- -title~=\[automated\]
actions:
label:
add:
- do-not-merge/missing-related-pr
comment:
message: |
@{{author}} Please associate the related pr of master to the body of your Pull Request. (eg. "pr: #<xyz>")
- name: Dismiss block label if related pr be added into PR
conditions:
- or:
- *2X_BRANCH
- *3X_BRANCH
- or:
- body~=pr\:\ \#[0-9]{1,6}(\s+|$)
- body~=https://github.com/milvus-io/milvus/pull/[0-9]{1,6}(\s+|$)
- label=kind/branch-feature
actions:
label:
remove:
- do-not-merge/missing-related-pr
- name: Dismiss block label if automated create PR
conditions:
- or: *BRANCHES
- title~=\[automated\]
actions:
label:
remove:
- do-not-merge/missing-related-issue
- do-not-merge/missing-related-pr
- do-not-merge/missing-design-doc
- name: Blocking PR if feat PR missing design doc
conditions:
- or: *BRANCHES
- or:
- 'title~=^feat:'
- label=kind/feature
- -title~=\[automated\]
# PR body does not reference an in-repo design doc, and the PR does not add one
- '-body~=(^|\s)docs/design-docs/design_docs/[^\s]+\.md'
- -files~=^docs/design-docs/design_docs/.*\.md$
actions:
label:
add:
- do-not-merge/missing-design-doc
comment:
message: |
@{{author}} This is a feature PR (`feat:`). Please provide a design document.
**How to resolve:**
Add a design document under `docs/design-docs/design_docs/` in this PR, or link an existing in-repo design document in the PR description:
```
design doc: docs/design-docs/design_docs/YYYYMMDD-your_design.md
```
- name: Dismiss block label if design doc is provided
conditions:
- or: *BRANCHES
- label=do-not-merge/missing-design-doc
- or:
- 'body~=(^|\s)docs/design-docs/design_docs/[^\s]+\.md'
- files~=^docs/design-docs/design_docs/.*\.md$
actions:
label:
remove:
- do-not-merge/missing-design-doc
# ==========================================================================
# PR FORMAT VALIDATION
# Enforce consistent PR title and description formats
# ==========================================================================
- name: Add 'do-not-merge/invalid-pr-format' label for invalid PR titles
conditions:
- or: *BRANCHES
- or:
- '-title~=^(feat:|enhance:|fix:|test:|doc:|auto:|build\(deps\):|\[automated\])'
- body=^$
actions:
label:
add:
- do-not-merge/invalid-pr-format
comment:
message: |
@{{author}}
**Invalid PR Title Format Detected**
Your PR submission does not adhere to our required standards. To ensure clarity and consistency, please meet the following criteria:
1. **Title Format:** The PR title must begin with one of these prefixes:
- `feat:` for introducing a new feature.
- `fix:` for bug fixes.
- `enhance:` for improvements to existing functionality.
- `test`: for add tests to existing functionality.
- `doc`: for modifying documentation.
- `auto`: for the pull request from bot.
- `build(deps)`: for dependency updates from Dependabot.
2. **Description Requirement:** The PR must include a non-empty description, detailing the changes and their impact.
**Required Title Structure:**
```
[Type]: [Description of the PR]
```
Where `Type` is one of `feat`, `fix`, `enhance`, `test` or `doc`.
**Example:**
```
enhance: improve search performance significantly
```
Please review and update your PR to comply with these guidelines.
- name: Remove 'do-not-merge/invalid-pr-format' label for valid PRs
conditions:
- or: *BRANCHES
- 'title~=^(feat:|enhance:|fix:|test:|doc:|auto:|build\(deps\):|\[automated\])'
- '-body=^$'
- 'label=do-not-merge/invalid-pr-format'
actions:
label:
remove:
- do-not-merge/invalid-pr-format
# ==========================================================================
# FAILURE NOTIFICATION AND RETRY HELPERS
# Provide helpful comments when CI jobs fail with retry instructions
# ==========================================================================
- name: Add comment when cpu-e2e job failed
conditions:
- or: *BRANCHES
- 'check-failure=cpu-e2e'
actions:
comment:
message: |
@{{author}} cpu-e2e job failed, comment `/run-cpu-e2e` can trigger the job again.
- name: Add comment when go-sdk check failed
conditions:
- or: *BRANCHES
- 'check-failure=go-sdk'
actions:
comment:
message: |
@{{author}} go-sdk check failed, comment `rerun go-sdk` can trigger the job again.
- name: Add comment when cpp-unit-test check failed
conditions:
- or: *BRANCHES
- 'check-failure=cpp-unit-test'
actions:
comment:
message: |
@{{author}} cpp-unit-test check failed, comment `rerun cpp-unit-test` can trigger the job again.
- name: Add comment when go-unit-test check failed
conditions:
- or: *BRANCHES
- 'check-failure=go-unit-test'
actions:
comment:
message: |
@{{author}} go-unit-test check failed, comment `rerun go-unit-test` can trigger the job again.
- name: Add comment when integration-test check failed
conditions:
- or: *BRANCHES
- 'check-failure=integration-test'
actions:
comment:
message: |
@{{author}} integration-test check failed, comment `rerun integration-test` can trigger the job again.
- name: Add comment when code checker or ut failed -master
conditions:
- or: *BRANCHES
- or:
# - 'check-failure=Code Checker AMD64 Ubuntu 20.04'
- 'check-failure=Build and test AMD64 Ubuntu 20.04'
actions:
comment:
message: |
@{{author}} ut workflow job failed, comment `rerun ut` can trigger the job again.
- name: Add comment when code checker or ut failed -2.2.*
conditions:
- *2X_BRANCH
- or:
# - 'check-failure=Code Checker AMD64 Ubuntu 20.04'
- 'check-failure=Build and test AMD64 Ubuntu 20.04'
actions:
comment:
message: |
@{{author}} ut workflow job failed, comment `rerun ut` can trigger the job again.
# ==========================================================================
# AUTOMATIC LABELING BASED ON PR TITLES
# Automatically categorize PRs based on their title prefixes
# ==========================================================================
- name: Label bug fix PRs
conditions:
- or: *BRANCHES
- 'title~=^fix:'
actions:
label:
add:
- kind/bug
- name: Label feature PRs
conditions:
- or: *BRANCHES
- 'title~=^feat:'
actions:
label:
add:
- kind/feature
- name: Label enhancement PRs
conditions:
- or: *BRANCHES
- 'title~=^enhance:'
actions:
label:
add:
- kind/enhancement
- name: Label test PRs
conditions:
- or: *BRANCHES
- 'title~=^test:'
actions:
label:
add:
- kind/test
- name: Label doc PRs
conditions:
- or: *BRANCHES
- 'title~=^doc:'
actions:
label:
add:
- kind/doc
# ==========================================================================
# SPECIAL AUTOMATION RULES
# Handle specific automated workflows and updates
# ==========================================================================
- name: Assign the 'lgtm' and 'approved' labels following the successful testing of the 'Update Knowhere Commit'
conditions:
- or: *BRANCHES
- 'title~=Update Knowhere Commit'
- label=ci-passed
actions:
label:
add:
- lgtm
- approved
+23
View File
@@ -0,0 +1,23 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- priority/critical-urgent
- priority/important-longterm
- kind/feature
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
Rotten issues close after 30d of inactivity.
Reopen the issue with `/reopen`.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
+67
View File
@@ -0,0 +1,67 @@
name: all-contributors
on:
schedule:
# * is a special character in YAML so you have to quote this string
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
- cron: '0 0,12 * * *'
jobs:
contributor:
runs-on: ubuntu-latest
if: github.repository == 'milvus-io/milvus'
steps:
- name: checkout code
uses: actions/checkout@v2
with:
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
- name: log path
run: |
pwd
ls
- name: Update README.md
uses: milvus-io/hero-bot@dco-enabled
with:
# Required
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
repos: 'milvus-io/milvus,bootcamp,community,docs,milvus-helm,milvus-sdk-go,milvus-sdk-java,milvus-sdk-node,milvus.io,pymilvus,pymilvus-orm'
targetFile: './README.md'
# Optional
isAscend: True
width: '30px'
customUserConfig: 'milvus-io/milvus/.contributors'
workingDir: ${{ github.workspace }}
- name: Update README_CN.md
uses: milvus-io/hero-bot@dco-enabled
with:
# Required
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
repos: 'milvus-io/milvus,bootcamp,community,docs,milvus-helm,milvus-sdk-go,milvus-sdk-java,milvus-sdk-node,milvus.io,pymilvus,pymilvus-orm'
targetFile: './README_CN.md'
# Optional
isAscend: True
width: '30px'
customUserConfig: 'milvus-io/milvus/.contributors'
workingDir: ${{ github.workspace }}
- name: commit code
run: |
pwd
git config --system user.email "sre-ci-robot@zilliz.com"
git config --system user.name "sre-ci-robot"
git add -u
git diff-index --cached --quiet HEAD || (git commit -s -m 'Update all contributors' && git push)
@@ -0,0 +1,47 @@
name: Bump Standalone Embed Milvus Version
on:
workflow_dispatch:
inputs:
imageTag:
description: "the milvus image tag"
required: true
type: string
jobs:
update-knowhere-commits:
name: Bump Milvus Version for release
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update milvus image tag
# continue-on-error: true
shell: bash
run: |
sed -i 's/\(milvusdb\/milvus:\)[^[:space:]]*/\1${{ inputs.imageTag }}/' scripts/standalone_embed.sh
sed -i 's/\(milvusdb\/milvus:\)[^[:space:]]*/\1${{ inputs.imageTag }}/' scripts/standalone_embed.bat
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add scripts
git status
git commit -m "Bump milvus version to ${{ inputs.imageTag }}"
- name: Create Pull Request
id: cpr
continue-on-error: true
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
author: sre-ci-robot <sre-ci-robot@users.noreply.github.com>
signoff: true
branch: bump_milvus_commit_${{ github.sha }}
delete-branch: true
title: '[automated] Bump milvus version to ${{ inputs.imageTag }}'
body: |
Bump milvus version to ${{ inputs.imageTag }}
Signed-off-by: sre-ci-robot sre-ci-robot@users.noreply.github.com
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
+49
View File
@@ -0,0 +1,49 @@
name: Bump Milvus Version
on:
workflow_dispatch:
inputs:
imageTag:
description: "the milvus image tag"
required: true
type: string
jobs:
update-knowhere-commits:
name: Bump Milvus Version for release
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update milvus image tag
# continue-on-error: true
shell: bash
run: |
sed -i 's/\(milvusdb\/milvus:\)[^[:space:]]*/\1${{ inputs.imageTag }}/' deployments/docker/standalone/docker-compose.yml
sed -i 's/\(milvusdb\/milvus:\)[^[:space:]]*/\1${{ inputs.imageTag }}/' deployments/binary/README.md
sed -i 's/\(milvusdb\/milvus:\)[^[:space:]]*-gpu/\1${{ inputs.imageTag }}-gpu/' deployments/docker/gpu/standalone/docker-compose.yml
sed -i 's/\(milvusdb\/milvus:\)[^[:space:]]*/\1${{ inputs.imageTag }}/' deployments/docker/cluster-distributed-deployment/inventory.ini
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git diff
git add deployments
git commit -m "Bump milvus version to ${{ inputs.imageTag }}"
- name: Create Pull Request
id: cpr
continue-on-error: true
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
author: sre-ci-robot <sre-ci-robot@users.noreply.github.com>
signoff: true
branch: bump_milvus_commit_${{ github.sha }}
delete-branch: true
title: '[automated] Bump milvus version to ${{ inputs.imageTag }}'
body: |
Bump milvus version to ${{ inputs.imageTag }}
Signed-off-by: sre-ci-robot sre-ci-robot@users.noreply.github.com
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
+50
View File
@@ -0,0 +1,50 @@
name: Add Comment for issue
on:
issues:
types: [opened]
jobs:
check_issue_title:
name: Check issue
runs-on: ubuntu-latest
env:
TITLE_PASSED: "T"
ISSUE_TITLE: ${{ github.event.issue.title }}
permissions:
issues: write
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check Issue
shell: bash
run: |
echo "Issue title: ${ISSUE_TITLE//\"/\\\"}"
cat >> check_title.py << EOF
import re
import sys
check_str = sys.argv[1]
pattern = re.compile(r'[\u4e00-\u9fa5]')
match = pattern.search(check_str)
if match:
print("TITLE_PASSED=F")
else:
print("TITLE_PASSED=T")
EOF
python3 check_title.py "${ISSUE_TITLE//\"/\\\"}" >> "$GITHUB_ENV"
cat $GITHUB_ENV
- name: Check env
shell: bash
run: |
echo ${{ env.TITLE_PASSED }}
- name: Add comment
if: ${{ env.TITLE_PASSED == 'F'}}
uses: peter-evans/create-or-update-comment@5f728c3dae25f329afbe34ee4d08eef25569d79f
with:
issue-number: ${{ github.event.issue.number }}
body: |
The title and description of this issue contains Chinese. Please use English to describe your issue.
+46
View File
@@ -0,0 +1,46 @@
name: Claude Code Review
on:
pull_request_target:
types: [opened, synchronize, ready_for_review, reopened]
# Optional: Only run on specific file changes
# paths:
# - "src/**/*.ts"
# - "src/**/*.tsx"
# - "src/**/*.js"
# - "src/**/*.jsx"
jobs:
claude-review:
# Optional: Filter by PR author
# if: |
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
id-token: write
steps:
- name: Checkout PR code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 1
- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
plugins: 'code-review@claude-code-plugins'
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
+51
View File
@@ -0,0 +1,51 @@
name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]
jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
id-token: write
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
# prompt: 'Update the pull request description to include a summary of changes.'
# Optional: Add claude_args to customize behavior and configuration
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
# claude_args: '--allowed-tools Bash(gh pr:*)'
+132
View File
@@ -0,0 +1,132 @@
name: Code Checker
# TODO: do not trigger action for some document file update
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
branches:
- master
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'scripts/**'
- 'internal/**'
- 'pkg/**'
- 'client/**'
- 'cmd/**'
- 'build/**'
- 'tests/integration/**'
- 'tests/go_client/**'
- '.github/workflows/code-checker.yaml'
- '.env'
- docker-compose.yml
- Makefile
- '!**.md'
- '!build/ci/jenkins/**'
# FIXME(wxyu): not need to run code check, update the ci-passed rules and remove these two lines
- go.mod
- go.sum
- .golangci.yml
- rules.go
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
ubuntu:
name: Code Checker AMD64 Ubuntu 22.04
runs-on: ubuntu-latest
timeout-minutes: 180
strategy:
fail-fast: false
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checkout
uses: actions/checkout@v2
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'ubuntu22.04'
- name: Code Check
env:
OS_NAME: 'ubuntu22.04'
run: |
./build/builder.sh /bin/bash -c "git config --global --add safe.directory /go/src/github.com/milvus-io/milvus && make check-proto-product && make verifiers"
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'ubuntu22.04'
amazonlinux:
if: ${{ false }} # skip for now
name: Code Checker Amazonlinux 2023
# Run in amazonlinux docker
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checkout
uses: actions/checkout@v2
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'amazonlinux2023'
- name: Code Check
run: |
sed -i 's/ubuntu22.04/amazonlinux2023/g' .env
./build/builder.sh /bin/bash -c "make install"
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'amazonlinux2023'
rockylinux:
if: ${{ false }} # skip for now
name: Code Checker rockylinux9
# Run in rockylinux docker
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checkout
uses: actions/checkout@v2
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'rockylinux9'
- name: Code Check
run: |
sed -i 's/ubuntu22.04/rockylinux9/g' .env
./build/builder.sh /bin/bash -c "make install"
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'rockylinux9'
+71
View File
@@ -0,0 +1,71 @@
name: Daily Release
on:
schedule:
# * is a special character in YAML so you have to quote this string
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
- cron: '0 18 * * *'
jobs:
nightly:
name: Run Daily Release
if: github.repository == 'milvus-io/milvus'
runs-on: ubuntu-latest
env:
IMAGE_REPO: "milvusdb"
DEV: "milvus"
DAILY: "daily-build"
TAG_PREFIX: "master-"
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Get the latest of Milvus dev image tag
shell: bash
working-directory: scripts
run: echo "tag=$(./docker_image_find_tag.sh -n ${IMAGE_REPO}/${DEV} -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)" >> $GITHUB_ENV
- name: Pull latest milvus image with tag prefix master-
run: |
docker pull "${IMAGE_REPO}/${DEV}:${{ env.tag }}"
docker tag "${IMAGE_REPO}/${DEV}:${{ env.tag }}" "${IMAGE_REPO}/${DAILY}:${{ env.tag }}"
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Docker image
run: |
docker push "${IMAGE_REPO}/${DAILY}:${{ env.tag }}"
- name: Set release build
shell: bash
run: |
tag=${{ env.tag }}
IFS=- read branch date sha <<< "$tag"
echo "build=$date" >> $GITHUB_ENV
echo "sha=$(git rev-parse $sha)" >> $GITHUB_ENV
- name: Create a daily release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: "Image: ${{ env.IMAGE_REPO}}/${{ env.DAILY }}:${{ env.tag }}"
prerelease: true
tag_name: "v2.0.0-testing-${{ env.build }}"
release_name: "milvus-2.0.0-testing-${{ env.build }}"
commitish: "${{ env.sha }}"
+60
View File
@@ -0,0 +1,60 @@
name: Jenkins Checker
# Lint Jenkinsfile and related groovy files
on:
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/ci/jenkins/**.groovy'
- 'ci/jenkins/**.groovy'
- '.github/workflows/jenkins-checker.yaml'
jobs:
check-jenkinsfile:
name: Jenkinsfile Checker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Validate Jenkinsfile
shell: bash
run: |
function validate(){
local file_path=${1:-Jenkinsfile}
local jenkins_url=${2:-"https://jenkins.milvus.io:18080/"}
JENKINS_CRUMB=`curl "${jenkins_url}/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,\":\",//crumb)"`
response=$(curl --max-time 10 --retry 5 --retry-delay 0 --retry-max-time 40 -X POST -H $JENKINS_CRUMB -F "jenkinsfile=<${file_path}" ${jenkins_url}/pipeline-model-converter/validate)
if [[ ${response} =~ "Error" ]]
then
echo " ${response}"
echo "Validate ${file_path} failed !"
exit 1
fi
}
function validate_path(){
local path=${1}
local jenkins_url=${2}
for file in ${path}
do
if [ -f "$file" ]
then
# echo "$file"
file_name=$(basename "$file")
if echo "${file_name}" | grep -q -E '\.groovy$'
then
# echo "Validate groovy file ${file_name}"
validate $file ${jenkins_url}
elif [[ "${file_name}" == "Jenkinsfile" ]]
then
# echo "Validate Jenkinsfile"
validate $file ${jenkins_url}
fi
fi
done
}
validate_path "ci/jenkins/*" "https://jenkins.milvus.io:18080/"
+14
View File
@@ -0,0 +1,14 @@
name: License Checker
on:
workflow_dispatch:
jobs:
check-license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check License Header
uses: apache/skywalking-eyes@main
with:
log: info
config: .github/.licenserc.yaml
+94
View File
@@ -0,0 +1,94 @@
name: Mac Code Checker
# This workflow is triggered by manual dispatch.
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to run the workflow on'
required: true
default: 'master'
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.event.inputs.branch || github.sha }}
cancel-in-progress: false
jobs:
mac:
name: Code Checker MacOS
runs-on: macos-15
timeout-minutes: 480
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch || github.ref }}
- name: Setup Python environment
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install CMake 3.31.8
run: |
cmake --version || true
which cmake || true
if ! brew list cmake &>/dev/null; then
brew uninstall cmake -f
fi
curl -LO https://github.com/Kitware/CMake/releases/download/v3.31.8/cmake-3.31.8-macos-universal.tar.gz
tar -zxf cmake-3.31.8-macos-universal.tar.gz -C /tmp/
sudo mv /tmp/cmake-3.31.8-macos-universal/CMake.app /Applications/
sudo rm -f /usr/local/bin/cmake /usr/local/bin/cpack /usr/local/bin/ctest
sudo rm -f /opt/homebrew/bin/cmake /opt/homebrew/bin/cpack /opt/homebrew/bin/ctest
echo -e "\n=== Creating symlinks for CMake ==="
sudo ln -s /Applications/CMake.app/Contents/bin/cmake /usr/local/bin/cmake
sudo ln -s /Applications/CMake.app/Contents/bin/cpack /usr/local/bin/cpack
sudo ln -s /Applications/CMake.app/Contents/bin/ctest /usr/local/bin/ctest
CMAKE_MODULE_DIR="/Applications/CMake.app/Contents/share/cmake-3.31"
sudo ln -s "$CMAKE_MODULE_DIR" /usr/local/share/cmake-3.31
export PATH="/usr/local/bin:$PATH"
cmake --version
which cmake
- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: '1.26.4'
cache: false
- name: Download Caches
uses: ./.github/actions/macos-cache-restore
- name: Code Check
env:
CCACHE_DIR: /var/tmp/ccache
CCACHE_COMPILERCHECK: content
CCACHE_COMPRESS: 1
CCACHE_COMPRESSLEVEL: 9
CCACHE_MAXSIZE: 1G
run: |
if [[ ! -d "/var/tmp/ccache" ]];then
mkdir -p /var/tmp/ccache
fi
brew install libomp ninja ccache pkg-config
BREW_PREFIX=$(brew --prefix)
# aws-sdk-cpp 1.11.750 had a packaging bug where Paginator.h was
# not installed (missing CMake install rule for pagination headers).
# Homebrew backported the fix with "rebuild 1", but the CI runner's
# formula may be stale. Run brew update first so we get the
# patched bottle.
brew update
brew install aws-sdk-cpp || brew upgrade aws-sdk-cpp
# Install llvm@17 explicitly as a stable version
brew install llvm@17
if [[ ! -d "${BREW_PREFIX}/opt/llvm" ]]; then
ln -s ${BREW_PREFIX}/opt/llvm@17 ${BREW_PREFIX}/opt/llvm
fi
pip3 install conan==2.25.1
make milvus
- name: Upload Cmake log
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: cmake-log
path: cmake_build/CMakeFiles/*.log
- name: Save Caches
uses: ./.github/actions/macos-cache-save
if: github.event_name != 'pull_request'
+313
View File
@@ -0,0 +1,313 @@
name: Build and test
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'scripts/**'
- 'internal/**'
- 'client/**'
- 'pkg/**'
- 'cmd/**'
- 'build/**'
- 'tests/integration/**' # run integration test
- '.github/workflows/main.yaml'
- '.env'
- docker-compose.yml
- Makefile
- go.mod
- '!**.md'
- '!build/ci/jenkins/**'
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'scripts/**'
- 'internal/**'
- 'pkg/**'
- 'client/**'
- 'cmd/**'
- 'build/**'
- 'tests/integration/**' # run integration test
- '.github/workflows/main.yaml'
- '.env'
- docker-compose.yml
- Makefile
- go.mod
- '!**.md'
- '!build/ci/jenkins/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
Build:
name: Build and test AMD64 Ubuntu 22.04
runs-on: ubuntu-latest
steps:
- name: 'Setup $HOME'
# hot fix
run: |
# Check if $HOME is not set
if [ -z "$HOME" ]; then
echo '$HOME was no set'
echo "HOME=/home/zilliz-user" >> $GITHUB_ENV
fi
echo "HOME variable is:$HOME"
echo "GITHUB_ENV variable is:$GITHUB_ENV"
- name: Setup mold
uses: rui314/setup-mold@v1
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'Check Changed files'
id: changed-files-cpp
uses: tj-actions/changed-files@v46
with:
since_last_remote_commit: 'true'
files: |
**/*.cpp
**/*.cc
**/*.c
**/*.h
**/*.hpp
**/*.CMakeLists.txt
**/conanfile.*
- name: 'Setup Use USE_ASAN'
if: steps.changed-files-cpp.outputs.any_changed == 'true'
run: |
echo "useasan=OFF" >> $GITHUB_ENV
echo "Setup USE_ASAN to true since cpp file(s) changed"
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'ubuntu22.04'
kind: 'cpp'
- name: Build
run: |
./build/builder.sh /bin/bash -c "make USE_ASAN=${{env.useasan}} mode=RelWithDebInfo build-cpp && chmod -R a+rwx /home/milvus/.conan2"
- run: |
zip -r code.zip . -x "./.docker/*" -x "./cmake_build/thirdparty/**" -x ".git/**"
- name: Archive code
uses: actions/upload-artifact@v4
with:
name: code
path: code.zip
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'ubuntu22.04'
kind: 'cpp'
UT-Cpp:
# skip the UT-Cpp job in github workflow, it run in jenkins now see: UT-CPP.groovy
if: false
name: UT for Cpp
needs: Build
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Download code
uses: actions/download-artifact@v4.1.3
with:
name: code
- run: |
unzip code.zip
rm code.zip
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'ubuntu22.04'
kind: 'cpp'
- name: Start Service
shell: bash
run: |
docker compose up -d azurite gcpnative
- name: UT
run: |
chmod +x build/builder.sh
chmod +x scripts/*
chmod +x internal/core/output/unittest/*
./build/builder.sh /bin/bash -c ./scripts/run_cpp_codecov.sh
- name: Archive result
uses: actions/upload-artifact@v4
with:
name: cpp-result
path: |
./go_coverage.txt
./lcov_output.info
*.info
*.out
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'ubuntu22.04'
kind: 'cpp'
UT-Go:
name: UT for Go
needs: Build
runs-on: ubuntu-latest
timeout-minutes: 150
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Download code
uses: actions/download-artifact@v4.1.3
with:
name: code
- run: |
unzip code.zip
rm code.zip
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'ubuntu22.04'
kind: 'go'
- name: Start Service
shell: bash
run: |
docker compose up -d pulsar etcd minio azurite gcpnative
- name: UT
run: |
chmod +x build/builder.sh
chmod +x scripts/run_go_codecov.sh
./build/builder.sh /bin/bash -c "make codecov-go-without-build"
- name: Archive result
uses: actions/upload-artifact@v4
with:
name: go-result
path: |
./go_coverage.txt
./lcov_output.info
*.info
*.out
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'ubuntu22.04'
kind: 'go'
integration-test:
name: Integration Test
needs: Build
runs-on: ubuntu-latest
timeout-minutes: 150
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Download code
uses: actions/download-artifact@v4.1.3
with:
name: code
- run: |
unzip code.zip
rm code.zip
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'ubuntu22.04'
kind: 'go'
- name: Start Service
shell: bash
run: |
docker compose up -d pulsar etcd minio
- name: IntegrationTest
run: |
chmod +x build/builder.sh
chmod +x scripts/run_intergration_test.sh
./build/builder.sh /bin/bash -c "make build-go && make integration-test"
- name: Archive result
uses: actions/upload-artifact@v4
with:
name: it-result
path: |
./it_coverage.txt
*.info
*.out
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'ubuntu22.04'
kind: 'go'
codecov:
name: Upload Code Coverage
needs: [UT-Go, integration-test]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download Go code coverage results
uses: actions/download-artifact@v4.1.3
with:
name: go-result
- name: Download Integration Test coverage results
uses: actions/download-artifact@v4.1.3
with:
name: it-result
- name: Display structure of code coverage results
run: |
ls -lah
- name: Upload coverage to Codecov
if: ${{ github.repository == 'milvus-io/milvus' }}
uses: codecov/codecov-action@v4
id: upload_cov
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./go_coverage.txt,./it_coverage.txt
name: ubuntu-20.04-unittests
fail_ci_if_error: true
disable_safe_directory: true
verbose: true
- name: Retry Upload coverage to Codecov
if: ${{ failure() && github.repository == 'milvus-io/milvus' }}
uses: codecov/codecov-action@v4
id: retry_upload_cov
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./go_coverage.txt,./it_coverage.txt
name: ubuntu-20.04-unittests
fail_ci_if_error: true
disable_safe_directory: true
verbose: true
+24
View File
@@ -0,0 +1,24 @@
name: Markdown Links Check
on:
workflow_dispatch:
schedule:
- cron: "30 20 * * *"
jobs:
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
# checks all markdown files from /docs including all subfolders
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
folder-path: 'docs/'
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
# checks all markdown files from root but ignores subfolders
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
max-depth: 0
+99
View File
@@ -0,0 +1,99 @@
name: Publish Builder
# TODO: do not trigger action for some document file update
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/docker/builder/cpu/**'
- '.github/workflows/publish-builder.yaml'
- '!**.md'
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/docker/builder/cpu/**'
- '.github/workflows/publish-builder.yaml'
- '!**.md'
workflow_dispatch:
inputs:
push_to_dockerhub:
description: 'Push to Docker Hub'
required: true
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
publish-builder:
name: ${{ matrix.arch }} ${{ matrix.os }}
runs-on: ubuntu-latest
timeout-minutes: 500
strategy:
fail-fast: false
matrix:
os: [ubuntu24.04, ubuntu22.04, amazonlinux2023, rockylinux9]
env:
OS_NAME: ${{ matrix.os }}
IMAGE_ARCH: ${{ matrix.arch }}
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 10240
overprovision-lvm: 'true'
swap-size-mb: 2048
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- name: Checkout
uses: actions/checkout@v2
- name: Get version from system time after release step
id: extracter
run: |
echo "::set-output name=version::$(date +%Y%m%d)"
echo "::set-output name=sha_short::$(git rev-parse --short=7 HEAD)"
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
milvusdb/milvus-env
tags: |
type=raw,enable=true,value=${{ matrix.os }}-{{date 'YYYYMMDD'}}-{{sha}}
type=raw,enable=true,value=${{ matrix.os }}-latest
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || inputs.push_to_dockerhub)
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || inputs.push_to_dockerhub) }}
tags: ${{ steps.meta.outputs.tags }}
file: build/docker/builder/cpu/${{ matrix.os }}/Dockerfile
- name: Bump Builder Version
uses: ./.github/actions/bump-builder-version
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus' && matrix.os == 'ubuntu22.04'
with:
tag: "${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}"
type: cpu
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
@@ -0,0 +1,97 @@
name: Publish Gpu Builder
# TODO: do not trigger action for some document file update
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/docker/builder/gpu/**'
- '.github/workflows/publish-gpu-builder.yaml'
- '!**.md'
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/docker/builder/gpu/**'
- '.github/workflows/publish-gpu-builder.yaml'
- '!**.md'
workflow_dispatch:
inputs:
RunnerHost:
description: "Use this label for self-host runner"
required: true
type: string
default: "ubuntu-latest"
push_to_dockerhub:
description: 'Push to Docker Hub'
required: true
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
publish-gpu-builder:
runs-on: ubuntu-latest
timeout-minutes: 500
env:
OS: ubuntu22.04
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 10240
overprovision-lvm: 'true'
swap-size-mb: 2048
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- name: Checkout
uses: actions/checkout@v2
- name: Get version from system time after release step
id: extracter
run: |
echo "version=$(date +%Y%m%d)" >> $GITHUB_OUTPUT
echo "sha_short=$(git rev-parse --short=7 HEAD)" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
milvusdb/milvus-env
tags: |
type=raw,enable=true,value=gpu-${{ env.OS }}-{{date 'YYYYMMDD'}}-{{sha}}
type=raw,enable=true,value=gpu-${{ env.OS }}-latest
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || inputs.push_to_dockerhub)
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || inputs.push_to_dockerhub) }}
tags: ${{ steps.meta.outputs.tags }}
file: build/docker/builder/gpu/${{ env.OS }}/Dockerfile
- name: Bump Builder Version
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus' && env.OS == 'ubuntu22.04'
uses: ./.github/actions/bump-builder-version
with:
tag: "${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}"
type: gpu
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
@@ -0,0 +1,85 @@
name: Publish KRTE Images
# TODO: do not trigger action for some document file update
# This workflow is triggered on pushes or pull request to the repository.
on:
workflow_dispatch:
push:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/docker/krte/**'
- '.github/workflows/publish-krte-images.yaml'
- '!**.md'
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/docker/krte/**'
- '.github/workflows/publish-krte-images.yaml'
- '!**.md'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
publish-krte-images:
name: KRTE
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get version from system time after release step
id: extracter
run: |
echo "::set-output name=version::$(date +%Y%m%d)"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Docker Build
shell: bash
working-directory: build/docker/krte
run: |
export TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}
docker build --build-arg IMAGE_ARG="milvusdb/krte:$TAG" --build-arg GO_VERSION=1.26.4 -t "milvusdb/krte:$TAG" .
- name: Docker Push
if: success() && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' )&& github.repository == 'milvus-io/milvus'
continue-on-error: true
shell: bash
run: |
docker login -u ${{ secrets.DOCKERHUB_USER }} \
-p ${{ secrets.DOCKERHUB_TOKEN }}
export TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}
docker push "milvusdb/krte:$TAG"
echo "Push krte image Succeeded"
- name: Update KRTE Image Changes
if: success() && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) && github.repository == 'milvus-io/milvus'
continue-on-error: true
shell: bash
working-directory: build/ci/jenkins/pod
run: |
export TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}
sed -i "s#krte:.*#krte:${TAG}#g" ./build/ci/jenkins/pod/rte.yaml
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add rte.yaml
git commit -m "Update KRTE image changes"
- name: Create Pull Request
id: cpr
if: success() && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) && github.repository == 'milvus-io/milvus'
continue-on-error: true
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: update_krte_${{ github.sha }}
delete-branch: true
title: '[automated] Update KRTE image changes'
body: |
Update KRTE image changes
Signed-off-by: ${{ github.actor }} ${{ github.actor }}@users.noreply.github.com
- name: Check outputs
if: success() && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) && github.repository == 'milvus-io/milvus'
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
@@ -0,0 +1,97 @@
name: Publish Test Images
# TODO: do not trigger action for some document file update
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'tests/docker/Dockerfile'
- 'tests/python_client/requirements.txt'
- '.github/workflows/publish-test-images.yaml'
- '!**.md'
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'tests/docker/Dockerfile'
- 'tests/python_client/requirements.txt'
- '.github/workflows/publish-test-images.yaml'
- '!**.md'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
publish-pytest-images:
name: PyTest
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get version from system time after release step
id: extracter
run: |
echo "::set-output name=version::$(date +%Y%m%d)"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Docker Pull
shell: bash
working-directory: tests/docker
run: |
docker compose pull pytest
- name: Docker Build
shell: bash
working-directory: tests/docker
run: |
IMAGE_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }} docker compose build pytest
export LATEST_IMAGE_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}
IMAGE_TAG=latest docker compose build pytest
- name: Docker Push
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus'
continue-on-error: true
shell: bash
working-directory: tests/docker
run: |
docker login -u ${{ secrets.DOCKERHUB_USER }} \
-p ${{ secrets.DOCKERHUB_TOKEN }}
IMAGE_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }} docker compose push pytest
IMAGE_TAG=latest docker compose push pytest
echo "Push pytest image Succeeded"
- name: Update Pytest Image Changes
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus'
continue-on-error: true
shell: bash
working-directory: .
run: |
sed -i "s#^IMAGE_TAG=.*#IMAGE_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}#g" ./tests/docker/.env
sed -i "s#^LATEST_IMAGE_TAG=.*#LATEST_IMAGE_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}#g" ./tests/docker/.env
sed -i "s#pytest:.*#pytest:${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}#g" ./ci/jenkins/pod/rte.yaml
sed -i "s#pytest:.*#pytest:${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}#g" ./ci/jenkins/pod/e2e.yaml
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add ./tests/docker/.env
git add ./ci/jenkins/pod/rte.yaml
git add ./ci/jenkins/pod/e2e.yaml
git commit -m "Update Pytest image changes"
- name: Create Pull Request
id: cpr
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus'
continue-on-error: true
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: true
branch: update_pytest_${{ github.sha }}
delete-branch: true
title: '[automated] Update Pytest image changes'
body: |
Update Pytest image changes
See changes: https://github.com/milvus-io/milvus/commit/${{ github.sha }}
Signed-off-by: ${{ github.actor }} ${{ github.actor }}@users.noreply.github.com
- name: Check outputs
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus'
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
+60
View File
@@ -0,0 +1,60 @@
name: Python Lint (tests/)
on:
push:
branches:
- master
paths:
- 'tests/**/*.py'
- 'tests/ruff.toml'
- '.github/workflows/python-lint.yaml'
pull_request:
paths:
- 'tests/**/*.py'
- 'tests/ruff.toml'
- '.github/workflows/python-lint.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
ruff:
name: Ruff (changed files only)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect changed Python files under tests/
id: changed
uses: tj-actions/changed-files@v46
with:
files: tests/**/*.py
- name: ruff check
if: steps.changed.outputs.any_changed == 'true'
uses: astral-sh/ruff-action@v4.0.0
with:
version: "0.15.11"
src: ${{ steps.changed.outputs.all_changed_files }}
- name: ruff format --check
if: steps.changed.outputs.any_changed == 'true'
uses: astral-sh/ruff-action@v4.0.0
with:
version: "0.15.11"
src: ${{ steps.changed.outputs.all_changed_files }}
args: "format --check --diff"
- name: Validate ruff configuration (smoke test)
# Always runs so config-only PRs still catch a broken ruff.toml.
# --exit-zero ignores existing baseline violations; only fails when
# ruff cannot load the config at all.
uses: astral-sh/ruff-action@v4.0.0
with:
version: "0.15.11"
src: "tests/scripts"
args: "check --exit-zero"
@@ -0,0 +1,47 @@
name: Rerun Failure Checks
on:
issue_comment:
types: [created]
jobs:
rerun-checks:
if: "github.event_name == 'issue_comment'&& startsWith(github.event.comment.body, 'rerun ut')"
runs-on: ubuntu-latest
steps:
- name: Is Organization Member
shell: bash
if: "github.event_name == 'issue_comment'"
id: is_organization_member
run: |
response_code=$(curl -sIL -w %{http_code} -H "Authorization: token ${{ secrets.RERUN_BOT_TOKEN }}" -H "Accept: application/vnd.github.v3+json" \
-o /dev/null https://api.github.com/orgs/${GITHUB_REPOSITORY_OWNER}/members/${{ github.event.sender.login }})
echo " response code is ${response_code} "
if [[ ${response_code} == '204' ]];then
echo "::set-output name=is-member::true"
elif [[ ${response_code} == '404' ]]; then
echo "::set-output name=is-member::false"
else
echo "Please check if the repository secret RERUN_BOT_TOKEN still exists and have the permission to read organization membership."
exit 1
fi
- name: Create Comment for Non-Org Member
if: "github.event_name == 'issue_comment' && steps.is_organization_member.outputs.is-member == 'false'"
uses: actions-cool/issues-helper@v2.5.0
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello ${{ github.event.sender.login }}, you are not in the organization, so you do not have the permission to rerun the workflow, please contact `@milvus-io/milvus-maintainers` for help.
- uses: actions/checkout@v2
- name: Rerun Failure Checks
if: "github.event_name == 'issue_comment' && steps.is_organization_member.outputs.is-member == 'true'"
uses: zymap/bot@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # replace here to your token
with:
repo_owner: milvus-io # replace here to your repo owner
repo_name: milvus # replace here to your repo name
rerun_cmd: rerun ut
comment: ${{ github.event.comment.body }}
@@ -0,0 +1,100 @@
name: Update Knowhere Commit
on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
- cron: '0 15 * * *'
jobs:
update-knowhere-commits:
name: update-knowhere-commit
runs-on: ubuntu-latest
env:
OS_NAME: ubuntu20.04
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install GitHub CLI
run: |
sudo apt update
sudo apt install -y gh
- name: Close Previous PRs
run: |
REPO=${{ github.repository }}
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
# Set up GitHub CLI authentication non-interactively
gh auth login --with-token <<< "${{ secrets.ALL_CONTRIBUTORS_TOKEN }}"
BRANCH_PREFIX="update_knowhere_commit_"
prs=$(gh pr list --repo "$REPO" --state open --json number,headRefName --jq ".[] | select(.headRefName | startswith(\"$BRANCH_PREFIX\")) | .number")
for pr in $prs; do
echo "Closing old PR #$pr"
gh pr close $pr --repo "$REPO"
done
env:
GH_TOKEN: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
- name: get knowhere latest commit
id: get-knowhere-latest-commit
run: |
cd ..
rm -fr Knowhere
git clone https://github.com/zilliztech/Knowhere.git
cd Knowhere
export commit=$(git rev-parse --short HEAD)
echo $commit
echo "::set-output name=knowhere-commit::$commit"
cd ../milvus
- name: Update Commit Changes
continue-on-error: true
shell: bash
run: |
sed -i "0,/(\ KNOWHERE_VERSION/ s#( KNOWHERE_VERSION.*#( KNOWHERE_VERSION ${{ steps.get-knowhere-latest-commit.outputs.knowhere-commit }} )#g" internal/core/thirdparty/knowhere/CMakeLists.txt
head -n 17 internal/core/thirdparty/knowhere/CMakeLists.txt
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add internal/core/thirdparty/knowhere/CMakeLists.txt
git commit -m "Update knowhere commit"
- name: Create Pull Request
id: cpr
continue-on-error: true
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
author: sre-ci-robot <sre-ci-robot@users.noreply.github.com>
signoff: true
branch: update_knowhere_commit_${{ github.sha }}
delete-branch: true
title: '[automated] Update Knowhere Commit'
body: |
Update Knowhere Commit
Signed-off-by: sre-ci-robot sre-ci-robot@users.noreply.github.com
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
- name: Send Message To Feishu
env:
ACTIONS_FEISHU_TAG: 'v1.3.1'
INPUT_WEBHOOK: "${{ secrets.FEISHU_WEBHOOK_KNOWHERE_COMMIT_BOT }}"
INPUT_MESSAGE_TYPE: text
INPUT_CONTENT: "Pr url by rebot: ${{ steps.cpr.outputs.pull-request-url }}"
run: |
wget -q https://github.com/xiachufang/actions-feishu/releases/download/${{ env.ACTIONS_FEISHU_TAG }}/linux-amd64-actions-feishu.tar.gz
tar zxf linux-amd64-actions-feishu.tar.gz feishu
./feishu
+71
View File
@@ -0,0 +1,71 @@
name: Weekly Release
on:
schedule:
# * is a special character in YAML so you have to quote this string
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
- cron: '0 0 * * 2,5'
jobs:
nightly:
name: Run Weekly Release
if: github.repository == 'milvus-io/milvus'
runs-on: ubuntu-latest
env:
IMAGE_REPO: "milvusdb"
DEV: "milvus"
WEEKLY: "weekly-build"
TAG_PREFIX: "master-"
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Get the latest of Milvus dev image tag
shell: bash
working-directory: scripts
run: echo "tag=$(./docker_image_find_tag.sh -n ${IMAGE_REPO}/${DEV} -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)" >> $GITHUB_ENV
- name: Pull latest milvus image with tag prefix master-
run: |
docker pull "${IMAGE_REPO}/${DEV}:${{ env.tag }}"
docker tag "${IMAGE_REPO}/${DEV}:${{ env.tag }}" "${IMAGE_REPO}/${WEEKLY}:${{ env.tag }}"
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Docker image
run: |
docker push "${IMAGE_REPO}/${WEEKLY}:${{ env.tag }}"
- name: Set release build
shell: bash
run: |
tag=${{ env.tag }}
IFS=- read branch date sha <<< "$tag"
echo "build=$date" >> $GITHUB_ENV
echo "sha=$(git rev-parse $sha)" >> $GITHUB_ENV
- name: Create a weekly release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: "Image: ${{ env.IMAGE_REPO}}/${{ env.WEEKLY }}:${{ env.tag }}"
prerelease: true
tag_name: "v2.2-testing-${{ env.build }}"
release_name: "milvus-2.2-testing-${{ env.build }}"
commitish: "${{ env.sha }}"
+137
View File
@@ -0,0 +1,137 @@
# CLion generated files
# Git worktrees
.worktrees/
# This can ignore
# cmake-build-debug/
# proxy/cmake-build-debug/
# a/b/c/cmake-build-debug/
**/cmake-build-debug/*
**/cmake-build-debug-coverage/*
**/cmake-build-release/*
**/cmake_build_release/*
**/cmake_build/*
**/CMakeFiles/*
**/.cmake/*
CMakeCache.txt
CMakeUserPresets.json
.cache
coverage_report/
internal/core/output/*
internal/core/build/*
**/.idea/*
internal/msgstream/pulsarms/client-cpp/build/
internal/msgstream/pulsarms/client-cpp/build/*
tests/python_client/default.etcd/
# vscode generated files
.vscode
docker-compose-devcontainer.yml
docker-compose-devcontainer.yml.tmp
.cursor
*.code-workspace
# Docker generated cache file
.docker/
.docker-gpu/
**/_artifacts/**
# proxy
proxy/milvus
proxy/thirdparty/grpc-src
proxy/thirdparty/grpc-build
proxy/milvus/*
proxy/suvlim/
proxy/suvlim/*
proxy-go/proxy-go
# Compiled source
target/
bin/
lib/
*.a
*.so
*.so.*
*.o
*.lo
*.tar.gz
*.log
.coverage
*.pyc
*.log
# macOS generated files & other irrelevant files
.DS_Store
*.sw[po]
cwrapper_build
cwrapper_rocksdb_build/
**/.clangd/*
**/compile_commands.json
**/.lint
typescript
**/.pytest_cache/
.root
gtags.conf
# Delve generated file
**/__debug_bin
# codecov-go generated files
*coverage.txt
profile.out
*coverage.html
cover.out
# codecov-cpp generated files
lcov_*.info
cpp_coverage/
# virtualenv
venv/
.venv/
# Python egg-info
*.egg-info/
# gopls generated
go.work
go.work.sum
# docker compose volumes
deployments/docker/*/volumes
deployments/docker/gpu/*/volumes
# rocksdb
cwrapper_rocksdb_build/
# local file data
**/data/*
!**/tantivy-binding/src/analyzer/data/*
internal/proto/**/*.pb.go
pkg/streaming/**/*.pb.go
internal/core/src/pb/*.pb.h
internal/core/src/pb/*.pb.cc
**/legacypb/*.pb.go
pkg/streaming/proto/**/*.pb.go
#AI rules
WARP.md
.claude/
# Antlr
.antlr
# Gocache
**/.gocache/
docs/plans/
.worktrees/
# agent context
.context/
+265
View File
@@ -0,0 +1,265 @@
version: "2"
run:
go: "1.25"
build-tags:
- dynamic
- test
linters:
default: none
enable:
- decorder
- depguard
- durationcheck
- forbidigo
- gocritic
- gosec
- govet
- ineffassign
- misspell
- revive
- staticcheck
- unconvert
- whitespace
settings:
depguard:
rules:
main:
deny:
- pkg: errors
desc: not allowed, use github.com/cockroachdb/errors
- pkg: github.com/pkg/errors
desc: not allowed, use github.com/cockroachdb/errors
- pkg: github.com/pingcap/errors
desc: not allowed, use github.com/cockroachdb/errors
- pkg: golang.org/x/xerrors
desc: not allowed, use github.com/cockroachdb/errors
- pkg: github.com/go-errors/errors
desc: not allowed, use github.com/cockroachdb/errors
- pkg: io/ioutil
desc: ioutil is deprecated after 1.16, 1.17, use os and io package instead
- pkg: github.com/tikv/client-go/rawkv
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
- pkg: github.com/tikv/client-go/v2/rawkv
desc: not allowed, use github.com/tikv/client-go/v2/txnkv
- pkg: github.com/gogo/protobuf
desc: not allowed, gogo protobuf is deprecated
- pkg: github.com/golang/protobuf/proto
desc: not allowed, protobuf v1 is deprecated, use google.golang.org/protobuf/proto instead
- pkg: github.com/pingcap/log
desc: not allowed, use github.com/milvus-io/milvus/pkg/v3/mlog
- pkg: github.com/milvus-io/milvus/pkg/v3/log
desc: not allowed, use github.com/milvus-io/milvus/pkg/v3/mlog
no-zap-outside-mlog:
files:
- "$all"
- "!pkg/mlog/*.go"
- "!pkg/mlog/**/*.go"
- "!**/pkg/mlog/*.go"
- "!**/pkg/mlog/**/*.go"
# Existing zap usages are tracked as migration baseline. Do not add new zap usages outside pkg/mlog.
- "!**/internal/proxy/accesslog/global.go"
- "!**/internal/streamingnode/server/wal/interceptors/shard/shard_interceptor_test.go"
- "!**/internal/util/cgo/logging/logging.go"
- "!**/internal/util/hookutil/hook.go"
- "!**/pkg/util/replicateutil/util_test.go"
deny:
- pkg: go.uber.org/zap
desc: not allowed outside pkg/mlog, use github.com/milvus-io/milvus/pkg/v3/mlog
forbidigo:
forbid:
- pattern: ^time\.Tick$
- pattern: return merr\.Err[a-zA-Z]+
- pattern: merr\.Wrap\w+\(\)\.Error\(\)
- pattern: '\.(ErrorCode|Reason) = '
- pattern: Reason:\s+\w+\.Error\(\)
- pattern: errors.New\((.+)\.GetReason\(\)\)
- pattern: commonpb\.Status\{[\s\n]*ErrorCode:[\s\n]*.+[\s\S\n]*?\}
- pattern: os\.Open\(.+\)
- pattern: os\.ReadFile\(.+\)
- pattern: os\.WriteFile\(.+\)
- pattern: runtime.NumCPU
- pattern: runtime.GOMAXPROCS(0)
gocritic:
enabled-tags: []
enabled-checks:
- ruleguard
settings:
ruleguard:
rules: rules.go
govet:
enable:
- nilness
disable:
- printf
misspell:
locale: US
revive:
rules:
- name: unused-parameter
disabled: true
- name: var-naming
arguments:
- - ID
- IDS
severity: warning
disabled: false
- name: context-as-argument
arguments:
- allowTypesBefore: '*testing.T'
severity: warning
disabled: false
- name: datarace
severity: warning
disabled: false
- name: duplicated-imports
severity: warning
disabled: false
- name: waitgroup-by-value
severity: warning
disabled: false
- name: indent-error-flow
arguments:
- preserveScope
severity: warning
disabled: false
- name: range-val-in-closure
severity: warning
disabled: false
- name: range-val-address
severity: warning
disabled: false
- name: string-of-int
severity: warning
disabled: false
exclusions:
generated: lax
rules:
- linters:
- forbidigo
path: .+_test\.go
- path: mocks\/(.)+mock_(.+)\.go
text: don't use an underscore in package name
# Keep existing v1 exclusions
- path: (.+)\.go$
text: should have a package comment
- path: (.+)\.go$
text: should have comment
- path: (.+)\.go$
text: should be of the form
- path: (.+)\.go$
text: should not use dot imports
- path: (.+)\.go$
text: which can be annoying to use
- path: (.+)\.go$
text: G102
- path: (.+)\.go$
text: G103
- path: (.+)\.go$
text: G104
- path: (.+)\.go$
text: G301
- path: (.+)\.go$
text: G302
- path: (.+)\.go$
text: G304
- path: (.+)\.go$
text: G307
- path: (.+)\.go$
text: G402
- path: (.+)\.go$
text: G404
- path: (.+)\.go$
text: SA1019
- path: (.+)\.go$
text: SA5001
- path: (.+)\.go$
text: sloppyLen
- path: (.+)\.go$
text: dupSubExpr
- path: (.+)\.go$
text: assignOp
- path: (.+)\.go$
text: ifElseChain
- path: (.+)\.go$
text: elseif
- path: (.+)\.go$
text: commentFormatting
- path: (.+)\.go$
text: exitAfterDefer
- path: (.+)\.go$
text: captLocal
- path: (.+)\.go$
text: singleCaseSwitch
- path: (.+)\.go$
text: typeSwitchVar
- path: (.+)\.go$
text: indent-error-flow
- path: (.+)\.go$
text: appendAssign
- path: (.+)\.go$
text: deprecatedComment
- path: (.+)\.go$
text: SA9009
- path: (.+)\.go$
text: SA1006
- path: (.+)\.go$
text: S1009
- path: (.+)\.go$
text: offBy1
- path: (.+)\.go$
text: unslice
- path: (.+)\.go$
text: G115
paths:
- (^|/)partial_search_test\.go$
- ^build/
- ^configs/
- ^deployments/
- ^docs/
- ^scripts/
- ^internal/core/
- ^cmake_build/
- ^mmap/
- ^data/
- ^ci/
- ^third_party/
- ^builtin/
- ^examples/
issues:
max-issues-per-linter: 0
max-same-issues: 0
formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
settings:
gci:
sections:
- standard
- default
- prefix(github.com/milvus-io)
custom-order: true
gofumpt:
module-path: github.com/milvus-io
goimports:
local-prefixes:
- github.com/milvus-io
exclusions:
generated: lax
paths:
- (^|/)partial_search_test\.go$
- ^build/
- ^configs/
- ^deployments/
- ^docs/
- ^scripts/
- ^internal/core/
- ^cmake_build/
- ^mmap/
- ^data/
- ^ci/
- ^third_party/
- ^builtin/
- ^examples/
+21
View File
@@ -0,0 +1,21 @@
repos:
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.5.0
hooks:
- id: golangci-lint
args: [--config=.golangci.yml, --timeout=3m]
- repo: https://github.com/crate-ci/typos
rev: v1.16.10
hooks:
- id: typos
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.11
hooks:
- id: ruff-check
name: ruff-check (tests/)
args: [--config=tests/ruff.toml, --fix]
files: ^tests/.*\.py$
- id: ruff-format
name: ruff-format (tests/)
args: [--config=tests/ruff.toml]
files: ^tests/.*\.py$
Symlink
+1
View File
@@ -0,0 +1 @@
CLAUDE.md
+113
View File
@@ -0,0 +1,113 @@
# Milvus
Vector database. Go + C++ (internal/core/) + Rust (tantivy).
pkg has its own go.mod (module: `github.com/milvus-io/milvus/pkg/v3`). Run `go get` from `pkg/` when adding dependencies there, not from root.
## Architecture
Coordinators manage metadata and scheduling; nodes execute work.
- Coordinators: rootcoord, datacoord, querycoordv2 (note the v2 suffix in directory names)
- Nodes: proxy (user-facing), querynodev2, datanode, streamingnode
- All component interfaces defined in `internal/types/types.go`
## Subsystems & Code Map
Each subsystem has a **top-level doc** (overview with links to sub-documents) and multiple **sub-documents** (detailed design, invariants, interfaces). The top-level doc alone is NOT sufficient — it is an index, not the content.
### Mandatory reading procedure
When your task modifies, explains, depends on, or affects a subsystem below, execute these steps IN ORDER before responding or writing code:
**Step 1 — Read the top-level doc.** Identify all sub-documents it links to.
**Step 2 — Read sub-documents.** The scope depends on task type:
- **Design tasks** (new feature, architecture change, cross-component change): Read **every** sub-document under the subsystem. No exceptions — design requires full-picture understanding. Do NOT judge relevance yourself; read all of them.
- **Targeted tasks** (bug fix, single-component change, code explanation): Read sub-documents that cover the components your task touches. When uncertain whether a sub-document is relevant, read it.
**Step 3 — Read source code** listed in each doc's "Key Packages" section. At minimum read the files directly related to your task.
**Step 4 — Cross-check** documentation against code. If they contradict, STOP and ask the user to resolve before proceeding.
NEVER answer based on documentation alone or code alone. NEVER skip Step 2 — this is the most common failure mode.
### Subsystems Reference
- [**Streaming System**](docs/agent_guides/streaming-system/streaming-system.md): Write path, WAL, DDL/DCL execution, replication && CDC.
## Testing
Go tests MUST use `-tags dynamic,test` and `-gcflags="all=-N -l"` (disable optimizations/inlining) or they won't compile / mockey-based monkey patching will fail:
```bash
go test -tags dynamic,test -gcflags="all=-N -l" -count=1 ./internal/querycoordv2/...
go test -tags dynamic,test -gcflags="all=-N -l" -count=1 ./internal/proxy/... -run TestXxx
```
Per-module shortcuts: `make test-querycoord`, `make test-proxy`, etc.
## Verification gate (MANDATORY before claiming "done" or pushing for review)
The reading procedure above tells you how to *enter* the code. This tells you how to *prove a change works*. A change is NOT verified by "it compiles + unit tests pass + success-path e2e is green." When the goal of a change is a **behavior** (retry / classification / routing / error-code propagation / fallback / cache invalidation / concurrency), execute these IN ORDER. Skipping them is the most expensive failure mode — it ships changes that are self-consistent but miss their purpose.
**G1 — Verify the data, not just your transform.** If your change adds a function/layer that maps or preserves a value X (an error code, a Status, a category, a flag), you only verified *your function*. Now verify its INPUT. Audit **every** place that constructs, throws, or rewrites X across the **whole repo** — not only the lines you edited. grep the escape hatches: `throw`, `.ToString()`/stringify, blanket fallbacks (catch-all → `Invalid` / `IOError` / `UnexpectedError`). A value destroyed or mis-set upstream makes your boundary logic dead code. Audit at the SOURCE of X, never only at the boundary that consumes it.
**G2 — Trace each real failure mode end-to-end.** Success-path e2e — even thousands of cases — does NOT exercise the failure modes a behavioral change exists for (S3 throttle, corrupt file, OOM, cancel, timeout, not-ready). For EACH one: either trace it by hand from origin → consumer, or fault-inject it, and confirm it lands in the intended bucket. "All green" on the happy path is not evidence the change works; it is only evidence you did not break the happy path.
**G3 — Do not over-claim.** Commit messages and PR body may assert ONLY benefits verified end-to-end via G1+G2. A benefit that depends on un-audited upstream or an un-triggered failure mode must be written as "follow-up" or "preserves codes for observability; retry wiring unverified" — never as achieved. A reviewer will verify your claim against the running system; over-claiming wastes their round.
**G4 — Adversarial self-review before human review.** Before pushing, do one pass asking: which failure mode have I NOT traced to its bucket? which upstream construction site of X have I NOT read? what would an adversarial reviewer grep for? Fix the gaps, or list them explicitly in the PR.
## Run Milvus Locally
```bash
scripts/start_standalone.sh # start standalone mode
scripts/start_cluster.sh # start cluster mode
scripts/stop_graceful.sh # stop
scripts/standalone_embed.sh # embedded standalone (no external deps)
```
## Code Conventions
- Error handling: use `merr` package, not fmt.Errorf — see mandatory procedure below
- Logging: use `github.com/milvus-io/milvus/pkg/v3/mlog` only; do not use `pkg/log`, standard `"log"`, direct `zap`, or `fmt.Println`. Every log call must pass a real `ctx` by priority: function parameter ctx > struct ctx > `context.TODO()`. Refer to [logging.md](docs/agent_guides/observability/logging.md).
- Import order: standard → third-party → github.com/milvus-io (enforced by gci)
- Config params: paramtable (`pkg/v2/util/paramtable`), config in `configs/milvus.yaml`
### Error handling (mandatory when originating, wrapping, or classifying errors)
Read [error_handling_guide.md](docs/dev/error_handling_guide.md) (decision tree,
Input-vs-System) and [error_handling_casebook.md](docs/dev/error_handling_casebook.md)
(the 7 mistake patterns) BEFORE writing the change. Non-negotiable rules:
1. Blame test: is the **request content itself** what forces this branch? → Input factory. A Milvus bug, or an internal/transient failure (not-ready, TOCTOU race), → System factory — even when a correct Milvus does reach it on a valid request (transient errors are System, and must stay retriable). "Looks like validation" is not the test.
2. Add context to an existing error with `merr.Wrap/Wrapf` ONLY — `WrapErrXxxErr(err, …)` masks the inner code; cause never goes into a format string.
3. Before marking anything InputError: grep `retry.Do` consumers. Before converting an `errors.New` sentinel to merr: grep `errors.Is` guards.
4. Pick codes from the existing family ranges in `pkg/util/merr/errors.go` (scan first; see the partition table in [error_sentinel_convention.md](docs/dev/error_sentinel_convention.md)); never hand-pick 20xx segcore codes.
5. Touched a wire projection, oldCode mapping, or metric label? Run the merr guard tests AND a full `make test-go` — contract changes break packages you didn't touch.
6. **C++ side (segcore / milvus-storage / cgo boundary) — the rules above are Go/merr; the same discipline applies in C++, and the verification gate (G1) is non-negotiable here.** The final class is decided at the `ThrowInfo` / `AssertInfo` / `SegcoreError` / arrow-`Status` / `LOON_*` **construction sites**, NOT at the cgo boundary translator. A boundary helper (`KnowhereStatusToErrorCode` / `ArrowStatusToErrorCode` / `LoonResultToErrorCode`) is correct ONLY if its inputs carry the right category — so audit upstream, not the helper. When a code must survive to the cgo boundary, grep every construction/throw/rewrite site and confirm none collapse it: `FailureCStatus` needs a real `SegcoreError` (an `ExecOperatorException` or `throw std::runtime_error(status.ToString())` destroys the code), and an upstream `IOError`-rewritten-as-`Invalid` (or catch-all → `IOError`) silently inverts transient vs permanent. Apply the blame test (rule 1) at EVERY such site, not only the ones you edit.
## PR and Commit Conventions
PR title format: `{type}: {description}`. Valid types: `feat:`, `fix:`, `enhance:`, `test:`, `doc:`, `auto:`, `build(deps):`.
PR body must be non-empty. Issue/doc linking rules:
- `fix:` — must link issue (e.g. `issue: #123`)
- `feat:` — must link issue + design doc under `docs/design-docs`
- Every Milvus feature should have a related design doc under `docs/design-docs`; submit the doc in this repository and link it from the Milvus feature PR.
- `enhance:` — must link issue if size L/XL/XXL
- `doc:`, `test:` — no issue required
- 2.x branch PRs must link the corresponding master PR (e.g. `pr: #123`)
DCO check is required. Always use `-s` so the developer's Signed-off-by is appended last:
```
git commit -s -m "commit message
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>"
```
`-s` auto-appends `Signed-off-by: <developer>` at the end. The developer MUST be the final sign-off, not the AI.
## Generated Files — Do Not Hand-Edit
- Mock files (`internal/mocks/*`, `mock_*.go`): regenerate with `make generate-mockery-{module}`
- Proto files (`pkg/proto/*.pb.go`): regenerate with `make generated-proto-without-cpp`
+47
View File
@@ -0,0 +1,47 @@
# Milvus Code of Conduct
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
- Using welcoming and inclusive language.
- Being respectful of differing viewpoints and experiences.
- Gracefully accepting constructive criticism.
- Focusing on what is best for the community.
- Showing empathy towards other community members.
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or advances.
- Trolling, insulting/derogatory comments, and personal or political attacks.
- Public or private harassment.
- Publishing others' private information, such as a physical or electronic address, without explicit permission.
- Conduct which could reasonably be considered inappropriate for the forum in which it occurs.
All Milvus forums and spaces are meant for professional interactions, and any behavior which could reasonably be considered inappropriate in a professional setting is unacceptable.
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies to all content on milvus.io, Milvuss GitHub organization, or any other official Milvus web presence allowing for community interactions, as well as at all official Milvus events, whether offline or online.
The Code of Conduct also applies within all project spaces and in public spaces whenever an individual is representing Milvus or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed or de facto representative at an online or offline event. Representation of Milvus may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at conduct@lfai.foundation. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq
+82
View File
@@ -0,0 +1,82 @@
# Milvus Code Review Guide
All PRs are checked in automatically by the sre-robot, with the following conditions:
1. DCO check passed
2. All test passed and code coverage check passed, with a `ci-passed` label
- Notes: If there is a `[skip e2e]` tag in the commit message, it skips running e2e tests automatically,
but it still runs UT tests and code checkers.
3. Reviewer passed, with a `/lgtm` label
4. Approver passed, with a `/approve` label
Generally speaking, reviewer is volunteered and can be anyone in the community who is familiar with the packages the PR modifies.
Reviewers are responsible for the logic correctness, error handling, unit test coverage and code readability.
While Approver focuses on overall design, code readability, and ensuring the PR follows code of
conduct(Such as meaningful title and commit message, marked with correct labels, meaningful comments). Currently,
all Approvers are listed under OWNERS_ALIASES file.
## Things to do before review
- Read the title, commit message and related issue of the PR, if it's not easy to understand, ask for improvement
- For a bug fix PR, there should be a detailed bug description in related issue, and make sure the test cases to cover this bug.
- For a function enhancement PR, understand the function use case, make sure the functionality is reasonable.
- For a performance PR, make sure benchmark result is listed in PR.
- Think deeply about why is the solution necessary, any workaround or substitutions?
## Things to check during the review
- Does the code follow style guide?
- Does the code do exactly the same as title and commit message describe?
- Can this function and variable's behavior be inferred by its name?
- Do unit tests cover all the important code branches?
- What about the edge cases and failure handling paths?
- Do we need better layering and abstraction?
- Are there enough comments to understand the intent of the code?
- Are hacks, workarounds and temporary fixes commented?
- If `[skip e2e]` is tagged, is it safe enough to skip running e2e tests?
- Notes: it skips running e2e tests, if there is a `[skip e2e]` in the commit message.
- Does the code will generate similar logs many times in one second?
## Things to keep in mind when you are writing a review comment
- Be kind to the coder, not to the code.
- Ask questions rather than make statements.
- Treat people who know less than you with respect, deference, and patience.
- Remember to praise when the code quality exceeds your expectation.
- It isn't necessarily wrong if the coder's solution is different with yours.
- Community is not only about the product, it is about person. Help others to improve whenever possible.
## For Approvers
Besides All the reviewer's responsibility listed above, Approvers should also maintain code of conduct.
- Be sure the pr has only one commit, author has to do a squash commit in local REPO
- Commit message starts with a capital letter and does not end with punctuation
- Commit message is clear and meaningful. You can only have title without body if the title is self explained
- PR links to the correct issue, which clearly states the problems to be solved and the planned solution
- PR sets kind label
- The variable names appearing in the source code need to be readable. Comments are necessary if it is an unusual abbreviations
Thanks for [Code Review Guide](https://github.com/pingcap/tidb/blob/master/code_review_guide.md) from Pingcap community.
+12
View File
@@ -0,0 +1,12 @@
# Commands to trigger jobs
## Guide
1. The job will be triggered when your comments on pull request matched command.
## Commands
| Command | Description |
| -------------------------|----------------------------------------------------------------------------|
| /run-cpu-e2e | Trigger Jenkins Job for e2e tests based on cpu. |
| rerun ut | Trigger failed github workflow jobs, including code checker & unit tests. |
+18
View File
@@ -0,0 +1,18 @@
committers:
- congqixia
- czs007
- scsven
- xiaofan-luan
- yanliang567
- jiaoew1991
- yhmo
- matrixji
- LoveEachDay
- XuanYang-cn
- JackLCL
- bigsheeper
- chyezh
- xiaocai2333
- weiliu1031
- foxspy
- zhuwenxing
+281
View File
@@ -0,0 +1,281 @@
# Contributing to Milvus
Contributions to Milvus are welcome from everyone. We strive to make the contribution process simple and straightforward. Up-to-date information can be found at [milvus.io](https://milvus.io/).
The following are a set of guidelines for contributing to Milvus. Following these guidelines makes contributing to this project easy and transparent. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
As for everything else in the project, the contributions to Milvus are governed by our [Code of Conduct](CODE_OF_CONDUCT.md).
**Content**
- [Contributing to Milvus](#contributing-to-milvus)
- [What contributions can you make?](#what-contributions-can-you-make)
- [How can you contribute?](#how-can-you-contribute)
- [Contributing code](#contributing-code)
- [GitHub workflow](#github-workflow)
- [Design documents](#design-documents)
- [General guidelines](#general-guidelines)
- [Developer Certificate of Origin (DCO)](#developer-certificate-of-origin-dco)
- [Coding Style](#coding-style)
- [Golang coding style](#golang-coding-style)
- [C++ coding style](#c-coding-style)
- [Run unit test with code coverage](#run-unit-test-with-code-coverage)
- [Golang](#run-golang-unit-tests)
- [C++](#run-c-unit-tests)
- [Commits and PRs](#commits-and-prs)
## What contributions can you make?
| Suitable for | Projects | Resources |
| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Go developers | [milvus](https://github.com/milvus-io/milvus) | |
| CPP developers | [milvus](https://github.com/milvus-io/milvus) | |
| Developers interested in other languages | [pymilvus](https://github.com/milvus-io/pymilvus), [milvus-sdk-node](https://github.com/milvus-io/milvus-sdk-node), [milvus-sdk-java](https://github.com/milvus-io/milvus-sdk-java) | [Contributing to PyMilvus](https://github.com/milvus-io/pymilvus/blob/master/CONTRIBUTING.md) |
| |
| Tech writers and docs enthusiasts | [milvus-docs](https://github.com/milvus-io/milvus-docs) | [Contributing to milvus docs](https://github.com/milvus-io/milvus-docs/blob/v2.0.0/CONTRIBUTING.md) |
| Web developers | [milvus-insight](https://github.com/zilliztech/milvus-insight) | |
## How can you contribute?
### Contributing code
**If you encounter a bug, you can**
- (**Recommended**) File an issue about the bug.
- Provide clear and concrete ways/scripts to reproduce the bug.
- Provide possible solutions for the bug.
- Pull a request to fix the bug.
**If you're interested in existing issues, you can**
- (**Recommended**) Provide answers for issue labeled `question`.
- Provide help for issues labeled `bug`, `improvement`, and `enhancement` by
- (**Recommended**) Ask questions, reproduce the issue, or provide solutions.
- Pull a request to fix the issue.
**If you require a new feature or major enhancement, you can**
- (**Recommended**) File an issue about the feature/enhancement with reasons.
- Provide a [design document](#design-documents) for the feature/enhancement.
- Pull a request to implement the design.
**If you are a reviewer/approver of Milvus, you can**
- Participate in [PR review](CODE_REVIEW.md) process.
- Instruct newcomers in the community to complete the PR process.
If you want to become a contributor of Milvus, submit your pull requests! For those just getting started, see [GitHub workflow](#github-workflow) below.
All submissions will be reviewed as quickly as possible.
There will be a reviewer to review the codes, and an approver to review everything aside the codes, see [code review](CODE_REVIEW.md) for details.
If everything is perfect, the reviewer will label `/lgtm`, and the approver will label `/approve`.
Once the 2 labels are on your PR, and all actions pass, your PR will be merged into base branch automatically by our @sre-ci-robot
### GitHub workflow
Generally, we follow the "fork-and-pull" Git workflow.
* [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the [Milvus repo](https://github.com/milvus-io/milvus/tree/master) on GitHub.
* Clone your fork to your local machine with `git clone git@github.com:<yourname>/milvus.git`.
* Work in your local repo and file a PR.
In your local repo:
1. [Configure](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-repository-for-a-fork) your local repo by adding the remote official repo as upstream.
2. Then you can create a branch, make changes and [commit](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork).
3. Lastly, fetch upstream (and resolve merge conflicts if necessary), rebase and push the changes to origin. You can submit a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) to get your code reviewed.
4. Once getting approved, your code can be merged to `master`, yay!
Here is the process illustrated in details:
![](docs/developer_guides/figs/fork-and-pull.png)
Remember to [sync your forked repository](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#keep-your-fork-synced) _before_ submitting proposed changes upstream. If you have an existing local repository, please update it before you start, to minimize the chance of merge conflicts.
```shell
git remote add upstream git@github.com:milvus-io/milvus.git
git fetch upstream
git checkout upstream/master -b my-topic-branch
```
![](docs/developer_guides/figs/local-develop-steps.png)
### Design documents
Milvus feature pull requests must provide a design document. This applies when the pull request title starts with `feat:` or the pull request is labeled `kind/feature`. Large enhancements that introduce new architecture, storage formats, public behavior, or upgrade impact should also include a design document; reviewers may add `kind/feature` when the design-doc requirement applies.
To satisfy the requirement, do one of the following:
- Add or update the design document in the same pull request as the related implementation.
- Link an existing in-repo design document in the pull request description.
Use this pull request description format when linking an existing document:
```markdown
design doc: docs/design-docs/design_docs/YYYYMMDD-short-descriptive-name.md
```
Design documents must live under `docs/design-docs/design_docs/`. Name each file `YYYYMMDD-short-descriptive-name.md`, keep one design per file, and put images or diagrams under `docs/design-docs/assets/graphs/` or `docs/design-docs/assets/images/`. External design-doc repository links do not satisfy this requirement. Mergify adds the `do-not-merge/missing-design-doc` label to feature PRs until this requirement is met.
Start each design document with a clear title and metadata block:
```markdown
# MEP: <Title>
- **Created:** YYYY-MM-DD
- **Author(s):** @github-handle
- **Status:** Draft | Under Review | Approved | Implemented | Deprecated
- **Component:** DataNode | QueryNode | Proxy | Coordinator | Storage | Index | SDK | Other
- **Related Issues:** #xxx
- **Released:** Milvus release version, if applicable
```
Every design document should explain the problem, the proposed design, and how the design will be verified. Use these sections:
- **Summary:** Briefly describe the change.
- **Motivation:** Explain the user problem, operational problem, or architectural limitation being solved.
- **Public Interfaces:** List API, proto, SDK, config, metrics, or behavior changes that users or other components will observe.
- **Design Details:** Describe the architecture, data flow, component responsibilities, persistence/metadata changes, and important failure cases.
- **Compatibility, Deprecation, and Migration Plan:** Call out upgrade, rollback, data-format, API compatibility, and migration impact.
- **Test Plan:** Describe unit, integration, E2E, upgrade, performance, or failure-injection tests needed to prove the design works.
- **Rejected Alternatives:** Record meaningful alternatives and why they were not chosen.
- **References:** Link related issues, pull requests, previous designs, or external references.
Update the design document when review changes the approach, so the merged document matches the implementation.
### General guidelines
Before submitting your pull requests for review, make sure that your changes are consistent with the [coding style](CONTRIBUTING.md#coding-style), and run [unit tests](CONTRIBUTING.md#run-unit-test-with-code-coverage) to check your code coverage rate.
- Include unit tests when you contribute new features, as they help to prove that your code works correctly, and also guard against future breaking changes to lower the maintenance cost.
- Bug fixes also require unit tests, because the presence of bugs usually indicates insufficient test coverage.
- Keep API compatibility in mind when you change code in Milvus. Reviewers of your pull request will comment on any API compatibility issues.
- When you contribute a new feature to Milvus, the maintenance burden is (by default) transferred to the Milvus team. This means that the benefit of the contribution must be compared against the cost of maintaining the feature.
### Developer Certificate of Origin (DCO)
All contributions to this project must be accompanied by acknowledgment of, and agreement to, the [Developer Certificate of Origin](https://developercertificate.org/). Acknowledgment of and agreement to the Developer Certificate of Origin _must_ be included in the comment section of each contribution and _must_ take the form of `Signed-off-by: {{Full Name}} <{{email address}}>` (without the `{}`). Contributions without this acknowledgment will be required to add it before being accepted. If contributors are unable or unwilling to agree to the Developer Certificate of Origin, their contribution will not be included.
Contributors sign-off that they adhere to DCO by adding the following Signed-off-by line to commit messages:
```text
This is my commit message
Signed-off-by: Random J Developer <random@developer.example.org>
```
Git also has a `-s` command line option to append this automatically to your commit message:
```shell
$ git commit -s -m 'This is my commit message'
```
## Coding Style
Keeping a consistent style for code, code comments, commit messages, and PR descriptions will greatly accelerate your PR review process.
We highly recommend you refer to and comply to the following style guides when you put together your pull requests:
### Golang coding style
- Coding style: refer to the [Effictive Go Style Guide](https://golang.org/doc/effective_go)
We also use `golangci-lint` to perform code check. Run the following command before submitting your pull request and make sure there is no issue reported:
```shell
$ make static-check
```
To format code
```shell
$ make fmt
```
### C++ coding style
The C++ coding style used in Milvus generally follows [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html).
We made the following changes based on the guide:
- 4 spaces for indentation
- Adopt .cpp file extension instead of .cc extension
- 120-character line length
- Camel-Cased file names
Install clang-format
```shell
$ sudo apt-get install clang-format
```
Check code style
```shell
$ make cppcheck
```
## Run unit test with code coverage
Before submitting your Pull Request, make sure you have run unit test, and your code coverage rate is >= 90%.
### Run golang unit tests
You can run all the Golang unit tests using make.
```shell
$ make test-go
```
You can also run unit tests in package level.
```shell
# run unit tests in datanode package
$ go test ./internal/datanode -cover
ok github.com/milvus-io/milvus/internal/datanode 3.874s coverage: 88.2% of statements
```
You can run a sub unit test.
In this case, we are only concerned about the tests with name "SegmentReplica" and
sub tests with name "segmentFlushed". When running sub tests, the coverage is not concerned.
```shell
$ go test ./internal/datanode -run SegmentReplica/segmentFlushed
ok github.com/milvus-io/milvus/internal/datanode 0.019s
```
### Using mockery
It is recommended to use [Mockery](https://github.com/vektra/mockery) to generate mock implementations for unit test dependencies.
If your PR changes any interface definition, you shall run following commands to update all mockery implemented type before submitting it:
```shell
make generate-mockery
```
If your PR adds any new interface and related mockery types, please add a new entry under proper [Makefile](Makefile) `generate-mockery-xxx` command.
```Makefile
generate-mockery-xxx: getdeps
# ...
# other mockery generation commands
# use mockery under $(INSTALL_PATH) to unify mockery binary version
$(INSTALL_PATH)/mockery --name=NewInterface ...
```
### Run C++ unit tests
Install lcov
```shell
$ sudo apt-get install lcov
```
Run unit test and generate code for code coverage check
```shell
$ make codecov-cpp
```
## Commits and PRs
- Commit message and PR description style: refer to [good commit messages](https://chris.beams.io/posts/git-commit)
+569
View File
@@ -0,0 +1,569 @@
# Development
This document will help to set up your Milvus development environment and to run tests. Please [file an issue](https://github.com/milvus-io/milvus/issues/new/choose) if there's a problem.
# Table of contents
- [Development](#development)
- [Table of contents](#table-of-contents)
- [Quick Start](#quick-start)
- [Building Milvus with Docker](#building-milvus-with-docker)
- [Building Milvus on a local OS/shell environment](#building-milvus-on-a-local-osshell-environment)
- [Hardware Requirements](#hardware-requirements)
- [Software Requirements](#software-requirements)
- [Supported Platforms](#supported-platforms)
- [Prerequisites](#prerequisites)
- [Installing Dependencies](#installing-dependencies)
- [Caveats](#caveats)
- [CMake \& Conan](#cmake--conan)
- [Go](#go)
- [Docker \& Docker Compose](#docker--docker-compose)
- [Building Milvus](#building-milvus)
- [A Quick Start for Testing Milvus](#a-quick-start-for-testing-milvus)
- [Pre-submission Verification](#pre-submission-verification)
- [Unit Tests](#unit-tests)
- [Code coverage](#code-coverage)
- [E2E Tests](#e2e-tests)
- [Test on local branch](#test-on-local-branch)
- [With Linux and MacOS](#with-linux-and-macos)
- [With docker](#with-docker)
- [GitHub Flow](#github-flow)
- [FAQs](#faqs)
## Quick Start
For a clean machine, you can build Milvus with just 2 commands:
```bash
# Step 1: Install Go (>= 1.21) first, then install all dependencies
./scripts/install_deps.sh
# Step 2: Build Milvus
make
```
The compiled binary will be at `bin/milvus`.
## Building Milvus with Docker
Our official Milvus versions are releases as Docker images. To build Milvus Docker on your own, please follow [these instructions](https://github.com/milvus-io/milvus/blob/master/build/README.md).
## Building Milvus on a local OS/shell environment
The details below outline the hardware and software requirements for building on Linux and MacOS.
### Hardware Requirements
The following specification (either physical or virtual machine resources) is recommended for Milvus to build and run from source code.
```yaml
- 8GB of RAM
- 50GB of free disk space
```
### Software Requirements
#### Supported Platforms
| Platform | Versions | Architecture | Notes |
|----------|----------|--------------|-------|
| macOS | 12, 13, 14, 15 | Intel (x86_64), Apple Silicon (arm64) | Requires Homebrew |
| Ubuntu | 20.04, 22.04, 24.04 | x86_64, arm64 | |
| Rocky Linux | 9 | x86_64, arm64 | RHEL compatible |
| Amazon Linux | 2023 | x86_64, arm64 | |
| CentOS | 7 (legacy) | x86_64 | EOL, use Rocky Linux instead |
#### Prerequisites
**Compiler Requirements:**
| Platform | Compiler | Supported Versions |
|----------|----------|-------------------|
| macOS | LLVM/Clang | 15, 16, 17 |
| Linux | GCC | 11, 12, 13, 14 |
**Tool Requirements:**
| Tool | Minimum Version | Notes |
|------|----------------|-------|
| Go | 1.21 | Required. Install from https://go.dev/dl/ |
| CMake | 3.26 | Auto-installed by install_deps.sh |
| Conan | 2.25.1 | Auto-installed by install_deps.sh |
| Rust | 1.92 | Auto-installed by install_deps.sh |
### Compiler Setup
You can use Vscode to integrate C++ and Go together. Please replace user.settings file with below configs:
```json
{
"go.toolsEnvVars": {
"PKG_CONFIG_PATH": "${env:PKG_CONFIG_PATH}:${workspaceFolder}/internal/core/output/lib/pkgconfig:${workspaceFolder}/internal/core/output/lib64/pkgconfig",
"LD_LIBRARY_PATH": "${env:LD_LIBRARY_PATH}:${workspaceFolder}/internal/core/output/lib:${workspaceFolder}/internal/core/output/lib64",
"RPATH": "${env:RPATH}:${workspaceFolder}/internal/core/output/lib:${workspaceFolder}/internal/core/output/lib64"
},
"go.testEnvVars": {
"PKG_CONFIG_PATH": "${env:PKG_CONFIG_PATH}:${workspaceFolder}/internal/core/output/lib/pkgconfig:${workspaceFolder}/internal/core/output/lib64/pkgconfig",
"LD_LIBRARY_PATH": "${env:LD_LIBRARY_PATH}:${workspaceFolder}/internal/core/output/lib:${workspaceFolder}/internal/core/output/lib64",
"RPATH": "${env:RPATH}:${workspaceFolder}/internal/core/output/lib:${workspaceFolder}/internal/core/output/lib64"
},
"go.buildFlags": [
"-ldflags=-r=${workspaceFolder}/internal/core/output/lib"
],
"terminal.integrated.env.linux": {
"PKG_CONFIG_PATH": "${env:PKG_CONFIG_PATH}:${workspaceFolder}/internal/core/output/lib/pkgconfig:${workspaceFolder}/internal/core/output/lib64/pkgconfig",
"LD_LIBRARY_PATH": "${env:LD_LIBRARY_PATH}:${workspaceFolder}/internal/core/output/lib:${workspaceFolder}/internal/core/output/lib64",
"RPATH": "${env:RPATH}:${workspaceFolder}/internal/core/output/lib:${workspaceFolder}/internal/core/output/lib64"
},
"go.useLanguageServer": true,
"gopls": {
"formatting.gofumpt": true
},
"go.formatTool": "gofumpt",
"go.lintTool": "golangci-lint",
"go.testTags": "test,dynamic",
"go.testTimeout": "10m"
}
```
#### Installing Dependencies
In the Milvus repository root, simply run:
```bash
./scripts/install_deps.sh
```
This script will:
- Detect your OS and version automatically
- Install the appropriate compiler (LLVM on macOS, GCC on Linux)
- Install CMake, Ninja, ccache, and other build tools
- Install Conan package manager
- Install Rust toolchain
#### Caveats
- [Google Test](https://github.com/google/googletest.git) is automatically cloned from GitHub, which in some case could conflict with your local google test library.
Once you have finished, confirm that the compiler is installed:
```shell
# On macOS
clang --version
# On Linux
gcc --version
```
#### CMake & Conan
The algorithm library of Milvus, Knowhere is written in c++. CMake is required in the Milvus compilation. If you don't have it, please follow the instructions in the [Installing CMake](https://cmake.org/install/).
Confirm that cmake is available:
```shell
cmake --version
```
Note: CMake 3.26 or higher is required to build Milvus.
Milvus uses Conan to manage third-party dependencies for c++.
Install Conan:
```shell
pip install conan==2.25.1
```
##### Working on master and release-2.5 / release-2.6 on the same machine
The release-2.5 and release-2.6 branches still use Conan 1.x, while master
requires Conan 2.x. If you switch between branches on the same machine, keep
Conan 2.x as your default `conan` and install Conan 1.x alongside with a
`-1` suffix via `pipx`:
```shell
# Default conan stays 2.x (as above)
pipx install conan==2.25.1
# Add Conan 1.x for release-2.5 / release-2.6 work
pipx install conan==1.66.0 --suffix=-1
```
Then build as usual:
```shell
# master: uses the default conan (2.x), no override needed
make
# release-2.5 / release-2.6: point at the 1.x binary
CONAN_CMD=conan-1 make
# Or export once per shell session:
# export CONAN_CMD=conan-1
# make
```
If `CONAN_CMD` is unset, the build scripts fall back to the default `conan`
binary on your `PATH`, preserving the existing behavior.
#### Go
Milvus is written in [Go](http://golang.org/). If you don't have a Go development environment, please follow the instructions in the [Go Getting Started guide](https://golang.org/doc/install).
Confirm that your `GOPATH` and `GOBIN` environment variables are correctly set as detailed in [How to Write Go Code](https://golang.org/doc/code.html) before proceeding.
```shell
go version
```
Note: Go >= 1.21 is required to build Milvus.
#### Docker & Docker Compose
Milvus depends on etcd, Pulsar and MinIO. Using Docker Compose to manage these is an easy way in local development. To install Docker and Docker Compose in your development environment, follow the instructions from the Docker website below:
- Docker: <https://docs.docker.com/get-docker/>
- Docker Compose: <https://docs.docker.com/compose/install/>
### Building Milvus
(Note: if you are building Milvus on an operating system that uses large memory page size, ensure the MILVUS_JEMALLOC_LG_PAGE configuration variable is adjusted in the build script. For step-by-step guidance, refer to the FAQs section.)
To build the Milvus project, run the following command:
```shell
make
```
Milvus uses `conan` to manage 3rd-party dependencies. `conan` will check the consistency of these dependencies every time you run `make`. This process can take a considerable amount of time, especially if the network is poor. If you make sure that the 3rd-party dependencies are consistent, you can use the following command to skip this step:
```shell
make SKIP_3RDPARTY=1
```
If this command succeeds, you will now have an executable at `bin/milvus` in your Milvus project directory.
If you want to run the `bin/milvus` executable on the host machine, you need to set `LD_LIBRARY_PATH` temporarily:
```shell
# Linux
LD_LIBRARY_PATH=./internal/core/output/lib:lib:$LD_LIBRARY_PATH ./bin/milvus
# macOS
DYLD_LIBRARY_PATH=./internal/core/output/lib:lib:$DYLD_LIBRARY_PATH ./bin/milvus
```
If you want to update proto file before `make`, we can use the following command:
```shell
make generated-proto-go
```
If you want to know more, you can read Makefile.
## A Quick Start for Testing Milvus
### Pre-submission Verification
Pre-submission verification provides a battery of checks and tests to give your pull request the best chance of being accepted. Developers need to run as many verification tests as possible locally.
To run all pre-submission verification tests, use this command:
```shell
make verifiers
```
### Unit Tests
It is required that all pull request candidates should pass all Milvus unit tests.
Before running unit tests, you need to first bring up the Milvus deployment environment.
You may set up a local docker environment with our docker compose yaml file to start unit testing.
For Apple Silicon users (Apple M1):
```shell
cd deployments/docker/dev
docker compose -f docker-compose-apple-silicon.yml up -d
cd ../../../
make unittest
```
The Apple Silicon compose file uses the Milvus Harbor Docker Hub proxy for
Pulsar by default. To pull Pulsar directly from Docker Hub instead, set
`PULSAR_IMAGE=milvusdb/pulsar:v2.8.2-m1`.
For others:
```shell
cd deployments/docker/dev
docker compose up -d
cd ../../../
make unittest
```
To run only cpp test:
```shell
make test-cpp
```
To run only go test:
```shell
make test-go
```
To run a single test case (TestSearchTask in /internal/proxy directory, for example):
```shell
source scripts/setenv.sh && go test -v ./internal/proxy/ -test.run TestSearchTask
```
If using Mac with M1 chip
```
source scripts/setenv.sh && go test -tags=dynamic -v ./internal/proxy/ -test.run TestSearchTask
```
### Code coverage
Before submitting your pull request, make sure your code change is covered by unit test. Use the following commands to check code coverage rate:
Run unit test and generate code coverage report:
```shell
make codecov
```
This command will generate html report for Golang and C++ respectively.
For Golang report, open the `go_coverage.html` under milvus project path.
For C++ report, open the `cpp_coverage/index.html` under milvus project path.
You also can generate Golang coverage report by:
```shell
make codecov-go
```
Or C++ coverage report by:
```shell
make codecov-cpp
```
### E2E Tests
Milvus uses Python SDK to write test cases to verify the correctness of Milvus functions. Before running E2E tests, you need a running Milvus. There are two modes of operation to build Milvus — Milvus Standalone and Milvus Cluster. Milvus Standalone operates independently as a single instance. Milvus Cluster operates across multiple nodes. All milvus instances are clustered together to form a unified system to support larger volumes of data and higher traffic loads.
Both include three components:
1. Milvus: The core functional component.
2. Etcd: The metadata engine. Access and store metadata of Milvus' internal components.
3. MinIO: The storage engine. Responsible for data persistence for Milvus.
Milvus Cluster includes further component — Pulsar, to be distributed through Pub/Sub mechanism.
```shell
# Running Milvus cluster
$ cd deployments/docker/dev
$ docker compose up -d
$ cd ../../../
$ ./scripts/start_cluster.sh
# Or running Milvus standalone
$ cd deployments/docker/dev
$ docker compose up -d
$ cd ../../../
$ ./scripts/start_standalone.sh
```
To run E2E tests, use these commands:
```shell
cd tests/python_client
pip install -r requirements.txt
pytest --tags=L0 -n auto
```
### Test on local branch
#### With Linux and MacOS
After preparing deployment environment, we can start the cluster on your host machine
```shell
./scripts/start_cluster.sh
```
#### With docker
start the cluster on your host machine
```shell
$ ./build/builder.sh make install // build milvus
$ ./build/build_image.sh // build milvus latest docker image
$ docker images // check if milvus latest image is ready
REPOSITORY TAG IMAGE ID CREATED SIZE
milvusdb/milvus latest 63c62ff7c1b7 52 minutes ago 570MB
```
## GitHub Flow
To check out code to work on, please refer to the [GitHub Flow](https://guides.github.com/introduction/flow/).
## FAQs
Q: The go building phase fails on Apple Silicon (Mac M1) machines.
A: Please double-check that you have [right Go version](https://go.dev/dl/) installed, i.e. with OS=macOS and Arch=ARM64.
---
Q: "make" fails with "_ld: library not found for -lSystem_" on MacOS.
A: There are a couple of things you could try:
1. Use **Software Update** (from **About this Mac** -> **Overview**) to install updates.
2. Try the following commands:
```bash
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
```
---
Q: Rocksdb fails to compile with "_ld: warning: object file was built for newer macOS version (11.6) than being linked (11.0)._" on MacOS.
A: Use **Software Update** (from **About this Mac** -> **Overview**) to install updates.
---
Q: Some Go unit tests failed.
A: We are aware that some tests can be flaky occasionally. If there's something you believe is abnormal (i.e. tests that fail every single time). You are more than welcome to [file an issue](https://github.com/milvus-io/milvus/issues/new/choose)!
---
Q: Brew: Unexpected Disconnect while reading sideband packet
```bash
==> Tapping homebrew/core
remote: Enumerating objects: 1107077, done.
remote: Counting objects: 100% (228/228), done.
remote: Compressing objects: 100% (157/157), done.
error: 545 bytes of body are still expected.44 MiB | 341.00 KiB/s
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: index-pack failed
Failed during: git fetch --force origin refs/heads/master:refs/remotes/origin/master
```
A: try to increase http post buffer
```bash
git config --global http.postBuffer 1M
```
---
Q: Brew: command not found" after installation
A: set up git config
```bash
git config --global user.email xxx
git config --global user.name xxx
```
---
Q: Docker: error getting credentials - err: exit status 1, out: ``
A: removing "credsStore":from ~/.docker/config.json
---
Q: ModuleNotFoundError: No module named 'imp'
A: Python 3.12 has removed the imp module, please downgrade to 3.11 for now.
---
Q: Conan: Unrecognized arguments: — install-folder conan
A: The version is not correct. Please use Conan 2.25.1.
---
Q: Conan command not found
A: Fixed by exporting Python bin PATH in your bash:
```bash
export PATH="$HOME/.local/bin:$PATH"
```
---
Q: LLVM: use of undeclared identifier 'kSecFormatOpenSSL'
A: This is a known issue on macOS 15+. Try using a newer version of LLVM:
```bash
brew install llvm@17
```
The build scripts will automatically detect and use LLVM 15-17.
---
Q: The binary fails to open on my OS with the error "Unsupported system page size"?
A: This occurs when your OS uses a large memory page size, which must be explicitly declared during compilation. Follow these steps to resolve it:
First, check your OS page size by running the following command:
```bash
getconf PAGESIZE
```
If the output is 65536, your system uses 64KB pages.
The `MILVUS_JEMALLOC_LG_PAGE` variable's primary function is to specify the size of large pages during the compilation of jemalloc. Jemalloc is a memory allocator designed to enhance the performance and efficiency of applications in a multi-threaded environment. By specifying the size of large pages, memory management and access can be optimized, thereby improving performance.
Large page support allows the operating system to manage and allocate memory in larger blocks, reducing the number of page table entries, thereby decreasing the time for page table lookups and improving the efficiency of memory access. This is particularly important when processing large amounts of data, as it can significantly reduce page faults and Translation Lookaside Buffer (TLB) misses, enhancing application performance.
On ARM64 architectures, different systems may support different page sizes, such as 4KB and 64KB. The `MILVUS_JEMALLOC_LG_PAGE` setting allows developers to customize the compilation of jemalloc for the target platform, ensuring it can efficiently operate on systems with varying page sizes. By specifying the `--with-lg-page` configuration option, jemalloc can utilize the optimal page size supported by the system when managing memory.
For example, if a system supports a 64KB page size, by setting `MILVUS_JEMALLOC_LG_PAGE` to the corresponding value (the power of 2, 64KB is 2 to the 16th power, so the value is 16), jemalloc can allocate and manage memory in 64KB units, which can improve the performance of applications running on that system.
Modify the make configuration file, located at: `./milvus/scripts/core_build.sh`, with the following changes:
```diff
arch=$(uname -m)
CMAKE_CMD="cmake \
${CMAKE_EXTRA_ARGS} \
-DBUILD_UNIT_TEST=${BUILD_UNITTEST} \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_CUDA_COMPILER=${CUDA_COMPILER} \
-DCMAKE_LIBRARY_ARCHITECTURE=${arch} \
-DBUILD_COVERAGE=${BUILD_COVERAGE} \
-DMILVUS_GPU_VERSION=${GPU_VERSION} \
-DMILVUS_CUDA_ARCH=${CUDA_ARCH} \
-DEMBEDDED_MILVUS=${EMBEDDED_MILVUS} \
-DBUILD_DISK_ANN=${BUILD_DISK_ANN} \
+ -DMILVUS_JEMALLOC_LG_PAGE=16 \
-DUSE_ASAN=${USE_ASAN} \
-DUSE_DYNAMIC_SIMD=${USE_DYNAMIC_SIMD} \
-DCPU_ARCH=${CPU_ARCH} \
-DINDEX_ENGINE=${INDEX_ENGINE} \
-DENABLE_GCP_NATIVE=${ENABLE_GCP_NATIVE} \
-DENABLE_AZURE_FS=${ENABLE_AZURE_FS} "
CMAKE_CMD=${CMAKE_CMD}"${CPP_SRC_DIR}"
```
Using `-DMILVUS_JEMALLOC_LG_PAGE=16` as a compilation option for jemalloc is because it specifies the size of "large pages" as 2 to the 16th power bytes, which equals 65536 bytes or 64KB. This value is set to optimize memory management and improve performance, especially on systems that support or prefer using large pages to reduce the overhead of page table management.
Specifying `-DMILVUS_JEMALLOC_LG_PAGE=16` during the compilation of jemalloc informs jemalloc to assume the system's large page size is 64KB. This allows jemalloc to work more efficiently with the operating system's memory manager, using large pages to optimize performance. This is crucial for ensuring optimal performance on systems with different default page sizes, particularly in environments that might have different memory management needs due to varying hardware or system configurations.
+201
View File
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed 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.
+10
View File
@@ -0,0 +1,10 @@
maintainers:
- congqixia
- czs007
- wxyucs
- xiaofan-luan
- yanliang567
- jiaoew1991
- tedxu
- liliu-z
- zhengbuqian
+598
View File
@@ -0,0 +1,598 @@
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
#
# Licensed 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.
GO ?= go
PWD := $(shell pwd)
GOPATH := $(shell $(GO) env GOPATH)
SHELL := /bin/bash
OBJPREFIX := "github.com/milvus-io/milvus/cmd/milvus"
MILVUS_GO_BUILD_TAGS := "dynamic,sonic,with_jemalloc"
INSTALL_PATH := $(PWD)/bin
LIBRARY_PATH := $(PWD)/lib
PGO_PATH := $(PWD)/configs/pgo
OS := $(shell uname -s)
mode = Release
# Set disk_index default based on OS
# macOS (Darwin) does not support aio, so disable disk_index
ifeq ($(OS),Darwin)
use_disk_index = OFF
else
use_disk_index = ON
endif
# Allow manual override via disk_index variable
ifdef disk_index
use_disk_index = ${disk_index}
endif
use_asan = OFF
ifeq ($(USE_ASAN), ON)
use_asan = ${USE_ASAN}
CGO_LDFLAGS += -fno-stack-protector -fno-omit-frame-pointer -fno-var-tracking -fsanitize=address
CGO_CFLAGS += -fno-stack-protector -fno-omit-frame-pointer -fno-var-tracking -fsanitize=address
MILVUS_GO_BUILD_TAGS := $(MILVUS_GO_BUILD_TAGS),use_asan
endif
use_dynamic_simd = ON
ifdef USE_DYNAMIC_SIMD
use_dynamic_simd = ${USE_DYNAMIC_SIMD}
endif
tantivy_features = ""
ifdef TANTIVY_FEATURES
tantivy_features = ${TANTIVY_FEATURES}
endif
use_svs = OFF
ifdef USE_SVS
use_svs = ${USE_SVS}
endif
# FIPS: default OFF. Set MILVUS_FIPS_ENABLED=ON to enable BoringCrypto.
GOEXPERIMENT_FLAG :=
ifeq ($(MILVUS_FIPS_ENABLED),ON)
GOEXPERIMENT_FLAG := GOEXPERIMENT=boringcrypto
endif
# golangci-lint
GOLANGCI_LINT_VERSION := 2.11.3
GOLANGCI_LINT_OUTPUT := $(shell $(INSTALL_PATH)/golangci-lint --version 2>/dev/null)
INSTALL_GOLANGCI_LINT := $(findstring $(GOLANGCI_LINT_VERSION), $(GOLANGCI_LINT_OUTPUT))
# mockery
MOCKERY_VERSION := 2.53.3
MOCKERY_OUTPUT := $(shell $(INSTALL_PATH)/mockery --version 2>/dev/null)
INSTALL_MOCKERY := $(findstring $(MOCKERY_VERSION),$(MOCKERY_OUTPUT))
# gci
GCI_VERSION := 0.11.2
GCI_OUTPUT := $(shell $(INSTALL_PATH)/gci --version 2>/dev/null)
INSTALL_GCI := $(findstring $(GCI_VERSION),$(GCI_OUTPUT))
# gofumpt
GOFUMPT_VERSION := 0.5.0
GOFUMPT_OUTPUT := $(shell $(INSTALL_PATH)/gofumpt --version 2>/dev/null)
INSTALL_GOFUMPT := $(findstring $(GOFUMPT_VERSION),$(GOFUMPT_OUTPUT))
# gotestsum
GOTESTSUM_VERSION := 1.13.0
GOTESTSUM_OUTPUT := $(shell $(INSTALL_PATH)/gotestsum --version 2>/dev/null)
INSTALL_GOTESTSUM := $(findstring $(GOTESTSUM_VERSION),$(GOTESTSUM_OUTPUT))
# protoc-gen-go
PROTOC_GEN_GO_VERSION := 1.33.0
PROTOC_GEN_GO_OUTPUT := $(shell echo | $(INSTALL_PATH)/protoc-gen-go --version 2>/dev/null)
INSTALL_PROTOC_GEN_GO := $(findstring $(PROTOC_GEN_GO_VERSION),$(PROTOC_GEN_GO_OUTPUT))
# protoc-gen-go-grpc
PROTOC_GEN_GO_GRPC_VERSION := 1.3.0
PROTOC_GEN_GO_GRPC_OUTPUT := $(shell echo | $(INSTALL_PATH)/protoc-gen-go-grpc --version 2>/dev/null)
INSTALL_PROTOC_GEN_GO_GRPC := $(findstring $(PROTOC_GEN_GO_GRPC_VERSION),$(PROTOC_GEN_GO_GRPC_OUTPUT))
index_engine = knowhere
# Ensure git works inside containers where .git is owned by a different user.
# Must use git config --global because git's ownership check runs before
# both -c options and GIT_CONFIG_COUNT env vars are processed.
$(shell git config --global --add safe.directory '*' 2>/dev/null)
export GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD 2>/dev/null | grep -v '^HEAD$$' || echo "$${GITHUB_REF_NAME:-$${BRANCH_NAME:-unknown}}")
GIT_BRANCH_SAFE=$(shell echo "$(GIT_BRANCH)" | tr '/' '-')
ifeq (${ENABLE_AZURE}, false)
AZURE_OPTION := -Z
endif
milvus: build-cpp print-build-info build-go
build-go:
@echo "Building Milvus ..."
@source $(PWD)/scripts/setenv.sh && \
mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="1" && \
$(GOEXPERIMENT_FLAG) CGO_LDFLAGS="$(CGO_LDFLAGS)" CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=on $(GO) build -pgo=$(PGO_PATH)/default.pgo -ldflags="-r $${RPATH} -X '$(OBJPREFIX).BuildTags=$(BUILD_TAGS)' -X '$(OBJPREFIX).BuildTime=$(BUILD_TIME)' -X '$(OBJPREFIX).GitCommit=$(GIT_COMMIT)' -X '$(OBJPREFIX).GoVersion=$(GO_VERSION)' -X '$(OBJPREFIX).MilvusVersion=$(MILVUS_VERSION)'" \
-tags $(MILVUS_GO_BUILD_TAGS) -o $(INSTALL_PATH)/milvus $(PWD)/cmd/main.go 1>/dev/null
milvus-gpu: build-cpp-gpu print-gpu-build-info
@echo "Building Milvus-gpu ..."
@source $(PWD)/scripts/setenv.sh && \
mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="1" && \
CGO_LDFLAGS="$(CGO_LDFLAGS)" CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=on $(GO) build -pgo=$(PGO_PATH)/default.pgo -ldflags="-r $${RPATH} -X '$(OBJPREFIX).BuildTags=$(BUILD_TAGS_GPU)' -X '$(OBJPREFIX).BuildTime=$(BUILD_TIME)' -X '$(OBJPREFIX).GitCommit=$(GIT_COMMIT)' -X '$(OBJPREFIX).GoVersion=$(GO_VERSION)' -X '$(OBJPREFIX).MilvusVersion=$(MILVUS_VERSION)'" \
-tags "$(MILVUS_GO_BUILD_TAGS),cuda" -o $(INSTALL_PATH)/milvus $(PWD)/cmd/main.go 1>/dev/null
get-build-deps:
@(env bash $(PWD)/scripts/install_deps.sh)
# attention: upgrade golangci-lint should also change Dockerfiles in build/docker/builder/cpu/<os>
getdeps:
@mkdir -p $(INSTALL_PATH)
@if [ -z "$(INSTALL_GOLANGCI_LINT)" ]; then \
echo "Installing golangci-lint into ./bin/" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(INSTALL_PATH) v${GOLANGCI_LINT_VERSION} ; \
else \
echo "golangci-lint v@$(GOLANGCI_LINT_VERSION) already installed"; \
fi
@if [ -z "$(INSTALL_MOCKERY)" ]; then \
echo "Installing mockery v$(MOCKERY_VERSION) to ./bin/" && GOBIN=$(INSTALL_PATH) go install github.com/vektra/mockery/v2@v$(MOCKERY_VERSION); \
else \
echo "Mockery v$(MOCKERY_VERSION) already installed"; \
fi
@if [ -z "$(INSTALL_GOTESTSUM)" ]; then \
echo "Install gotestsum v$(GOTESTSUM_VERSION) to ./bin/" && GOBIN=$(INSTALL_PATH) go install -ldflags="-X 'gotest.tools/gotestsum/cmd.version=$(GOTESTSUM_VERSION)'" gotest.tools/gotestsum@v$(GOTESTSUM_VERSION); \
else \
echo "gotestsum v$(GOTESTSUM_VERSION) already installed";\
fi
get-proto-deps:
@mkdir -p $(INSTALL_PATH) # make sure directory exists
@if [ -z "$(INSTALL_PROTOC_GEN_GO)" ]; then \
echo "install protoc-gen-go $(PROTOC_GEN_GO_VERSION) to $(INSTALL_PATH)" && GOBIN=$(INSTALL_PATH) go install google.golang.org/protobuf/cmd/protoc-gen-go@v$(PROTOC_GEN_GO_VERSION); \
else \
echo "protoc-gen-go@v$(PROTOC_GEN_GO_VERSION) already installed";\
fi
@if [ -z "$(INSTALL_PROTOC_GEN_GO_GRPC)" ]; then \
echo "install protoc-gen-go-grpc $(PROTOC_GEN_GO_GRPC_VERSION) to $(INSTALL_PATH)" && GOBIN=$(INSTALL_PATH) go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v$(PROTOC_GEN_GO_GRPC_VERSION); \
else \
echo "protoc-gen-go-grpc@v$(PROTOC_GEN_GO_GRPC_VERSION) already installed";\
fi
tools/bin/revive: tools/check/go.mod
cd tools/check; \
$(GO) build -pgo=$(PGO_PATH)/default.pgo -o ../bin/revive github.com/mgechev/revive
cppcheck:
@#(env bash ${PWD}/scripts/core_build.sh -l)
@(env bash ${PWD}/scripts/check_cpp_fmt.sh)
rustfmt:
@echo "Running cargo format"
@env bash ${PWD}/scripts/run_cargo_format.sh ${PWD}/internal/core/thirdparty/tantivy/tantivy-binding/
rustcheck:
@echo "Running cargo check"
@env bash ${PWD}/scripts/run_cargo_format.sh ${PWD}/internal/core/thirdparty/tantivy/tantivy-binding/ --check
fmt:
ifdef GO_DIFF_FILES
@echo "Running $@ check"
@GO111MODULE=on env bash $(PWD)/scripts/gofmt.sh $(GO_DIFF_FILES)
else
@echo "Running $@ check"
@GO111MODULE=on env bash $(PWD)/scripts/gofmt.sh cmd/
@GO111MODULE=on env bash $(PWD)/scripts/gofmt.sh internal/
@GO111MODULE=on env bash $(PWD)/scripts/gofmt.sh tests/integration/
@GO111MODULE=on env bash $(PWD)/scripts/gofmt.sh tests/go/
@GO111MODULE=on env bash $(PWD)/scripts/gofmt.sh pkg/
endif
lint-fix: getdeps
@mkdir -p $(INSTALL_PATH)
@if [ -z "$(INSTALL_GCI)" ]; then \
echo "Installing gci v$(GCI_VERSION) to ./bin/" && GOBIN=$(INSTALL_PATH) go install github.com/daixiang0/gci@v$(GCI_VERSION); \
else \
echo "gci v$(GCI_VERSION) already installed"; \
fi
@if [ -z "$(INSTALL_GOFUMPT)" ]; then \
echo "Installing gofumpt v$(GOFUMPT_VERSION) to ./bin/" && GOBIN=$(INSTALL_PATH) go install mvdan.cc/gofumpt@v$(GOFUMPT_VERSION); \
else \
echo "gofumpt v$(GOFUMPT_VERSION) already installed"; \
fi
@echo "Running gofumpt fix"
@$(INSTALL_PATH)/gofumpt -l -w internal/
@$(INSTALL_PATH)/gofumpt -l -w cmd/
@$(INSTALL_PATH)/gofumpt -l -w pkg/
@$(INSTALL_PATH)/gofumpt -l -w client/
@$(INSTALL_PATH)/gofumpt -l -w tests/go_client/
@$(INSTALL_PATH)/gofumpt -l -w tests/integration/
@echo "Running gci fix"
# Skip boring_enabled.go: gci misclassifies crypto/boring (a std lib package) as third-party, conflicting with gofumpt
@find cmd/ -name '*.go' ! -name 'boring_enabled.go' | xargs $(INSTALL_PATH)/gci write --skip-generated -s standard -s default -s "prefix(github.com/milvus-io)" --custom-order
@$(INSTALL_PATH)/gci write internal/ --skip-generated -s standard -s default -s "prefix(github.com/milvus-io)" --custom-order
@$(INSTALL_PATH)/gci write pkg/ --skip-generated -s standard -s default -s "prefix(github.com/milvus-io)" --custom-order
@$(INSTALL_PATH)/gci write client/ --skip-generated -s standard -s default -s "prefix(github.com/milvus-io)" --custom-order
@$(INSTALL_PATH)/gci write tests/ --skip-generated -s standard -s default -s "prefix(github.com/milvus-io)" --custom-order
@echo "Running golangci-lint auto-fix"
@source $(PWD)/scripts/setenv.sh && GO111MODULE=on $(INSTALL_PATH)/golangci-lint run --fix --timeout=30m --config $(PWD)/.golangci.yml;
@source $(PWD)/scripts/setenv.sh && cd pkg && GO111MODULE=on $(INSTALL_PATH)/golangci-lint run --fix --timeout=30m --config $(PWD)/.golangci.yml
@source $(PWD)/scripts/setenv.sh && cd client && GO111MODULE=on $(INSTALL_PATH)/golangci-lint run --fix --timeout=30m --config $(PWD)/client/.golangci.yml
#TODO: Check code specifications by golangci-lint
static-check: getdeps
@echo "Running $@ check"
@echo "Start check core packages"
@source $(PWD)/scripts/setenv.sh && GO111MODULE=on GOFLAGS=-buildvcs=false $(INSTALL_PATH)/golangci-lint run --build-tags dynamic,test --timeout=30m --config $(PWD)/.golangci.yml
@echo "Start check pkg package"
@source $(PWD)/scripts/setenv.sh && cd pkg && GO111MODULE=on GOFLAGS=-buildvcs=false $(INSTALL_PATH)/golangci-lint run --build-tags dynamic,test --timeout=30m --config $(PWD)/.golangci.yml
@echo "Start check client package"
@source $(PWD)/scripts/setenv.sh && cd client && GO111MODULE=on GOFLAGS=-buildvcs=false $(INSTALL_PATH)/golangci-lint run --timeout=30m --config $(PWD)/client/.golangci.yml
@echo "Start check go_client e2e package"
@source $(PWD)/scripts/setenv.sh && cd tests/go_client && GO111MODULE=on GOFLAGS=-buildvcs=false $(INSTALL_PATH)/golangci-lint run --build-tags L0,L1,L2,test --timeout=30m --config $(PWD)/tests/go_client/.golangci.yml
verifiers: build-cpp getdeps cppcheck rustcheck fmt static-check
# Build various components locally.
binlog:
@echo "Building binlog ..."
@source $(PWD)/scripts/setenv.sh && \
mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="1" && \
GO111MODULE=on $(GO) build -pgo=$(PGO_PATH)/default.pgo -ldflags="-r $${RPATH}" -o $(INSTALL_PATH)/binlog $(PWD)/cmd/tools/binlog/main.go 1>/dev/null
MIGRATION_PATH = $(PWD)/cmd/tools/migration
meta-migration:
@echo "Building migration tool ..."
@source $(PWD)/scripts/setenv.sh && \
mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="1" && \
GO111MODULE=on $(GO) build -pgo=$(PGO_PATH)/default.pgo -ldflags="-r $${RPATH} -X '$(OBJPREFIX).BuildTags=$(BUILD_TAGS)' -X '$(OBJPREFIX).BuildTime=$(BUILD_TIME)' -X '$(OBJPREFIX).GitCommit=$(GIT_COMMIT)' -X '$(OBJPREFIX).GoVersion=$(GO_VERSION)' -X '$(OBJPREFIX).MilvusVersion=$(MILVUS_VERSION)'" \
-tags dynamic -o $(INSTALL_PATH)/meta-migration $(MIGRATION_PATH)/main.go 1>/dev/null
INTERATION_PATH = $(PWD)/tests/integration
integration-test: getdeps
@echo "Building integration tests ..."
@(env bash $(PWD)/scripts/run_intergration_test.sh "$(INSTALL_PATH)/gotestsum --")
BUILD_TAGS = $(shell git describe --tags --always --dirty="-dev")
BUILD_TAGS_GPU = ${BUILD_TAGS}-gpu
BUILD_TIME = $(shell date -u)
GIT_COMMIT = $(shell git rev-parse --short HEAD)
GO_VERSION = $(shell go version)
BUILD_DATE = $(shell date -u +%Y%m%d)
MILVUS_VERSION := $(shell tag=$$(git describe --exact-match --tags --match 'v*' 2>/dev/null) && echo "$$tag" | sed 's/^v//' || echo "$(GIT_BRANCH_SAFE)-$(BUILD_DATE)-$(GIT_COMMIT)")
print-build-info:
@echo "Build Tag: $(BUILD_TAGS)"
@echo "Build Time: $(BUILD_TIME)"
@echo "Git Commit: $(GIT_COMMIT)"
@echo "Go Version: $(GO_VERSION)"
print-gpu-build-info:
@echo "Build Tag: $(BUILD_TAGS_GPU)"
@echo "Build Time: $(BUILD_TIME)"
@echo "Git Commit: $(GIT_COMMIT)"
@echo "Go Version: $(GO_VERSION)"
update-milvus-api: download-milvus-proto
@echo "Update milvus/api version ..."
@(env bash $(PWD)/scripts/update-api-version.sh $(PROTO_API_VERSION))
download-milvus-proto:
@echo "Download milvus-proto repo ..."
@(env bash $(PWD)/scripts/download_milvus_proto.sh)
build-3rdparty:
@echo "Build 3rdparty ..."
@(env bash $(PWD)/scripts/3rdparty_build.sh -t ${mode})
generated-proto-without-cpp: download-milvus-proto get-proto-deps
@echo "Generate proto ..."
@(env bash $(PWD)/scripts/generate_proto.sh ${INSTALL_PATH})
generated-proto: download-milvus-proto build-3rdparty get-proto-deps
@echo "Generate proto ..."
@(env bash $(PWD)/scripts/generate_proto.sh ${INSTALL_PATH})
build-cpp: generated-proto plan-parser-lib
@echo "Building Milvus cpp library ..."
@(env bash $(PWD)/scripts/core_build.sh -t ${mode} -a ${use_asan} -n ${use_disk_index} -y ${use_dynamic_simd} ${AZURE_OPTION} -x ${index_engine} -f $(tantivy_features) -S ${use_svs})
build-cpp-gpu: generated-proto plan-parser-lib
@echo "Building Milvus cpp gpu library ... "
@(env bash $(PWD)/scripts/core_build.sh -t ${mode} -g -n ${use_disk_index} -y ${use_dynamic_simd} ${AZURE_OPTION} -x ${index_engine} -f $(tantivy_features) -S ${use_svs})
build-cpp-with-unittest: generated-proto plan-parser-lib
@echo "Building Milvus cpp library with unittest ... "
@(env bash $(PWD)/scripts/core_build.sh -t ${mode} -a ${use_asan} -u -n ${use_disk_index} -y ${use_dynamic_simd} ${AZURE_OPTION} -x ${index_engine} -f $(tantivy_features) -S ${use_svs})
build-cpp-with-coverage: generated-proto plan-parser-lib
@echo "Building Milvus cpp library with coverage and unittest ..."
@(env bash $(PWD)/scripts/core_build.sh -t ${mode} -a ${use_asan} -u -c -n ${use_disk_index} -y ${use_dynamic_simd} ${AZURE_OPTION} -x ${index_engine} -f $(tantivy_features) -S ${use_svs})
check-proto-product: generated-proto
@(env bash $(PWD)/scripts/check_proto_product.sh)
generate-message-codegen:
@if [ -z "$(INSTALL_GOFUMPT)" ]; then \
echo "Installing gofumpt v$(GOFUMPT_VERSION) to ./bin/" && GOBIN=$(INSTALL_PATH) go install mvdan.cc/gofumpt@v$(GOFUMPT_VERSION); \
else \
echo "gofumpt v$(GOFUMPT_VERSION) already installed"; \
fi
@echo "Generating message codegen ..."
@(cd pkg/streaming/util/message/codegen && PATH=$(INSTALL_PATH):$(PATH) go generate .)
# Run the tests.
unittest: test-cpp test-go
test-util:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t util)
test-storage:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t storage)
test-allocator:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t allocator)
test-config:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t config)
test-tso:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t tso)
test-pkg:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t pkg)
test-kv:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t kv)
test-mq:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t mq)
test-rootcoord:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t rootcoord)
test-indexcoord:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t indexcoord)
test-proxy:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t proxy)
test-datacoord:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t datacoord)
test-datanode:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t datanode)
test-querynode:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t querynode)
test-querycoord:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t querycoord)
test-metastore:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t metastore)
test-streaming:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t streaming)
test-mixcoord:
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t mixcoord)
test-cdc:
@echo "Running cdc unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh -t cdc)
test-go: build-cpp-with-unittest
@echo "Running go unittests..."
@(env bash $(PWD)/scripts/run_go_unittest.sh)
test-cpp: build-cpp-with-unittest
@echo "Running cpp unittests..."
@(env bash $(PWD)/scripts/run_cpp_unittest.sh)
run-test-cpp:
@echo "Running cpp unittests..."
@echo $(PWD)/scripts/run_cpp_unittest.sh arg=${filter}
@(env bash $(PWD)/scripts/run_cpp_unittest.sh arg=${filter})
plan-parser-lib:
@(env bash $(PWD)/scripts/build_plan_parser.sh)
# Run code coverage.
codecov: codecov-go codecov-cpp
# Run codecov-go
codecov-go: build-cpp-with-coverage
@echo "Running go coverage..."
@(env bash $(PWD)/scripts/run_go_codecov.sh)
# Run codecov-go without build core again, used in github action
codecov-go-without-build: getdeps
@echo "Running go coverage..."
@(env bash $(PWD)/scripts/run_go_codecov.sh "$(INSTALL_PATH)/gotestsum --")
# Run codecov-cpp
codecov-cpp: build-cpp-with-coverage
@echo "Running cpp coverage..."
@(env bash $(PWD)/scripts/run_cpp_codecov.sh)
# Build each component and install binary to $GOPATH/bin.
install: milvus
@echo "Installing binary to './bin'"
@(env GOPATH=$(GOPATH) LIBRARY_PATH=$(LIBRARY_PATH) bash $(PWD)/scripts/install_milvus.sh)
@echo "Installation successful."
gpu-install: milvus-gpu
@echo "Installing binary to './bin'"
@(env GOPATH=$(GOPATH) LIBRARY_PATH=$(LIBRARY_PATH) bash $(PWD)/scripts/install_milvus.sh)
@echo "Installation successful."
clean:
@echo "Cleaning up all the generated files"
@rm -rf bin/
@rm -rf lib/
@rm -rf $(GOPATH)/bin/milvus
@rm -rf cmake_build
@rm -rf internal/core/output
milvus-tools: print-build-info
@echo "Building tools ..."
@. $(PWD)/scripts/setenv.sh && mkdir -p $(INSTALL_PATH)/tools && go env -w CGO_ENABLED="1" && GO111MODULE=on $(GO) build \
-pgo=$(PGO_PATH)/default.pgo -ldflags="-X 'main.BuildTags=$(BUILD_TAGS)' -X 'main.BuildTime=$(BUILD_TIME)' -X 'main.GitCommit=$(GIT_COMMIT)' -X 'main.GoVersion=$(GO_VERSION)'" \
-o $(INSTALL_PATH)/tools $(PWD)/cmd/tools/binlog $(PWD)/cmd/tools/config $(PWD)/cmd/tools/datameta $(PWD)/cmd/tools/config-docs-generator $(PWD)/cmd/tools/migration 1>/dev/null
rpm-setup:
@echo "Setuping rpm env ...;"
@build/rpm/setup-env.sh
rpm: install
@echo "Note: run 'make rpm-setup' to setup build env for rpm builder"
@echo "Building rpm ...;"
@yum -y install rpm-build rpmdevtools wget
@rm -rf ~/rpmbuild/BUILD/*
@rpmdev-setuptree
@wget https://github.com/etcd-io/etcd/releases/download/v3.5.0/etcd-v3.5.0-linux-amd64.tar.gz && tar -xf etcd-v3.5.0-linux-amd64.tar.gz
@cp etcd-v3.5.0-linux-amd64/etcd bin/etcd
@wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio.RELEASE.2021-02-14T04-01-33Z -O bin/minio
@cp -r bin ~/rpmbuild/BUILD/
@cp -r lib ~/rpmbuild/BUILD/
@cp -r configs ~/rpmbuild/BUILD/
@cp -r build/rpm/services ~/rpmbuild/BUILD/
@QA_RPATHS="$$[ 0x001|0x0002|0x0020 ]" rpmbuild -ba ./build/rpm/milvus.spec
generate-mockery-types: getdeps
# MixCoord
$(INSTALL_PATH)/mockery --name=MixCoordComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_mixcoord.go --with-expecter --structname=MixCoord
# Proxy
$(INSTALL_PATH)/mockery --name=ProxyComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_proxy.go --with-expecter --structname=MockProxy
# QueryNode
$(INSTALL_PATH)/mockery --name=QueryNodeComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_querynode.go --with-expecter --structname=MockQueryNode
# DataNode
$(INSTALL_PATH)/mockery --name=DataNodeComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_datanode.go --with-expecter --structname=MockDataNode
# RootCoord
$(INSTALL_PATH)/mockery --name=RootCoordComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_rootcoord.go --with-expecter --structname=MockRootCoord
# QueryCoord
$(INSTALL_PATH)/mockery --name=QueryCoordComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_querycoord.go --with-expecter --structname=MockQueryCoord
# DataCoord
$(INSTALL_PATH)/mockery --name=DataCoordComponent --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_datacoord.go --with-expecter --structname=MockDataCoord
# Clients
$(INSTALL_PATH)/mockery --name=MixCoordClient --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_mixcoord_client.go --with-expecter --structname=MockMixCoordClient
$(INSTALL_PATH)/mockery --name=RootCoordClient --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_rootcoord_client.go --with-expecter --structname=MockRootCoordClient
$(INSTALL_PATH)/mockery --name=QueryCoordClient --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_querycoord_client.go --with-expecter --structname=MockQueryCoordClient
$(INSTALL_PATH)/mockery --name=DataCoordClient --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_datacoord_client.go --with-expecter --structname=MockDataCoordClient
$(INSTALL_PATH)/mockery --name=QueryNodeClient --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_querynode_client.go --with-expecter --structname=MockQueryNodeClient
$(INSTALL_PATH)/mockery --name=DataNodeClient --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_datanode_client.go --with-expecter --structname=MockDataNodeClient
$(INSTALL_PATH)/mockery --name=ProxyClient --dir=$(PWD)/internal/types --output=$(PWD)/internal/mocks --filename=mock_proxy_client.go --with-expecter --structname=MockProxyClient
generate-mockery-rootcoord: getdeps
$(INSTALL_PATH)/mockery --name=IMetaTable --dir=$(PWD)/internal/rootcoord --output=$(PWD)/internal/rootcoord/mocks --filename=meta_table.go --with-expecter --outpkg=mockrootcoord
$(INSTALL_PATH)/mockery --name=FileResourceObserver --dir=$(PWD)/internal/rootcoord --output=$(PWD)/internal/rootcoord --filename=mock_file_resource_observer.go --with-expecter --structname=MockFileResourceObserver --inpackage
generate-mockery-proxy: getdeps
$(INSTALL_PATH)/mockery --config $(PWD)/internal/proxy/.mockery.yaml
generate-mockery-querycoord: getdeps
$(INSTALL_PATH)/mockery --config $(PWD)/internal/querycoordv2/.mockery.yaml
generate-mockery-querynode-without-cpp:
@source $(PWD)/scripts/setenv.sh && \
$(INSTALL_PATH)/mockery --config $(PWD)/internal/querynodev2/.mockery.yaml
generate-mockery-querynode: build-cpp generate-mockery-querynode-without-cpp
generate-mockery-datacoord: getdeps
$(INSTALL_PATH)/mockery --config $(PWD)/internal/datacoord/.mockery.yaml
generate-mockery-datanode: getdeps
$(INSTALL_PATH)/mockery --config $(PWD)/internal/datanode/.mockery.yaml
generate-mockery-flushcommon: getdeps
$(INSTALL_PATH)/mockery --name=Broker --dir=$(PWD)/internal/flushcommon/broker --output=$(PWD)/internal/flushcommon/broker/ --filename=mock_broker.go --with-expecter --structname=MockBroker --outpkg=broker --inpackage
$(INSTALL_PATH)/mockery --name=MetaCache --dir=$(PWD)/internal/flushcommon/metacache --output=$(PWD)/internal/flushcommon/metacache --filename=mock_meta_cache.go --with-expecter --structname=MockMetaCache --outpkg=metacache --inpackage
$(INSTALL_PATH)/mockery --name=SyncManager --dir=$(PWD)/internal/flushcommon/syncmgr --output=$(PWD)/internal/flushcommon/syncmgr --filename=mock_sync_manager.go --with-expecter --structname=MockSyncManager --outpkg=syncmgr --inpackage
$(INSTALL_PATH)/mockery --name=MetaWriter --dir=$(PWD)/internal/flushcommon/syncmgr --output=$(PWD)/internal/flushcommon/syncmgr --filename=mock_meta_writer.go --with-expecter --structname=MockMetaWriter --outpkg=syncmgr --inpackage
$(INSTALL_PATH)/mockery --name=PackWriter --dir=$(PWD)/internal/flushcommon/syncmgr --output=$(PWD)/internal/flushcommon/syncmgr --filename=mock_pack_writer.go --with-expecter --structname=MockPackWriter --outpkg=syncmgr --inpackage
$(INSTALL_PATH)/mockery --name=Task --dir=$(PWD)/internal/flushcommon/syncmgr --output=$(PWD)/internal/flushcommon/syncmgr --filename=mock_task.go --with-expecter --structname=MockTask --outpkg=syncmgr --inpackage
$(INSTALL_PATH)/mockery --name=WriteBuffer --dir=$(PWD)/internal/flushcommon/writebuffer --output=$(PWD)/internal/flushcommon/writebuffer --filename=mock_write_buffer.go --with-expecter --structname=MockWriteBuffer --outpkg=writebuffer --inpackage
$(INSTALL_PATH)/mockery --name=BufferManager --dir=$(PWD)/internal/flushcommon/writebuffer --output=$(PWD)/internal/flushcommon/writebuffer --filename=mock_manager.go --with-expecter --structname=MockBufferManager --outpkg=writebuffer --inpackage
$(INSTALL_PATH)/mockery --name=BinlogIO --dir=$(PWD)/internal/flushcommon/io --output=$(PWD)/internal/mocks/flushcommon/mock_util --filename=mock_binlogio.go --with-expecter --structname=MockBinlogIO --outpkg=mock_util --inpackage=false
$(INSTALL_PATH)/mockery --name=MsgHandler --dir=$(PWD)/internal/flushcommon/util --output=$(PWD)/internal/mocks/flushcommon/mock_util --filename=mock_MsgHandler.go --with-expecter --structname=MockMsgHandler --outpkg=mock_util --inpackage=false
$(INSTALL_PATH)/mockery --name=FlowgraphManager --dir=$(PWD)/internal/flushcommon/pipeline --output=$(PWD)/internal/flushcommon/pipeline --filename=mock_fgmanager.go --with-expecter --structname=MockFlowgraphManager --outpkg=pipeline --inpackage
generate-mockery-metastore: getdeps
$(INSTALL_PATH)/mockery --name=RootCoordCatalog --dir=$(PWD)/internal/metastore --output=$(PWD)/internal/metastore/mocks --filename=mock_rootcoord_catalog.go --with-expecter --structname=RootCoordCatalog --outpkg=mocks
$(INSTALL_PATH)/mockery --name=DataCoordCatalog --dir=$(PWD)/internal/metastore --output=$(PWD)/internal/metastore/mocks --filename=mock_datacoord_catalog.go --with-expecter --structname=DataCoordCatalog --outpkg=mocks
$(INSTALL_PATH)/mockery --name=QueryCoordCatalog --dir=$(PWD)/internal/metastore --output=$(PWD)/internal/metastore/mocks --filename=mock_querycoord_catalog.go --with-expecter --structname=QueryCoordCatalog --outpkg=mocks
generate-mockery-utils: getdeps
# dependency.Factory
$(INSTALL_PATH)/mockery --name=Factory --dir=internal/util/dependency --output=internal/util/dependency --filename=mock_factory.go --with-expecter --structname=MockFactory --inpackage
# tso.Allocator
$(INSTALL_PATH)/mockery --name=Allocator --dir=internal/tso --output=internal/tso/mocks --filename=allocator.go --with-expecter --structname=Allocator --outpkg=mocktso
$(INSTALL_PATH)/mockery --name=SessionInterface --dir=$(PWD)/internal/util/sessionutil --output=$(PWD)/internal/util/sessionutil --filename=mock_session.go --with-expecter --structname=MockSession --inpackage
$(INSTALL_PATH)/mockery --name=SessionWatcher --dir=$(PWD)/internal/util/sessionutil --output=$(PWD)/internal/util/sessionutil --filename=mock_session_watcher.go --with-expecter --structname=MockSessionWatcher --inpackage
$(INSTALL_PATH)/mockery --name=GrpcClient --dir=$(PWD)/internal/util/grpcclient --output=$(PWD)/internal/mocks --filename=mock_grpc_client.go --with-expecter --structname=MockGrpcClient
# proxy_client_manager.go
$(INSTALL_PATH)/mockery --name=ProxyClientManagerInterface --dir=$(PWD)/internal/util/proxyutil --output=$(PWD)/internal/util/proxyutil --filename=mock_proxy_client_manager.go --with-expecter --structname=MockProxyClientManager --inpackage
$(INSTALL_PATH)/mockery --name=ProxyWatcherInterface --dir=$(PWD)/internal/util/proxyutil --output=$(PWD)/internal/util/proxyutil --filename=mock_proxy_watcher.go --with-expecter --structname=MockProxyWatcher --inpackage
# function
$(INSTALL_PATH)/mockery --name=FunctionRunner --dir=$(PWD)/internal/util/function --output=$(PWD)/internal/util/function --filename=mock_function.go --with-expecter --structname=MockFunctionRunner --inpackage
$(INSTALL_PATH)/mockery --name=GlobalIDAllocatorInterface --dir=internal/allocator --output=internal/allocator --filename=mock_global_id_allocator.go --with-expecter --structname=MockGlobalIDAllocator --inpackage
generate-mockery-kv: getdeps
$(INSTALL_PATH)/mockery --name=TxnKV --dir=$(PWD)/pkg/kv --output=$(PWD)/internal/kv/mocks --filename=txn_kv.go --with-expecter
$(INSTALL_PATH)/mockery --name=MetaKv --dir=$(PWD)/pkg/kv --output=$(PWD)/internal/kv/mocks --filename=meta_kv.go --with-expecter
$(INSTALL_PATH)/mockery --name=WatchKV --dir=$(PWD)/pkg/kv --output=$(PWD)/internal/kv/mocks --filename=watch_kv.go --with-expecter
$(INSTALL_PATH)/mockery --name=Predicate --dir=$(PWD)/pkg/kv/predicates --output=$(PWD)/internal/kv/predicates --filename=mock_predicate.go --with-expecter --inpackage
generate-mockery-chunk-manager: getdeps
$(INSTALL_PATH)/mockery --name=ChunkManager --dir=$(PWD)/internal/storage --output=$(PWD)/internal/mocks --filename=mock_chunk_manager.go --with-expecter
generate-mockery-pkg:
$(MAKE) -C pkg generate-mockery
generate-mockery-internal: getdeps
$(INSTALL_PATH)/mockery --config $(PWD)/internal/.mockery.yaml
generate-mockery-client:
$(MAKE) -C client generate-mockery
generate-mockery-cdc: getdeps
$(INSTALL_PATH)/mockery --config $(PWD)/internal/cdc/.mockery.yaml
generate-mockery: generate-mockery-types generate-mockery-kv generate-mockery-rootcoord generate-mockery-proxy generate-mockery-querycoord generate-mockery-querynode generate-mockery-datacoord generate-mockery-pkg generate-mockery-internal generate-mockery-client
generate-yaml: milvus-tools
@echo "Updating milvus config yaml"
@$(PWD)/bin/tools/config gen-yaml && mv milvus.yaml configs/milvus.yaml
MMAP_MIGRATION_PATH = $(PWD)/cmd/tools/migration/mmap/tool
mmap-migration:
@echo "Building migration tool ..."
@source $(PWD)/scripts/setenv.sh && \
mkdir -p $(INSTALL_PATH) && go env -w CGO_ENABLED="1" && \
GO111MODULE=on $(GO) build -pgo=$(PGO_PATH)/default.pgo -ldflags="-r $${RPATH} -X '$(OBJPREFIX).BuildTags=$(BUILD_TAGS)' -X '$(OBJPREFIX).BuildTime=$(BUILD_TIME)' -X '$(OBJPREFIX).GitCommit=$(GIT_COMMIT)' -X '$(OBJPREFIX).GoVersion=$(GO_VERSION)' -X '$(OBJPREFIX).MilvusVersion=$(MILVUS_VERSION)'" \
-tags dynamic -o $(INSTALL_PATH)/mmap-migration $(MMAP_MIGRATION_PATH)/main.go 1>/dev/null
generate-parser:
@echo "Updating milvus expression parser"
@(cd $(PWD)/internal/parser/planparserv2 && env bash generate.sh)
+48
View File
@@ -0,0 +1,48 @@
filters:
".*":
reviewers:
- czs007
- jeffoverflow
- scsven
- shengjun1985
- sunby
- xiaofan-luan
- xige-16
- yanliang567
- zwd1208
approvers:
- maintainers
"Makefile$":
labels:
- area/compilation
"CMakeLists\\.txt$":
labels:
- area/compilation
# markdown files should be reviewed by authors
"*\\.md$":
required_reviewers:
- scsven
- XuanYang-cn
- xiaofan-luan
approvers:
- maintainers
# codecov.yml is the config file for CodeCov, changes should be reviewed by @wangting0128 or @yanliang567
"codecov.yml$":
required_reviewers:
- wangting0128
- yanliang567
approvers:
- maintainers
# go.{mod,sum} files relate to go dependencies, and should be reviewed by @congqixia
"go\\.(mod|sum)$":
required_reviewers:
- congqixia
approvers:
- maintainers
labels:
- area/dependency
+11
View File
@@ -0,0 +1,11 @@
aliases:
maintainers:
- congqixia
- czs007
- wxyucs
- xiaofan-luan
- yanliang567
- jiaoew1991
- tedxu
- liliu-z
- zhengbuqian
+687
View File
@@ -0,0 +1,687 @@
<img src="https://github.com/user-attachments/assets/51e33300-7f85-43ff-a05a-3a0317a961f3" alt="milvus banner">
<div class="column" align="middle">
<a href="https://github.com/milvus-io/milvus/blob/master/LICENSE"><img height="20" src="https://img.shields.io/github/license/milvus-io/milvus" alt="license"/></a>
<a href="https://milvus.io/docs/install_standalone-docker.md"><img src="https://img.shields.io/docker/pulls/milvusdb/milvus" alt="docker-pull-count"/></a>
<a href="https://milvus.io/docs/roadmap.md"><img src="https://img.shields.io/badge/2025-roadmap-orange" alt="fully-managed-milvus"/></a>
<a href="https://cloud.zilliz.com/signup?utm_source=partner&utm_medium=referral&utm_campaign=2024-11-04_web_github-readme_global"><img src="https://img.shields.io/badge/fully_managed-milvus-blue" alt="fully-managed-milvus"/></a>
<a href="https://milvus.io/docs/tutorials-overview.md"><img src="https://img.shields.io/badge/tutorials-green" alt="tutorials"/></a>
<a href="https://milvus.io/slack"><img src="https://img.shields.io/badge/Slack-%234A154B.svg?style=flat&logo=slack&logoColor=white" alt="slack"/></a>
<a href="https://discord.gg/mKc3R95yE5"><img height="20" src="https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white" alt="discord"/></a>
<a href="https://x.com/milvusio"><img src="https://img.shields.io/twitter/follow/milvusio" alt="twitter"/></a>
</div>
<div align="center">
<a href="https://trendshift.io/repositories/1026" target="_blank"><img src="https://trendshift.io/api/badge/repositories/1026" alt="milvus-io%2Fmilvus | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
</div>
## What is Milvus?
🐦 [Milvus](https://milvus.io/) is a high-performance vector database built for scale. It powers AI applications by efficiently organizing and searching vast amounts of unstructured data, such as text, images, and multi-modal information.
🧑‍💻 Written in Go and C++, Milvus implements hardware acceleration for CPU/GPU to achieve best-in-class vector search performance. Thanks to its [fully-distributed and K8s-native architecture](https://milvus.io/docs/overview.md#What-Makes-Milvus-so-Scalable), Milvus can scale horizontally, handle tens of thousands of search queries on billions of vectors, and keep data fresh with real-time streaming updates. Milvus also supports [Standalone mode](https://milvus.io/docs/install_standalone-docker.md) for single machine deployment. [Milvus Lite](https://milvus.io/docs/milvus_lite.md) is a lightweight version good for quickstart in python with `pip install`.
Want to use Milvus with zero setup? Try out [Zilliz Cloud ☁️](https://cloud.zilliz.com/signup?utm_source=partner&utm_medium=referral&utm_campaign=2024-11-04_web_github-readme_global) for free. Milvus is available as a fully managed service on Zilliz Cloud, with [Serverless](https://zilliz.com/serverless?utm_source=partner&utm_medium=referral&utm_campaign=2024-11-04_web_github-readme_global), [Dedicated](https://zilliz.com/cloud?utm_source=partner&utm_medium=referral&utm_campaign=2024-11-04_web_github-readme_global) and [BYOC](https://zilliz.com/bring-your-own-cloud?utm_source=partner&utm_medium=referral&utm_campaign=2024-11-04_web_github-readme_global) options available.
For questions about how to use Milvus, join the community on [Discord](https://discord.gg/33mfvwep3J) to get help. For reporting problems, file bugs and feature requests in GitHub [Issues](https://github.com/milvus-io/milvus/issues) or ask in [Discussions](https://github.com/milvus-io/milvus/discussions).
The Milvus open-source project is
under [LF AI & Data Foundation](https://lfaidata.foundation/projects/milvus/), distributed with [Apache 2.0](https://github.com/milvus-io/milvus/blob/master/LICENSE) License, with Zilliz as its major contributor.
## Quickstart
```python
$ pip install -U pymilvus
```
This installs `pymilvus`, the Python SDK for Milvus. Use `MilvusClient` to create a client:
```python
from pymilvus import MilvusClient
```
* You can also try Milvus Lite for quickstart by installing `pymilvus[milvus-lite]`. To create a local vector database, simply instantiate a client with a local file name for persisting data:
```python
client = MilvusClient("milvus_demo.db")
```
* You can also specify the credentials to connect to your deployed [Milvus server](https://milvus.io/docs/authenticate.md?tab=docker) or [Zilliz Cloud](https://docs.zilliz.com/docs/quick-start):
```python
client = MilvusClient(
uri="<endpoint_of_self_hosted_milvus_or_zilliz_cloud>",
token="<username_and_password_or_zilliz_cloud_api_key>")
```
With the client, you can create collection:
```python
client.create_collection(
collection_name="demo_collection",
dimension=768, # The vectors we will use in this demo have 768 dimensions
)
```
Ingest data:
```python
res = client.insert(collection_name="demo_collection", data=data)
```
Perform vector search:
```python
query_vectors = embedding_fn.encode_queries(["Who is Alan Turing?", "What is AI?"])
res = client.search(
collection_name="demo_collection", # target collection
data=query_vectors, # a list of one or more query vectors, supports batch
limit=2, # how many results to return (topK)
output_fields=["vector", "text", "subject"], # what fields to return
)
```
## Why Milvus
Milvus is designed to handle vector search at scale. It stores vectors, which are learned representations of unstructured data, together with other scalar data types such as integers, strings, and JSON objects. Users can conduct efficient vector search with metadata filtering or hybrid search. Here are why developers choose Milvus as the vector database for AI applications:
**High Performance at Scale and High Availability**
* Milvus features a [distributed architecture](https://milvus.io/docs/architecture_overview.md ) that separates [compute](https://milvus.io/docs/data_processing.md#Data-query) and [storage](https://milvus.io/docs/data_processing.md#Data-insertion). Milvus can horizontally scale and adapt to diverse traffic patterns, achieving optimal performance by independently increasing query nodes for read-heavy workload and data node for write-heavy workload. The stateless microservices on K8s allow [quick recovery](https://milvus.io/docs/coordinator_ha.md#Coordinator-HA) from failure, ensuring high availability. The support for [replicas](https://milvus.io/docs/replica.md) further enhances fault tolerance and throughput by loading data segments on multiple query nodes. See [benchmark](https://zilliz.com/vector-database-benchmark-tool) for performance comparison.
**Support for Various Vector Index Types and Hardware Acceleration**
* Milvus separates the system and core vector search engine, allowing it to support all major vector index types that are optimized for different scenarios, including HNSW, IVF, FLAT (brute-force), SCANN, and DiskANN, with [quantization-based](https://milvus.io/docs/index.md?tab=floating#IVFPQ) variations and [mmap](https://milvus.io/docs/mmap.md). Milvus optimizes vector search for advanced features such as [metadata filtering](https://milvus.io/docs/scalar_index.md#Scalar-Index) and [range search](https://milvus.io/docs/single-vector-search.md#Range-search). Additionally, Milvus implements hardware acceleration to enhance vector search performance and supports GPU indexing, such as NVIDIA's [CAGRA](https://github.com/rapidsai/cuvs).
**Flexible Multi-tenancy and Hot/Cold Storage**
* Milvus supports [multi-tenancy](https://milvus.io/docs/multi_tenancy.md#Multi-tenancy-strategies) through isolation at database, collection, partition, or partition key level. The flexible strategies allow a single cluster to handle hundreds to millions of tenants, also ensures optimized search performance and flexible access control. Milvus enhances cost-effectiveness with hot/cold storage. Frequently accessed hot data can be stored in memory or on SSDs for better performance, while less-accessed cold data is kept on slower, cost-effective storage. This mechanism can significantly reduce costs while maintaining high performance for critical tasks.
**Sparse Vector for Full Text Search and Hybrid Search**
* In addition to semantic search through dense vector, Milvus also natively supports [full text search](https://milvus.io/docs/full-text-search.md) with BM25 as well as learned sparse embeddings such as SPLADE and BGE-M3. Users can store sparse vectors and dense vectors in the same collection, and define functions to rerank results from multiple search requests. See examples of [Hybrid Search with semantic search + full text search](https://milvus.io/docs/full_text_search_with_milvus.md).
**Data Security and Fine-grain Access Control**
* Milvus ensures data security by implementing mandatory user authentication, TLS encryption, and Role-Based Access Control (RBAC). User authentication ensures that only authorized users with valid credentials can access the database, while TLS encryption secures all communications within the network. Additionally, RBAC allows for fine-grained access control by assigning specific permissions to users based on their roles. These features make Milvus a robust and secure choice for enterprise applications, protecting sensitive data from unauthorized access and potential breaches.
Milvus is trusted by AI developers to build applications such as text and image search, Retrieval-Augmented Generation (RAG), and recommendation systems. Milvus powers [many mission-critical businesses](https://milvus.io/use-cases) for startups and enterprises.
## Demos and Tutorials
Here is a selection of demos and tutorials to show how to build various types of AI applications made with Milvus:
You can explore a comprehensive [Tutorials Overview](https://milvus.io/docs/tutorials-overview.md) covering topics such as Retrieval-Augmented Generation (RAG), Semantic Search, Hybrid Search, Question Answering, Recommendation Systems, and various quick-start guides. These resources are designed to help you get started quickly and efficiently.
| Tutorial | Use Case | Related Milvus Features |
| -------- | -------- | --------- |
| [Build RAG with Milvus](https://milvus.io/docs/build-rag-with-milvus.md) | RAG | vector search |
| [Advanced RAG Optimizations](https://milvus.io/docs/how_to_enhance_your_rag.md) | RAG | vector search, full text search |
| [Full Text Search with Milvus](https://milvus.io/docs/full_text_search_with_milvus.md) | Text Search | full text search |
| [Hybrid Search with Milvus](https://milvus.io/docs/hybrid_search_with_milvus.md) | Hybrid Search | hybrid search, multi vector, dense embedding, sparse embedding |
| [Image Search with Milvus](https://milvus.io/docs/image_similarity_search.md) | Semantic Search | vector search, dynamic field |
| [Multimodal Search using Multi Vectors](https://milvus.io/docs/multimodal_rag_with_milvus.md) | Semantic Search | multi vector, hybrid search |
| [Movie Recommendation with Milvus](https://milvus.io/docs/movie_recommendation_with_milvus.md) | Recommendation System | vector search |
| [Graph RAG with Milvus](https://milvus.io/docs/graph_rag_with_milvus.md) | RAG | graph search |
| [Contextual Retrieval with Milvus](https://milvus.io/docs/contextual_retrieval_with_milvus.md) | Quickstart | vector search |
| [Vector Visualization](https://milvus.io/docs/vector_visualization.md) | Quickstart | vector search |
| [HDBSCAN Clustering with Milvus](https://milvus.io/docs/hdbscan_clustering_with_milvus.md) | Quickstart | vector search |
| [Use ColPali for Multi-Modal Retrieval with Milvus](https://milvus.io/docs/use_ColPali_with_milvus.md) | Quickstart | vector search |
<table>
<tr>
<td width="30%">
<a href="https://milvus.io/milvus-demos">
<img src="https://assets.zilliz.com/image_search_59a64e4f22.gif" />
</a>
</td>
<td width="30%">
<a href="https://milvus.io/milvus-demos">
<img src="https://assets.zilliz.com/qa_df5ee7bd83.gif" />
</a>
</td>
<td width="30%">
<a href="https://milvus.io/milvus-demos">
<img src="https://assets.zilliz.com/mole_search_76f8340572.gif" />
</a>
</td>
</tr>
<tr>
<th>
<a href="https://milvus.io/milvus-demos">Image Search</a>
</th>
<th>
<a href="https://milvus.io/milvus-demos">RAG</a>
</th>
<th>
<a href="https://milvus.io/milvus-demos">Drug Discovery</a>
</th>
</tr>
</table>
## Ecosystem and Integration
Milvus integrates with a comprehensive suite of [AI development tools](https://milvus.io/docs/integrations_overview.md), such as LangChain, LlamaIndex, OpenAI and HuggingFace, making it an ideal vector store for GenAI applications such as Retrieval-Augmented Generation (RAG). Milvus works with both open-source embedding models and embedding services, in text, image and video modalities. Milvus also provides a convenient utility [`pymilvus[model]`](https://milvus.io/docs/embeddings.md), users can use the simple wrapper code to transform unstructured data into vector embeddings and leverage reranking models for optimized search results. The Milvus ecosystem also includes [Attu](https://github.com/zilliztech/attu?tab=readme-ov-file#attu) for GUI-based administration, [Birdwatcher](https://milvus.io/docs/birdwatcher_overview.md) for system debugging, [Prometheus/Grafana](https://milvus.io/docs/monitor_overview.md) for monitoring, [Milvus CDC](https://milvus.io/docs/milvus-cdc-overview.md) for data synchronization, [VTS](https://github.com/zilliztech/vts?tab=readme-ov-file#vts) for data migration and data connectors for [Spark](https://milvus.io/docs/integrate_with_spark.md#Spark-Milvus-Connector-User-Guide), [Kafka](https://github.com/zilliztech/kafka-connect-milvus?tab=readme-ov-file#kafka-connect-milvus-connector), [Fivetran](https://fivetran.com/docs/destinations/milvus), and [Airbyte](https://milvus.io/docs/integrate_with_airbyte.md) to build search pipelines.
Check out https://milvus.io/docs/integrations_overview.md for more details.
## Documentation
For guidance on installation, usage, deployment, and administration, check out [Milvus Docs](https://milvus.io/docs). For technical milestones and enhancement proposals, check out [issues on GitHub](https://github.com/milvus-io/milvus/issues).
## Contributing
The Milvus open-source project accepts contributions from everyone. See [Guidelines for Contributing](https://github.com/milvus-io/milvus/blob/master/CONTRIBUTING.md) for details on submitting patches and the development workflow. See our [community repository](https://github.com/milvus-io/community) to learn about project governance and access more community resources.
### Build Milvus from Source Code
Requirements:
* Linux systems (Ubuntu 20.04 or later recommended):
```bash
Go: >= 1.21
CMake: >= 3.26.4 && CMake < 4
GCC: >= 11
Python: > 3.8 and <= 3.11
```
* MacOS systems with x86_64 (Big Sur 11.5 or later recommended):
```bash
Go: >= 1.21
CMake: >= 3.26.4 && CMake < 4
llvm: >= 15
Python: > 3.8 and <= 3.11
```
* MacOS systems with Apple Silicon (Monterey 12.0.1 or later recommended):
```bash
Go: >= 1.21 (Arch=ARM64)
CMake: >= 3.26.4 && CMake < 4
llvm: >= 15
Python: > 3.8 and <= 3.11
```
Clone Milvus repo and build.
```bash
# Clone github repository.
$ git clone https://github.com/milvus-io/milvus.git
# Install third-party dependencies.
$ cd milvus/
$ ./scripts/install_deps.sh
# Compile Milvus.
$ make
```
For full instructions, see [developer's documentation](https://github.com/milvus-io/milvus/blob/master/DEVELOPMENT.md).
## Community
Join the Milvus community on [Discord](https://discord.gg/8uyFbECzPX) to share your suggestions, advice, and questions with our engineering team.
To learn the latest news about Milvus, follow us on social media:
- [X](https://twitter.com/milvusio)
- [LinkedIn](https://www.linkedin.com/company/the-milvus-project)
- [YouTube](https://www.youtube.com/channel/UCMCo_F7pKjMHBlfyxwOPw-g)
- [Medium](https://medium.com/@milvusio)
You can also check out our [FAQ page](https://milvus.io/docs/performance_faq.md) to discover solutions or answers to your issues or questions, and subscribe to Milvus mailing lists:
- [Technical Steering Committee](https://lists.lfai.foundation/g/milvus-tsc)
- [Technical Discussions](https://lists.lfai.foundation/g/milvus-technical-discuss)
- [Announcement](https://lists.lfai.foundation/g/milvus-announce)
## Reference
Reference to cite when you use Milvus in a research paper:
```
@inproceedings{2021milvus,
title={Milvus: A Purpose-Built Vector Data Management System},
author={Wang, Jianguo and Yi, Xiaomeng and Guo, Rentong and Jin, Hai and Xu, Peng and Li, Shengjun and Wang, Xiangyu and Guo, Xiangzhou and Li, Chengming and Xu, Xiaohai and others},
booktitle={Proceedings of the 2021 International Conference on Management of Data},
pages={2614--2627},
year={2021}
}
@article{2022manu,
title={Manu: a cloud native vector database management system},
author={Guo, Rentong and Luan, Xiaofan and Xiang, Long and Yan, Xiao and Yi, Xiaomeng and Luo, Jigao and Cheng, Qianya and Xu, Weizhi and Luo, Jiarui and Liu, Frank and others},
journal={Proceedings of the VLDB Endowment},
volume={15},
number={12},
pages={3548--3561},
year={2022},
publisher={VLDB Endowment}
}
```
<!-- Do not remove start of hero-bot -->
<img src="https://img.shields.io/badge/all--contributors-432-orange"><br>
<a href="https://github.com/0xflotus"><img src="https://avatars.githubusercontent.com/u/26602940?v=4" width="30px" /></a>
<a href="https://github.com/404-P4rziv4L"><img src="https://avatars.githubusercontent.com/u/57059194?v=4" width="30px" /></a>
<a href="https://github.com/9Eurydice9"><img src="https://avatars.githubusercontent.com/u/220225099?v=4" width="30px" /></a>
<a href="https://github.com/ABNER-1"><img src="https://avatars.githubusercontent.com/u/24547351?v=4" width="30px" /></a>
<a href="https://github.com/Accagain2014"><img src="https://avatars.githubusercontent.com/u/9635216?v=4" width="30px" /></a>
<a href="https://github.com/AgNess-G"><img src="https://avatars.githubusercontent.com/u/79598409?v=4" width="30px" /></a>
<a href="https://github.com/Ahmetyasin"><img src="https://avatars.githubusercontent.com/u/34247619?v=4" width="30px" /></a>
<a href="https://github.com/Ald392"><img src="https://avatars.githubusercontent.com/u/166891594?v=4" width="30px" /></a>
<a href="https://github.com/AliDotS"><img src="https://avatars.githubusercontent.com/u/33119433?v=4" width="30px" /></a>
<a href="https://github.com/AlintaLu"><img src="https://avatars.githubusercontent.com/u/18751867?v=4" width="30px" /></a>
<a href="https://github.com/AllenYu1987"><img src="https://avatars.githubusercontent.com/u/12489985?v=4" width="30px" /></a>
<a href="https://github.com/Anosh21"><img src="https://avatars.githubusercontent.com/u/90505226?v=4" width="30px" /></a>
<a href="https://github.com/AnthonyTsu1984"><img src="https://avatars.githubusercontent.com/u/115786031?v=4" width="30px" /></a>
<a href="https://github.com/Aredcap"><img src="https://avatars.githubusercontent.com/u/40494761?v=4" width="30px" /></a>
<a href="https://github.com/ArenaSu"><img src="https://avatars.githubusercontent.com/u/21214629?v=4" width="30px" /></a>
<a href="https://github.com/Armaggheddon"><img src="https://avatars.githubusercontent.com/u/47779194?v=4" width="30px" /></a>
<a href="https://github.com/BUPTAnderson"><img src="https://avatars.githubusercontent.com/u/13449703?v=4" width="30px" /></a>
<a href="https://github.com/Ben-Aaron-Bio-Rad"><img src="https://avatars.githubusercontent.com/u/54123439?v=4" width="30px" /></a>
<a href="https://github.com/Bennu-Li"><img src="https://avatars.githubusercontent.com/u/53458891?v=4" width="30px" /></a>
<a href="https://github.com/Biki-das"><img src="https://avatars.githubusercontent.com/u/72331432?v=4" width="30px" /></a>
<a href="https://github.com/BossZou"><img src="https://avatars.githubusercontent.com/u/40255591?v=4" width="30px" /></a>
<a href="https://github.com/CNLHC"><img src="https://avatars.githubusercontent.com/u/21005146?v=4" width="30px" /></a>
<a href="https://github.com/CaoHaiNam"><img src="https://avatars.githubusercontent.com/u/47685795?v=4" width="30px" /></a>
<a href="https://github.com/ChelseyZ"><img src="https://avatars.githubusercontent.com/u/237714727?v=4" width="30px" /></a>
<a href="https://github.com/Chisdo"><img src="https://avatars.githubusercontent.com/u/36720318?v=4" width="30px" /></a>
<a href="https://github.com/ChunelFeng"><img src="https://avatars.githubusercontent.com/u/37905059?v=4" width="30px" /></a>
<a href="https://github.com/CocytusElias"><img src="https://avatars.githubusercontent.com/u/79587688?v=4" width="30px" /></a>
<a href="https://github.com/CodeInDreams"><img src="https://avatars.githubusercontent.com/u/17664279?v=4" width="30px" /></a>
<a href="https://github.com/Cplus-plus"><img src="https://avatars.githubusercontent.com/u/57971497?v=4" width="30px" /></a>
<a href="https://github.com/CsterKuroi"><img src="https://avatars.githubusercontent.com/u/12230174?v=4" width="30px" /></a>
<a href="https://github.com/Cupchen"><img src="https://avatars.githubusercontent.com/u/34762375?v=4" width="30px" /></a>
<a href="https://github.com/DLT1412"><img src="https://avatars.githubusercontent.com/u/8294986?v=4" width="30px" /></a>
<a href="https://github.com/DanielHuang1983"><img src="https://avatars.githubusercontent.com/u/4417873?v=4" width="30px" /></a>
<a href="https://github.com/Deep1Shikha"><img src="https://avatars.githubusercontent.com/u/47516502?v=4" width="30px" /></a>
<a href="https://github.com/DingQK"><img src="https://avatars.githubusercontent.com/u/58072531?v=4" width="30px" /></a>
<a href="https://github.com/DiptoChakrabarty"><img src="https://avatars.githubusercontent.com/u/45638240?v=4" width="30px" /></a>
<a href="https://github.com/EricStarer"><img src="https://avatars.githubusercontent.com/u/34002927?v=4" width="30px" /></a>
<a href="https://github.com/Erzangel"><img src="https://avatars.githubusercontent.com/u/57399897?v=4" width="30px" /></a>
<a href="https://github.com/FeilongHou"><img src="https://avatars.githubusercontent.com/u/77430856?v=4" width="30px" /></a>
<a href="https://github.com/Fierralin"><img src="https://avatars.githubusercontent.com/u/8857059?v=4" width="30px" /></a>
<a href="https://github.com/FluorineDog"><img src="https://avatars.githubusercontent.com/u/15663612?v=4" width="30px" /></a>
<a href="https://github.com/Gofastasf"><img src="https://avatars.githubusercontent.com/u/159963288?v=4" width="30px" /></a>
<a href="https://github.com/Goodnight77"><img src="https://avatars.githubusercontent.com/u/117648012?v=4" width="30px" /></a>
<a href="https://github.com/Gracieeea"><img src="https://avatars.githubusercontent.com/u/50101579?v=4" width="30px" /></a>
<a href="https://github.com/GuanyunFeng"><img src="https://avatars.githubusercontent.com/u/40229765?v=4" width="30px" /></a>
<a href="https://github.com/GuoRentong"><img src="https://avatars.githubusercontent.com/u/57477222?v=4" width="30px" /></a>
<a href="https://github.com/GuyKh"><img src="https://avatars.githubusercontent.com/u/3136012?v=4" width="30px" /></a>
<a href="https://github.com/Hard-Coder05"><img src="https://avatars.githubusercontent.com/u/54059881?v=4" width="30px" /></a>
<a href="https://github.com/Heisenberg-Y"><img src="https://avatars.githubusercontent.com/u/35055583?v=4" width="30px" /></a>
<a href="https://github.com/HesterG"><img src="https://avatars.githubusercontent.com/u/17645053?v=4" width="30px" /></a>
<a href="https://github.com/Hoyaspark"><img src="https://avatars.githubusercontent.com/u/88016041?v=4" width="30px" /></a>
<a href="https://github.com/HuaSheng2000"><img src="https://avatars.githubusercontent.com/u/34791273?v=4" width="30px" /></a>
<a href="https://github.com/HuangHua"><img src="https://avatars.githubusercontent.com/u/2274405?v=4" width="30px" /></a>
<a href="https://github.com/HurSungYun"><img src="https://avatars.githubusercontent.com/u/8033896?v=4" width="30px" /></a>
<a href="https://github.com/Ice-YcY"><img src="https://avatars.githubusercontent.com/u/85332705?v=4" width="30px" /></a>
<a href="https://github.com/JackLCL"><img src="https://avatars.githubusercontent.com/u/53512883?v=4" width="30px" /></a>
<a href="https://github.com/JadeFlute0127"><img src="https://avatars.githubusercontent.com/u/35321989?v=4" width="30px" /></a>
<a href="https://github.com/Janglearnstocode"><img src="https://avatars.githubusercontent.com/u/204587742?v=4" width="30px" /></a>
<a href="https://github.com/Javajava1"><img src="https://avatars.githubusercontent.com/u/29594737?v=4" width="30px" /></a>
<a href="https://github.com/Jeri-jose"><img src="https://avatars.githubusercontent.com/u/72429659?v=4" width="30px" /></a>
<a href="https://github.com/JianPeng20"><img src="https://avatars.githubusercontent.com/u/14035577?v=4" width="30px" /></a>
<a href="https://github.com/JinHai-CN"><img src="https://avatars.githubusercontent.com/u/33142505?v=4" width="30px" /></a>
<a href="https://github.com/JsDove"><img src="https://avatars.githubusercontent.com/u/35839735?v=4" width="30px" /></a>
<a href="https://github.com/Juneezee"><img src="https://avatars.githubusercontent.com/u/20135478?v=4" width="30px" /></a>
<a href="https://github.com/KubrickLiu"><img src="https://avatars.githubusercontent.com/u/24795136?v=4" width="30px" /></a>
<a href="https://github.com/KumaJie"><img src="https://avatars.githubusercontent.com/u/61139665?v=4" width="30px" /></a>
<a href="https://github.com/LeoReeYang"><img src="https://avatars.githubusercontent.com/u/58654486?v=4" width="30px" /></a>
<a href="https://github.com/Leslie-Wong-H"><img src="https://avatars.githubusercontent.com/u/27696701?v=4" width="30px" /></a>
<a href="https://github.com/Light-City"><img src="https://avatars.githubusercontent.com/u/25699850?v=4" width="30px" /></a>
<a href="https://github.com/Lin-gh-Saint"><img src="https://avatars.githubusercontent.com/u/64019322?v=4" width="30px" /></a>
<a href="https://github.com/Linkwei"><img src="https://avatars.githubusercontent.com/u/30227152?v=4" width="30px" /></a>
<a href="https://github.com/LionelDong"><img src="https://avatars.githubusercontent.com/u/7533395?v=4" width="30px" /></a>
<a href="https://github.com/LocoRichard"><img src="https://avatars.githubusercontent.com/u/81553353?v=4" width="30px" /></a>
<a href="https://github.com/LoveEachDay"><img src="https://avatars.githubusercontent.com/u/1573213?v=4" width="30px" /></a>
<a href="https://github.com/MrPresent-Han"><img src="https://avatars.githubusercontent.com/u/116052805?v=4" width="30px" /></a>
<a href="https://github.com/NavanshGoel"><img src="https://avatars.githubusercontent.com/u/74401713?v=4" width="30px" /></a>
<a href="https://github.com/NicoYuan1986"><img src="https://avatars.githubusercontent.com/u/109071306?v=4" width="30px" /></a>
<a href="https://github.com/NotRyan"><img src="https://avatars.githubusercontent.com/u/5742796?v=4" width="30px" /></a>
<a href="https://github.com/OxalisCu"><img src="https://avatars.githubusercontent.com/u/64067746?v=4" width="30px" /></a>
<a href="https://github.com/PahudPlus"><img src="https://avatars.githubusercontent.com/u/64403786?v=4" width="30px" /></a>
<a href="https://github.com/PiercarloSlavazza"><img src="https://avatars.githubusercontent.com/u/3389306?v=4" width="30px" /></a>
<a href="https://github.com/PowderLi"><img src="https://avatars.githubusercontent.com/u/135960789?v=4" width="30px" /></a>
<a href="https://github.com/QipengZhou"><img src="https://avatars.githubusercontent.com/u/5410298?v=4" width="30px" /></a>
<a href="https://github.com/RangerCD"><img src="https://avatars.githubusercontent.com/u/6872198?v=4" width="30px" /></a>
<a href="https://github.com/Raysilience"><img src="https://avatars.githubusercontent.com/u/45241093?v=4" width="30px" /></a>
<a href="https://github.com/Reidddddd"><img src="https://avatars.githubusercontent.com/u/5352837?v=4" width="30px" /></a>
<a href="https://github.com/ReigenAraka"><img src="https://avatars.githubusercontent.com/u/57280231?v=4" width="30px" /></a>
<a href="https://github.com/Rijin-N"><img src="https://avatars.githubusercontent.com/u/181319057?v=4" width="30px" /></a>
<a href="https://github.com/RosieZhang12"><img src="https://avatars.githubusercontent.com/u/106942883?v=4" width="30px" /></a>
<a href="https://github.com/RyanWei"><img src="https://avatars.githubusercontent.com/u/9876551?v=4" width="30px" /></a>
<a href="https://github.com/SCKCZJ2018"><img src="https://avatars.githubusercontent.com/u/29282370?v=4" width="30px" /></a>
<a href="https://github.com/SarthakJain26"><img src="https://avatars.githubusercontent.com/u/45846277?v=4" width="30px" /></a>
<a href="https://github.com/Shawnzheng011019"><img src="https://avatars.githubusercontent.com/u/88486803?v=4" width="30px" /></a>
<a href="https://github.com/SimFG"><img src="https://avatars.githubusercontent.com/u/21985684?v=4" width="30px" /></a>
<a href="https://github.com/SkyYang"><img src="https://avatars.githubusercontent.com/u/4702509?v=4" width="30px" /></a>
<a href="https://github.com/SnowyOwl-KHY"><img src="https://avatars.githubusercontent.com/u/10348819?v=4" width="30px" /></a>
<a href="https://github.com/SpadeA-Tang"><img src="https://avatars.githubusercontent.com/u/71589810?v=4" width="30px" /></a>
<a href="https://github.com/Sunt-ing"><img src="https://avatars.githubusercontent.com/u/43040147?v=4" width="30px" /></a>
<a href="https://github.com/SwaggySong"><img src="https://avatars.githubusercontent.com/u/36157116?v=4" width="30px" /></a>
<a href="https://github.com/TheShubhendra"><img src="https://avatars.githubusercontent.com/u/37535104?v=4" width="30px" /></a>
<a href="https://github.com/Thor-ChenBiao"><img src="https://avatars.githubusercontent.com/u/104345188?v=4" width="30px" /></a>
<a href="https://github.com/ThreadDao"><img src="https://avatars.githubusercontent.com/u/27288593?v=4" width="30px" /></a>
<a href="https://github.com/ThyeeZz"><img src="https://avatars.githubusercontent.com/u/41352919?v=4" width="30px" /></a>
<a href="https://github.com/Tlincy"><img src="https://avatars.githubusercontent.com/u/11934432?v=4" width="30px" /></a>
<a href="https://github.com/Tumao727"><img src="https://avatars.githubusercontent.com/u/20420181?v=4" width="30px" /></a>
<a href="https://github.com/UnyieldingOrca"><img src="https://avatars.githubusercontent.com/u/11794047?v=4" width="30px" /></a>
<a href="https://github.com/Writer-X"><img src="https://avatars.githubusercontent.com/u/80471801?v=4" width="30px" /></a>
<a href="https://github.com/Writtic"><img src="https://avatars.githubusercontent.com/u/11371498?v=4" width="30px" /></a>
<a href="https://github.com/Wuzhengda55"><img src="https://avatars.githubusercontent.com/u/47274057?v=4" width="30px" /></a>
<a href="https://github.com/XTxxxx"><img src="https://avatars.githubusercontent.com/u/113696527?v=4" width="30px" /></a>
<a href="https://github.com/Xieql"><img src="https://avatars.githubusercontent.com/u/45359033?v=4" width="30px" /></a>
<a href="https://github.com/XuPeng-SH"><img src="https://avatars.githubusercontent.com/u/39627130?v=4" width="30px" /></a>
<a href="https://github.com/XuanYang-cn"><img src="https://avatars.githubusercontent.com/u/51370125?v=4" width="30px" /></a>
<a href="https://github.com/YannFollet"><img src="https://avatars.githubusercontent.com/u/131855179?v=4" width="30px" /></a>
<a href="https://github.com/YidaHu"><img src="https://avatars.githubusercontent.com/u/13404367?v=4" width="30px" /></a>
<a href="https://github.com/Yinwei-Yu"><img src="https://avatars.githubusercontent.com/u/150327960?v=4" width="30px" /></a>
<a href="https://github.com/YiyunNi"><img src="https://avatars.githubusercontent.com/u/74396087?v=4" width="30px" /></a>
<a href="https://github.com/Yougigun"><img src="https://avatars.githubusercontent.com/u/9638997?v=4" width="30px" /></a>
<a href="https://github.com/Yukikaze-CZR"><img src="https://avatars.githubusercontent.com/u/48198922?v=4" width="30px" /></a>
<a href="https://github.com/Zach41"><img src="https://avatars.githubusercontent.com/u/3941604?v=4" width="30px" /></a>
<a href="https://github.com/ZhaoBQ"><img src="https://avatars.githubusercontent.com/u/35092554?v=4" width="30px" /></a>
<a href="https://github.com/aaronjin2010"><img src="https://avatars.githubusercontent.com/u/48044391?v=4" width="30px" /></a>
<a href="https://github.com/abd-770"><img src="https://avatars.githubusercontent.com/u/92085834?v=4" width="30px" /></a>
<a href="https://github.com/akihoni"><img src="https://avatars.githubusercontent.com/u/36330442?v=4" width="30px" /></a>
<a href="https://github.com/alexanderguzhva"><img src="https://avatars.githubusercontent.com/u/10901481?v=4" width="30px" /></a>
<a href="https://github.com/alwayslove2013"><img src="https://avatars.githubusercontent.com/u/22510720?v=4" width="30px" /></a>
<a href="https://github.com/anchun"><img src="https://avatars.githubusercontent.com/u/2356895?v=4" width="30px" /></a>
<a href="https://github.com/andrii-shchur"><img src="https://avatars.githubusercontent.com/u/33606307?v=4" width="30px" /></a>
<a href="https://github.com/any35"><img src="https://avatars.githubusercontent.com/u/2082210?v=4" width="30px" /></a>
<a href="https://github.com/aoiasd"><img src="https://avatars.githubusercontent.com/u/45024769?v=4" width="30px" /></a>
<a href="https://github.com/arijit-chowdhury-genea"><img src="https://avatars.githubusercontent.com/u/104769013?v=4" width="30px" /></a>
<a href="https://github.com/ashkrisk"><img src="https://avatars.githubusercontent.com/u/137368647?v=4" width="30px" /></a>
<a href="https://github.com/ashyshyshyman"><img src="https://avatars.githubusercontent.com/u/50362613?v=4" width="30px" /></a>
<a href="https://github.com/avats-dev"><img src="https://avatars.githubusercontent.com/u/35889327?v=4" width="30px" /></a>
<a href="https://github.com/avsolatorio"><img src="https://avatars.githubusercontent.com/u/3009596?v=4" width="30px" /></a>
<a href="https://github.com/balloon1995"><img src="https://avatars.githubusercontent.com/u/10573916?v=4" width="30px" /></a>
<a href="https://github.com/become-nice"><img src="https://avatars.githubusercontent.com/u/56624819?v=4" width="30px" /></a>
<a href="https://github.com/bigsheeper"><img src="https://avatars.githubusercontent.com/u/42060877?v=4" width="30px" /></a>
<a href="https://github.com/binbin12580"><img src="https://avatars.githubusercontent.com/u/30914966?v=4" width="30px" /></a>
<a href="https://github.com/binbinlv"><img src="https://avatars.githubusercontent.com/u/83755740?v=4" width="30px" /></a>
<a href="https://github.com/bjzhjing"><img src="https://avatars.githubusercontent.com/u/46661806?v=4" width="30px" /></a>
<a href="https://github.com/bo-huang"><img src="https://avatars.githubusercontent.com/u/24309515?v=4" width="30px" /></a>
<a href="https://github.com/brandonbiggs"><img src="https://avatars.githubusercontent.com/u/34954680?v=4" width="30px" /></a>
<a href="https://github.com/brcarry"><img src="https://avatars.githubusercontent.com/u/58139344?v=4" width="30px" /></a>
<a href="https://github.com/brunocfnba"><img src="https://avatars.githubusercontent.com/u/7377163?v=4" width="30px" /></a>
<a href="https://github.com/bryanwux"><img src="https://avatars.githubusercontent.com/u/17968665?v=4" width="30px" /></a>
<a href="https://github.com/caesarjuly"><img src="https://avatars.githubusercontent.com/u/927521?v=4" width="30px" /></a>
<a href="https://github.com/caosiyang"><img src="https://avatars.githubusercontent.com/u/2155120?v=4" width="30px" /></a>
<a href="https://github.com/carawaylj"><img src="https://avatars.githubusercontent.com/u/69145751?v=4" width="30px" /></a>
<a href="https://github.com/charleskakumanu"><img src="https://avatars.githubusercontent.com/u/62761315?v=4" width="30px" /></a>
<a href="https://github.com/charlspjohn"><img src="https://avatars.githubusercontent.com/u/14850736?v=4" width="30px" /></a>
<a href="https://github.com/chasingegg"><img src="https://avatars.githubusercontent.com/u/18375889?v=4" width="30px" /></a>
<a href="https://github.com/chengpu"><img src="https://avatars.githubusercontent.com/u/2233492?v=4" width="30px" /></a>
<a href="https://github.com/chenxingqiang"><img src="https://avatars.githubusercontent.com/u/12387235?v=4" width="30px" /></a>
<a href="https://github.com/chinamcafee"><img src="https://avatars.githubusercontent.com/u/3439961?v=4" width="30px" /></a>
<a href="https://github.com/chuangfengwang"><img src="https://avatars.githubusercontent.com/u/24692397?v=4" width="30px" /></a>
<a href="https://github.com/chyezh"><img src="https://avatars.githubusercontent.com/u/20332315?v=4" width="30px" /></a>
<a href="https://github.com/cjrh"><img src="https://avatars.githubusercontent.com/u/480395?v=4" width="30px" /></a>
<a href="https://github.com/claireyuw"><img src="https://avatars.githubusercontent.com/u/83751381?v=4" width="30px" /></a>
<a href="https://github.com/codacy-badger"><img src="https://avatars.githubusercontent.com/u/23704769?v=4" width="30px" /></a>
<a href="https://github.com/codenoid"><img src="https://avatars.githubusercontent.com/u/14269809?v=4" width="30px" /></a>
<a href="https://github.com/codingjaguar"><img src="https://avatars.githubusercontent.com/u/7064054?v=4" width="30px" /></a>
<a href="https://github.com/congqixia"><img src="https://avatars.githubusercontent.com/u/84113973?v=4" width="30px" /></a>
<a href="https://github.com/corest"><img src="https://avatars.githubusercontent.com/u/1071648?v=4" width="30px" /></a>
<a href="https://github.com/counter2015"><img src="https://avatars.githubusercontent.com/u/13608862?v=4" width="30px" /></a>
<a href="https://github.com/cqy123456"><img src="https://avatars.githubusercontent.com/u/39671710?v=4" width="30px" /></a>
<a href="https://github.com/cuishuang"><img src="https://avatars.githubusercontent.com/u/15921519?v=4" width="30px" /></a>
<a href="https://github.com/cxie"><img src="https://avatars.githubusercontent.com/u/653101?v=4" width="30px" /></a>
<a href="https://github.com/cxytz01"><img src="https://avatars.githubusercontent.com/u/18002438?v=4" width="30px" /></a>
<a href="https://github.com/cydrain"><img src="https://avatars.githubusercontent.com/u/3992404?v=4" width="30px" /></a>
<a href="https://github.com/czpmango"><img src="https://avatars.githubusercontent.com/u/26356194?v=4" width="30px" /></a>
<a href="https://github.com/czs007"><img src="https://avatars.githubusercontent.com/u/59249785?v=4" width="30px" /></a>
<a href="https://github.com/dandv"><img src="https://avatars.githubusercontent.com/u/33569?v=4" width="30px" /></a>
<a href="https://github.com/dariocurr"><img src="https://avatars.githubusercontent.com/u/48800335?v=4" width="30px" /></a>
<a href="https://github.com/datenhahn"><img src="https://avatars.githubusercontent.com/u/13999666?v=4" width="30px" /></a>
<a href="https://github.com/dd-He"><img src="https://avatars.githubusercontent.com/u/24242249?v=4" width="30px" /></a>
<a href="https://github.com/dddddai"><img src="https://avatars.githubusercontent.com/u/41563853?v=4" width="30px" /></a>
<a href="https://github.com/del-zhenwu"><img src="https://avatars.githubusercontent.com/u/56623710?v=4" width="30px" /></a>
<a href="https://github.com/dengxiaohai"><img src="https://avatars.githubusercontent.com/u/137682492?v=4" width="30px" /></a>
<a href="https://github.com/disflyer"><img src="https://avatars.githubusercontent.com/u/22723892?v=4" width="30px" /></a>
<a href="https://github.com/divyaruhil"><img src="https://avatars.githubusercontent.com/u/117009486?v=4" width="30px" /></a>
<a href="https://github.com/donno2048"><img src="https://avatars.githubusercontent.com/u/61805754?v=4" width="30px" /></a>
<a href="https://github.com/drow931"><img src="https://avatars.githubusercontent.com/u/11514434?v=4" width="30px" /></a>
<a href="https://github.com/dvzubarev"><img src="https://avatars.githubusercontent.com/u/14878830?v=4" width="30px" /></a>
<a href="https://github.com/dyhyfu"><img src="https://avatars.githubusercontent.com/u/64584368?v=4" width="30px" /></a>
<a href="https://github.com/eddumelendez"><img src="https://avatars.githubusercontent.com/u/1810547?v=4" width="30px" /></a>
<a href="https://github.com/ehooi"><img src="https://avatars.githubusercontent.com/u/1306183?v=4" width="30px" /></a>
<a href="https://github.com/elfisworking"><img src="https://avatars.githubusercontent.com/u/37609214?v=4" width="30px" /></a>
<a href="https://github.com/eli-b"><img src="https://avatars.githubusercontent.com/u/834999?v=4" width="30px" /></a>
<a href="https://github.com/elstic"><img src="https://avatars.githubusercontent.com/u/48523564?v=4" width="30px" /></a>
<a href="https://github.com/eltociear"><img src="https://avatars.githubusercontent.com/u/22633385?v=4" width="30px" /></a>
<a href="https://github.com/emmanuel-ferdman"><img src="https://avatars.githubusercontent.com/u/35470921?v=4" width="30px" /></a>
<a href="https://github.com/eolivelli"><img src="https://avatars.githubusercontent.com/u/9469110?v=4" width="30px" /></a>
<a href="https://github.com/erdustiggen"><img src="https://avatars.githubusercontent.com/u/25433850?v=4" width="30px" /></a>
<a href="https://github.com/feisiyicl"><img src="https://avatars.githubusercontent.com/u/64510805?v=4" width="30px" /></a>
<a href="https://github.com/fengjun2016"><img src="https://avatars.githubusercontent.com/u/23044049?v=4" width="30px" /></a>
<a href="https://github.com/filip-halt"><img src="https://avatars.githubusercontent.com/u/81822489?v=4" width="30px" /></a>
<a href="https://github.com/filipecaixeta"><img src="https://avatars.githubusercontent.com/u/1094052?v=4" width="30px" /></a>
<a href="https://github.com/fishpenguin"><img src="https://avatars.githubusercontent.com/u/49153041?v=4" width="30px" /></a>
<a href="https://github.com/forsaken628"><img src="https://avatars.githubusercontent.com/u/18322364?v=4" width="30px" /></a>
<a href="https://github.com/foxspy"><img src="https://avatars.githubusercontent.com/u/11503321?v=4" width="30px" /></a>
<a href="https://github.com/franciscojavierarceo"><img src="https://avatars.githubusercontent.com/u/4163062?v=4" width="30px" /></a>
<a href="https://github.com/freestsoul"><img src="https://avatars.githubusercontent.com/u/3909908?v=4" width="30px" /></a>
<a href="https://github.com/gcmutator"><img src="https://avatars.githubusercontent.com/u/134900551?v=4" width="30px" /></a>
<a href="https://github.com/ggaaooppeenngg"><img src="https://avatars.githubusercontent.com/u/4769989?v=4" width="30px" /></a>
<a href="https://github.com/gifi-siby"><img src="https://avatars.githubusercontent.com/u/176461003?v=4" width="30px" /></a>
<a href="https://github.com/git-hulk"><img src="https://avatars.githubusercontent.com/u/4987594?v=4" width="30px" /></a>
<a href="https://github.com/godchen0212"><img src="https://avatars.githubusercontent.com/u/67679556?v=4" width="30px" /></a>
<a href="https://github.com/gracezzzzz"><img src="https://avatars.githubusercontent.com/u/56617657?v=4" width="30px" /></a>
<a href="https://github.com/grtoverflow"><img src="https://avatars.githubusercontent.com/u/8500564?v=4" width="30px" /></a>
<a href="https://github.com/gruebel"><img src="https://avatars.githubusercontent.com/u/33207684?v=4" width="30px" /></a>
<a href="https://github.com/guimou"><img src="https://avatars.githubusercontent.com/u/3944034?v=4" width="30px" /></a>
<a href="https://github.com/gujun720"><img src="https://avatars.githubusercontent.com/u/53246671?v=4" width="30px" /></a>
<a href="https://github.com/guoxiangzhou"><img src="https://avatars.githubusercontent.com/u/52496626?v=4" width="30px" /></a>
<a href="https://github.com/hadim"><img src="https://avatars.githubusercontent.com/u/528003?v=4" width="30px" /></a>
<a href="https://github.com/haorenfsa"><img src="https://avatars.githubusercontent.com/u/15938850?v=4" width="30px" /></a>
<a href="https://github.com/hedane"><img src="https://avatars.githubusercontent.com/u/12457872?v=4" width="30px" /></a>
<a href="https://github.com/henryoswald"><img src="https://avatars.githubusercontent.com/u/343366?v=4" width="30px" /></a>
<a href="https://github.com/hishope"><img src="https://avatars.githubusercontent.com/u/153272819?v=4" width="30px" /></a>
<a href="https://github.com/huanghaoyuanhhy"><img src="https://avatars.githubusercontent.com/u/103482615?v=4" width="30px" /></a>
<a href="https://github.com/huangjincheng2022"><img src="https://avatars.githubusercontent.com/u/98305308?v=4" width="30px" /></a>
<a href="https://github.com/ibrahimhaddad"><img src="https://avatars.githubusercontent.com/u/1656002?v=4" width="30px" /></a>
<a href="https://github.com/im-ajaymeena"><img src="https://avatars.githubusercontent.com/u/19550841?v=4" width="30px" /></a>
<a href="https://github.com/ireneontheway5"><img src="https://avatars.githubusercontent.com/u/75291211?v=4" width="30px" /></a>
<a href="https://github.com/iynewz"><img src="https://avatars.githubusercontent.com/u/81401074?v=4" width="30px" /></a>
<a href="https://github.com/izapolsk"><img src="https://avatars.githubusercontent.com/u/21039333?v=4" width="30px" /></a>
<a href="https://github.com/jackyu2020"><img src="https://avatars.githubusercontent.com/u/64533877?v=4" width="30px" /></a>
<a href="https://github.com/jaelgu"><img src="https://avatars.githubusercontent.com/u/86251631?v=4" width="30px" /></a>
<a href="https://github.com/jaime0815"><img src="https://avatars.githubusercontent.com/u/4024711?v=4" width="30px" /></a>
<a href="https://github.com/jeffoverflow"><img src="https://avatars.githubusercontent.com/u/24581746?v=4" width="30px" /></a>
<a href="https://github.com/jenkoon"><img src="https://avatars.githubusercontent.com/u/27683687?v=4" width="30px" /></a>
<a href="https://github.com/jennyli-z"><img src="https://avatars.githubusercontent.com/u/93511422?v=4" width="30px" /></a>
<a href="https://github.com/jfwm2"><img src="https://avatars.githubusercontent.com/u/16882135?v=4" width="30px" /></a>
<a href="https://github.com/jhonroxton"><img src="https://avatars.githubusercontent.com/u/105436184?v=4" width="30px" /></a>
<a href="https://github.com/jiangke-sr"><img src="https://avatars.githubusercontent.com/u/68629395?v=4" width="30px" /></a>
<a href="https://github.com/jiangyinzuo"><img src="https://avatars.githubusercontent.com/u/40995042?v=4" width="30px" /></a>
<a href="https://github.com/jiaoew1991"><img src="https://avatars.githubusercontent.com/u/2297455?v=4" width="30px" /></a>
<a href="https://github.com/jiaqizho"><img src="https://avatars.githubusercontent.com/u/8388185?v=4" width="30px" /></a>
<a href="https://github.com/jielinxu"><img src="https://avatars.githubusercontent.com/u/52057195?v=4" width="30px" /></a>
<a href="https://github.com/jingkl"><img src="https://avatars.githubusercontent.com/u/34296482?v=4" width="30px" /></a>
<a href="https://github.com/jjaikumar-xyla"><img src="https://avatars.githubusercontent.com/u/144144634?v=4" width="30px" /></a>
<a href="https://github.com/jjyaoao"><img src="https://avatars.githubusercontent.com/u/88936287?v=4" width="30px" /></a>
<a href="https://github.com/jkx8fc"><img src="https://avatars.githubusercontent.com/u/31717785?v=4" width="30px" /></a>
<a href="https://github.com/joeyjooste"><img src="https://avatars.githubusercontent.com/u/72280325?v=4" width="30px" /></a>
<a href="https://github.com/john-h-luo"><img src="https://avatars.githubusercontent.com/u/67673717?v=4" width="30px" /></a>
<a href="https://github.com/jperez999"><img src="https://avatars.githubusercontent.com/u/37191411?v=4" width="30px" /></a>
<a href="https://github.com/juliens"><img src="https://avatars.githubusercontent.com/u/195661?v=4" width="30px" /></a>
<a href="https://github.com/junjiejiangjjj"><img src="https://avatars.githubusercontent.com/u/14136703?v=4" width="30px" /></a>
<a href="https://github.com/jvirgovic"><img src="https://avatars.githubusercontent.com/u/138708600?v=4" width="30px" /></a>
<a href="https://github.com/jyc4617"><img src="https://avatars.githubusercontent.com/u/3044583?v=4" width="30px" /></a>
<a href="https://github.com/kartikcho"><img src="https://avatars.githubusercontent.com/u/48270786?v=4" width="30px" /></a>
<a href="https://github.com/kateshaowanjou"><img src="https://avatars.githubusercontent.com/u/58837504?v=4" width="30px" /></a>
<a href="https://github.com/klboke"><img src="https://avatars.githubusercontent.com/u/18591662?v=4" width="30px" /></a>
<a href="https://github.com/laipz8200"><img src="https://avatars.githubusercontent.com/u/16485841?v=4" width="30px" /></a>
<a href="https://github.com/laurazhao0611"><img src="https://avatars.githubusercontent.com/u/192320184?v=4" width="30px" /></a>
<a href="https://github.com/lee-eve"><img src="https://avatars.githubusercontent.com/u/9720105?v=4" width="30px" /></a>
<a href="https://github.com/lee-taejun"><img src="https://avatars.githubusercontent.com/u/33862757?v=4" width="30px" /></a>
<a href="https://github.com/lentitude2tk"><img src="https://avatars.githubusercontent.com/u/108672767?v=4" width="30px" /></a>
<a href="https://github.com/leonardokidd"><img src="https://avatars.githubusercontent.com/u/14940941?v=4" width="30px" /></a>
<a href="https://github.com/letian-jiang"><img src="https://avatars.githubusercontent.com/u/16740944?v=4" width="30px" /></a>
<a href="https://github.com/letme5"><img src="https://avatars.githubusercontent.com/u/76860836?v=4" width="30px" /></a>
<a href="https://github.com/leykun10"><img src="https://avatars.githubusercontent.com/u/45382760?v=4" width="30px" /></a>
<a href="https://github.com/lhotari"><img src="https://avatars.githubusercontent.com/u/66864?v=4" width="30px" /></a>
<a href="https://github.com/liliu-z"><img src="https://avatars.githubusercontent.com/u/105927039?v=4" width="30px" /></a>
<a href="https://github.com/linhgao"><img src="https://avatars.githubusercontent.com/u/102851605?v=4" width="30px" /></a>
<a href="https://github.com/liyun95"><img src="https://avatars.githubusercontent.com/u/105278390?v=4" width="30px" /></a>
<a href="https://github.com/lmzzzzz1"><img src="https://avatars.githubusercontent.com/u/43360234?v=4" width="30px" /></a>
<a href="https://github.com/locustbaby"><img src="https://avatars.githubusercontent.com/u/21237232?v=4" width="30px" /></a>
<a href="https://github.com/loguo"><img src="https://avatars.githubusercontent.com/u/15364733?v=4" width="30px" /></a>
<a href="https://github.com/longjiquan"><img src="https://avatars.githubusercontent.com/u/31589260?v=4" width="30px" /></a>
<a href="https://github.com/lowener"><img src="https://avatars.githubusercontent.com/u/9810050?v=4" width="30px" /></a>
<a href="https://github.com/lsgrep"><img src="https://avatars.githubusercontent.com/u/3893940?v=4" width="30px" /></a>
<a href="https://github.com/lwglgy"><img src="https://avatars.githubusercontent.com/u/26682620?v=4" width="30px" /></a>
<a href="https://github.com/madogar"><img src="https://avatars.githubusercontent.com/u/36537062?v=4" width="30px" /></a>
<a href="https://github.com/maksspace"><img src="https://avatars.githubusercontent.com/u/9841409?v=4" width="30px" /></a>
<a href="https://github.com/marcelo-cjl"><img src="https://avatars.githubusercontent.com/u/222351274?v=4" width="30px" /></a>
<a href="https://github.com/matchyc"><img src="https://avatars.githubusercontent.com/u/57976772?v=4" width="30px" /></a>
<a href="https://github.com/matrixji"><img src="https://avatars.githubusercontent.com/u/183388?v=4" width="30px" /></a>
<a href="https://github.com/mausch"><img src="https://avatars.githubusercontent.com/u/95194?v=4" width="30px" /></a>
<a href="https://github.com/mcamou"><img src="https://avatars.githubusercontent.com/u/87200?v=4" width="30px" /></a>
<a href="https://github.com/michaelkl"><img src="https://avatars.githubusercontent.com/u/1443825?v=4" width="30px" /></a>
<a href="https://github.com/mihailyanchev"><img src="https://avatars.githubusercontent.com/u/34907806?v=4" width="30px" /></a>
<a href="https://github.com/mileyzjq"><img src="https://avatars.githubusercontent.com/u/37039827?v=4" width="30px" /></a>
<a href="https://github.com/milvus-ci-robot"><img src="https://avatars.githubusercontent.com/u/87847967?v=4" width="30px" /></a>
<a href="https://github.com/mimoning"><img src="https://avatars.githubusercontent.com/u/19261942?v=4" width="30px" /></a>
<a href="https://github.com/moe-of-faith"><img src="https://avatars.githubusercontent.com/u/5696721?v=4" width="30px" /></a>
<a href="https://github.com/mohitreddy1996"><img src="https://avatars.githubusercontent.com/u/11742913?v=4" width="30px" /></a>
<a href="https://github.com/nameczz"><img src="https://avatars.githubusercontent.com/u/20559208?v=4" width="30px" /></a>
<a href="https://github.com/natoka"><img src="https://avatars.githubusercontent.com/u/1751024?v=4" width="30px" /></a>
<a href="https://github.com/ncover21"><img src="https://avatars.githubusercontent.com/u/30241297?v=4" width="30px" /></a>
<a href="https://github.com/nexttonever"><img src="https://avatars.githubusercontent.com/u/31059690?v=4" width="30px" /></a>
<a href="https://github.com/neza2017"><img src="https://avatars.githubusercontent.com/u/34152706?v=4" width="30px" /></a>
<a href="https://github.com/nianliuu"><img src="https://avatars.githubusercontent.com/u/136299351?v=4" width="30px" /></a>
<a href="https://github.com/nish112022"><img src="https://avatars.githubusercontent.com/u/148342058?v=4" width="30px" /></a>
<a href="https://github.com/nustiueudinastea"><img src="https://avatars.githubusercontent.com/u/588327?v=4" width="30px" /></a>
<a href="https://github.com/op-hunter"><img src="https://avatars.githubusercontent.com/u/5617677?v=4" width="30px" /></a>
<a href="https://github.com/ownbylichaobao"><img src="https://avatars.githubusercontent.com/u/37684963?v=4" width="30px" /></a>
<a href="https://github.com/panjf2000"><img src="https://avatars.githubusercontent.com/u/7496278?v=4" width="30px" /></a>
<a href="https://github.com/phantom8548"><img src="https://avatars.githubusercontent.com/u/11576622?v=4" width="30px" /></a>
<a href="https://github.com/pingliu"><img src="https://avatars.githubusercontent.com/u/6415493?v=4" width="30px" /></a>
<a href="https://github.com/pj1987111"><img src="https://avatars.githubusercontent.com/u/6268414?v=4" width="30px" /></a>
<a href="https://github.com/ponponon"><img src="https://avatars.githubusercontent.com/u/38725104?v=4" width="30px" /></a>
<a href="https://github.com/preetham"><img src="https://avatars.githubusercontent.com/u/9149028?v=4" width="30px" /></a>
<a href="https://github.com/proost"><img src="https://avatars.githubusercontent.com/u/34047134?v=4" width="30px" /></a>
<a href="https://github.com/psc0606"><img src="https://avatars.githubusercontent.com/u/7888889?v=4" width="30px" /></a>
<a href="https://github.com/punkerpunker"><img src="https://avatars.githubusercontent.com/u/54440025?v=4" width="30px" /></a>
<a href="https://github.com/qbzenker"><img src="https://avatars.githubusercontent.com/u/51972064?v=4" width="30px" /></a>
<a href="https://github.com/qixuan0212"><img src="https://avatars.githubusercontent.com/u/135136620?v=4" width="30px" /></a>
<a href="https://github.com/rahulmistri1997"><img src="https://avatars.githubusercontent.com/u/58909377?v=4" width="30px" /></a>
<a href="https://github.com/rashgaroth"><img src="https://avatars.githubusercontent.com/u/50513263?v=4" width="30px" /></a>
<a href="https://github.com/richzw"><img src="https://avatars.githubusercontent.com/u/1590890?v=4" width="30px" /></a>
<a href="https://github.com/ronnie-llamado"><img src="https://avatars.githubusercontent.com/u/35092029?v=4" width="30px" /></a>
<a href="https://github.com/sachitolani"><img src="https://avatars.githubusercontent.com/u/146494073?v=4" width="30px" /></a>
<a href="https://github.com/sageanya"><img src="https://avatars.githubusercontent.com/u/37909674?v=4" width="30px" /></a>
<a href="https://github.com/saisona"><img src="https://avatars.githubusercontent.com/u/10884762?v=4" width="30px" /></a>
<a href="https://github.com/saivarunk"><img src="https://avatars.githubusercontent.com/u/2976867?v=4" width="30px" /></a>
<a href="https://github.com/sangheee"><img src="https://avatars.githubusercontent.com/u/29528531?v=4" width="30px" /></a>
<a href="https://github.com/sarah-inkeep"><img src="https://avatars.githubusercontent.com/u/129242944?v=4" width="30px" /></a>
<a href="https://github.com/scipe"><img src="https://avatars.githubusercontent.com/u/3996622?v=4" width="30px" /></a>
<a href="https://github.com/scsven"><img src="https://avatars.githubusercontent.com/u/100122127?v=4" width="30px" /></a>
<a href="https://github.com/seo-jinBro"><img src="https://avatars.githubusercontent.com/u/17746814?v=4" width="30px" /></a>
<a href="https://github.com/septemberfd"><img src="https://avatars.githubusercontent.com/u/40378371?v=4" width="30px" /></a>
<a href="https://github.com/shana0325"><img src="https://avatars.githubusercontent.com/u/33335490?v=4" width="30px" /></a>
<a href="https://github.com/shanghaikid"><img src="https://avatars.githubusercontent.com/u/185051?v=4" width="30px" /></a>
<a href="https://github.com/shaoting-huang"><img src="https://avatars.githubusercontent.com/u/167743503?v=4" width="30px" /></a>
<a href="https://github.com/shengjh"><img src="https://avatars.githubusercontent.com/u/46514371?v=4" width="30px" /></a>
<a href="https://github.com/shengjun1985"><img src="https://avatars.githubusercontent.com/u/49774184?v=4" width="30px" /></a>
<a href="https://github.com/shiyu09"><img src="https://avatars.githubusercontent.com/u/39143280?v=4" width="30px" /></a>
<a href="https://github.com/shiyu22"><img src="https://avatars.githubusercontent.com/u/53459423?v=4" width="30px" /></a>
<a href="https://github.com/shunjiezhao"><img src="https://avatars.githubusercontent.com/u/90906581?v=4" width="30px" /></a>
<a href="https://github.com/siddarth99"><img src="https://avatars.githubusercontent.com/u/38921750?v=4" width="30px" /></a>
<a href="https://github.com/sileht"><img src="https://avatars.githubusercontent.com/u/200878?v=4" width="30px" /></a>
<a href="https://github.com/simonwei97"><img src="https://avatars.githubusercontent.com/u/119845914?v=4" width="30px" /></a>
<a href="https://github.com/siriusctrl"><img src="https://avatars.githubusercontent.com/u/26541600?v=4" width="30px" /></a>
<a href="https://github.com/slobentanzer"><img src="https://avatars.githubusercontent.com/u/13223629?v=4" width="30px" /></a>
<a href="https://github.com/smackfu"><img src="https://avatars.githubusercontent.com/u/1723952?v=4" width="30px" /></a>
<a href="https://github.com/smdsbz"><img src="https://avatars.githubusercontent.com/u/19503270?v=4" width="30px" /></a>
<a href="https://github.com/smellthemoon"><img src="https://avatars.githubusercontent.com/u/64083300?v=4" width="30px" /></a>
<a href="https://github.com/snyk-bot"><img src="https://avatars.githubusercontent.com/u/19733683?v=4" width="30px" /></a>
<a href="https://github.com/songxianj"><img src="https://avatars.githubusercontent.com/u/107831450?v=4" width="30px" /></a>
<a href="https://github.com/soothing-rain"><img src="https://avatars.githubusercontent.com/u/69466447?v=4" width="30px" /></a>
<a href="https://github.com/soulteary"><img src="https://avatars.githubusercontent.com/u/1500781?v=4" width="30px" /></a>
<a href="https://github.com/sparknack"><img src="https://avatars.githubusercontent.com/u/22293270?v=4" width="30px" /></a>
<a href="https://github.com/sre-ci-robot"><img src="https://avatars.githubusercontent.com/u/56469371?v=4" width="30px" /></a>
<a href="https://github.com/sre-ro"><img src="https://avatars.githubusercontent.com/u/93502486?v=4" width="30px" /></a>
<a href="https://github.com/sreyan-ghosh"><img src="https://avatars.githubusercontent.com/u/60854658?v=4" width="30px" /></a>
<a href="https://github.com/ss892714028"><img src="https://avatars.githubusercontent.com/u/34635663?v=4" width="30px" /></a>
<a href="https://github.com/stacyli-0601"><img src="https://avatars.githubusercontent.com/u/218570478?v=4" width="30px" /></a>
<a href="https://github.com/stephen37"><img src="https://avatars.githubusercontent.com/u/6506810?v=4" width="30px" /></a>
<a href="https://github.com/stevetracvc"><img src="https://avatars.githubusercontent.com/u/70416691?v=4" width="30px" /></a>
<a href="https://github.com/stuartjing"><img src="https://avatars.githubusercontent.com/u/3454260?v=4" width="30px" /></a>
<a href="https://github.com/sunby"><img src="https://avatars.githubusercontent.com/u/9817127?v=4" width="30px" /></a>
<a href="https://github.com/sutcalag"><img src="https://avatars.githubusercontent.com/u/83750738?v=4" width="30px" /></a>
<a href="https://github.com/sworddish"><img src="https://avatars.githubusercontent.com/u/219938?v=4" width="30px" /></a>
<a href="https://github.com/talentAN"><img src="https://avatars.githubusercontent.com/u/17634030?v=4" width="30px" /></a>
<a href="https://github.com/tasty-gumi"><img src="https://avatars.githubusercontent.com/u/95212988?v=4" width="30px" /></a>
<a href="https://github.com/taydy"><img src="https://avatars.githubusercontent.com/u/24822588?v=4" width="30px" /></a>
<a href="https://github.com/tbickford"><img src="https://avatars.githubusercontent.com/u/814232?v=4" width="30px" /></a>
<a href="https://github.com/tedxu"><img src="https://avatars.githubusercontent.com/u/152654?v=4" width="30px" /></a>
<a href="https://github.com/tedyu"><img src="https://avatars.githubusercontent.com/u/235188?v=4" width="30px" /></a>
<a href="https://github.com/testwill"><img src="https://avatars.githubusercontent.com/u/8717479?v=4" width="30px" /></a>
<a href="https://github.com/thywdy"><img src="https://avatars.githubusercontent.com/u/56624359?v=4" width="30px" /></a>
<a href="https://github.com/timothycarambat"><img src="https://avatars.githubusercontent.com/u/16845892?v=4" width="30px" /></a>
<a href="https://github.com/tinkerlin"><img src="https://avatars.githubusercontent.com/u/13817362?v=4" width="30px" /></a>
<a href="https://github.com/tinswzy"><img src="https://avatars.githubusercontent.com/u/30112657?v=4" width="30px" /></a>
<a href="https://github.com/topikachu"><img src="https://avatars.githubusercontent.com/u/1520380?v=4" width="30px" /></a>
<a href="https://github.com/trovwu"><img src="https://avatars.githubusercontent.com/u/89676996?v=4" width="30px" /></a>
<a href="https://github.com/tsonglew"><img src="https://avatars.githubusercontent.com/u/14333766?v=4" width="30px" /></a>
<a href="https://github.com/tuwchia"><img src="https://avatars.githubusercontent.com/u/13282807?v=4" width="30px" /></a>
<a href="https://github.com/ulovecode"><img src="https://avatars.githubusercontent.com/u/30142181?v=4" width="30px" /></a>
<a href="https://github.com/uncle-cyh"><img src="https://avatars.githubusercontent.com/u/42989534?v=4" width="30px" /></a>
<a href="https://github.com/unfode"><img src="https://avatars.githubusercontent.com/u/95689995?v=4" width="30px" /></a>
<a href="https://github.com/vladwa"><img src="https://avatars.githubusercontent.com/u/22994848?v=4" width="30px" /></a>
<a href="https://github.com/vsanna"><img src="https://avatars.githubusercontent.com/u/7834445?v=4" width="30px" /></a>
<a href="https://github.com/vtereshyn"><img src="https://avatars.githubusercontent.com/u/32247411?v=4" width="30px" /></a>
<a href="https://github.com/wangting0128"><img src="https://avatars.githubusercontent.com/u/26307815?v=4" width="30px" /></a>
<a href="https://github.com/water32"><img src="https://avatars.githubusercontent.com/u/13234561?v=4" width="30px" /></a>
<a href="https://github.com/wayblink"><img src="https://avatars.githubusercontent.com/u/18096561?v=4" width="30px" /></a>
<a href="https://github.com/weiliu1031"><img src="https://avatars.githubusercontent.com/u/108661493?v=4" width="30px" /></a>
<a href="https://github.com/weishuo2"><img src="https://avatars.githubusercontent.com/u/27938020?v=4" width="30px" /></a>
<a href="https://github.com/wg1026688210"><img src="https://avatars.githubusercontent.com/u/14267759?v=4" width="30px" /></a>
<a href="https://github.com/wh201906"><img src="https://avatars.githubusercontent.com/u/62299611?v=4" width="30px" /></a>
<a href="https://github.com/wscxyey"><img src="https://avatars.githubusercontent.com/u/48882296?v=4" width="30px" /></a>
<a href="https://github.com/wwx441476"><img src="https://avatars.githubusercontent.com/u/28601121?v=4" width="30px" /></a>
<a href="https://github.com/wxyucs"><img src="https://avatars.githubusercontent.com/u/12595343?v=4" width="30px" /></a>
<a href="https://github.com/wxywb"><img src="https://avatars.githubusercontent.com/u/5432721?v=4" width="30px" /></a>
<a href="https://github.com/wzymumon"><img src="https://avatars.githubusercontent.com/u/46886508?v=4" width="30px" /></a>
<a href="https://github.com/xaxys"><img src="https://avatars.githubusercontent.com/u/28949072?v=4" width="30px" /></a>
<a href="https://github.com/xiangzhouguo"><img src="https://avatars.githubusercontent.com/u/93316470?v=4" width="30px" /></a>
<a href="https://github.com/xiaocai2333"><img src="https://avatars.githubusercontent.com/u/46207236?v=4" width="30px" /></a>
<a href="https://github.com/xiaofan-luan"><img src="https://avatars.githubusercontent.com/u/83447078?v=4" width="30px" /></a>
<a href="https://github.com/xiaohu4313888"><img src="https://avatars.githubusercontent.com/u/39088547?v=4" width="30px" /></a>
<a href="https://github.com/xiaowshi"><img src="https://avatars.githubusercontent.com/u/45102896?v=4" width="30px" /></a>
<a href="https://github.com/xiedeyantu"><img src="https://avatars.githubusercontent.com/u/49781471?v=4" width="30px" /></a>
<a href="https://github.com/xige-16"><img src="https://avatars.githubusercontent.com/u/20124155?v=4" width="30px" /></a>
<a href="https://github.com/xiyichan"><img src="https://avatars.githubusercontent.com/u/34647972?v=4" width="30px" /></a>
<a href="https://github.com/xlyslr"><img src="https://avatars.githubusercontent.com/u/14070517?v=4" width="30px" /></a>
<a href="https://github.com/xudalin0609"><img src="https://avatars.githubusercontent.com/u/35444753?v=4" width="30px" /></a>
<a href="https://github.com/xuqiwe"><img src="https://avatars.githubusercontent.com/u/57252655?v=4" width="30px" /></a>
<a href="https://github.com/xzshinan"><img src="https://avatars.githubusercontent.com/u/7299894?v=4" width="30px" /></a>
<a href="https://github.com/yah01"><img src="https://avatars.githubusercontent.com/u/12216890?v=4" width="30px" /></a>
<a href="https://github.com/yahorbarkouski"><img src="https://avatars.githubusercontent.com/u/94449298?v=4" width="30px" /></a>
<a href="https://github.com/yamasite"><img src="https://avatars.githubusercontent.com/u/10089260?v=4" width="30px" /></a>
<a href="https://github.com/yanbinyang"><img src="https://avatars.githubusercontent.com/u/2880762?v=4" width="30px" /></a>
<a href="https://github.com/yanliang567"><img src="https://avatars.githubusercontent.com/u/82361606?v=4" width="30px" /></a>
<a href="https://github.com/yellow-shine"><img src="https://avatars.githubusercontent.com/u/149367927?v=4" width="30px" /></a>
<a href="https://github.com/yelusion2"><img src="https://avatars.githubusercontent.com/u/97278661?v=4" width="30px" /></a>
<a href="https://github.com/yhmo"><img src="https://avatars.githubusercontent.com/u/2282099?v=4" width="30px" /></a>
<a href="https://github.com/yiuluchen"><img src="https://avatars.githubusercontent.com/u/23047684?v=4" width="30px" /></a>
<a href="https://github.com/yiwangdr"><img src="https://avatars.githubusercontent.com/u/80064917?v=4" width="30px" /></a>
<a href="https://github.com/yiwen92"><img src="https://avatars.githubusercontent.com/u/34636520?v=4" width="30px" /></a>
<a href="https://github.com/yongpengli-z"><img src="https://avatars.githubusercontent.com/u/103410837?v=4" width="30px" /></a>
<a href="https://github.com/youny626"><img src="https://avatars.githubusercontent.com/u/9016120?v=4" width="30px" /></a>
<a href="https://github.com/yuyicai"><img src="https://avatars.githubusercontent.com/u/13033733?v=4" width="30px" /></a>
<a href="https://github.com/yxm1536"><img src="https://avatars.githubusercontent.com/u/62009483?v=4" width="30px" /></a>
<a href="https://github.com/zander-bobronnikov"><img src="https://avatars.githubusercontent.com/u/183726703?v=4" width="30px" /></a>
<a href="https://github.com/zc2638"><img src="https://avatars.githubusercontent.com/u/28284116?v=4" width="30px" /></a>
<a href="https://github.com/zc277584121"><img src="https://avatars.githubusercontent.com/u/17022025?v=4" width="30px" /></a>
<a href="https://github.com/zengxy"><img src="https://avatars.githubusercontent.com/u/11961641?v=4" width="30px" /></a>
<a href="https://github.com/zerowe-seven"><img src="https://avatars.githubusercontent.com/u/57790060?v=4" width="30px" /></a>
<a href="https://github.com/zhagnlu"><img src="https://avatars.githubusercontent.com/u/11935707?v=4" width="30px" /></a>
<a href="https://github.com/zhang787jun"><img src="https://avatars.githubusercontent.com/u/51014996?v=4" width="30px" /></a>
<a href="https://github.com/zhanshuyou"><img src="https://avatars.githubusercontent.com/u/7420640?v=4" width="30px" /></a>
<a href="https://github.com/zhanxu33"><img src="https://avatars.githubusercontent.com/u/16716445?v=4" width="30px" /></a>
<a href="https://github.com/zhengbuqian"><img src="https://avatars.githubusercontent.com/u/12147173?v=4" width="30px" /></a>
<a href="https://github.com/zhenwu-cn"><img src="https://avatars.githubusercontent.com/u/2993941?v=4" width="30px" /></a>
<a href="https://github.com/zhikunyao"><img src="https://avatars.githubusercontent.com/u/129478994?v=4" width="30px" /></a>
<a href="https://github.com/zhoubo0317"><img src="https://avatars.githubusercontent.com/u/51948620?v=4" width="30px" /></a>
<a href="https://github.com/zhuwenxing"><img src="https://avatars.githubusercontent.com/u/12268675?v=4" width="30px" /></a>
<a href="https://github.com/zhuyaguang"><img src="https://avatars.githubusercontent.com/u/8857976?v=4" width="30px" /></a>
<a href="https://github.com/zjjzyl"><img src="https://avatars.githubusercontent.com/u/6939141?v=4" width="30px" /></a>
<a href="https://github.com/zxf2017"><img src="https://avatars.githubusercontent.com/u/29620478?v=4" width="30px" /></a>
<!-- Do not remove end of hero-bot -->
+7
View File
@@ -0,0 +1,7 @@
# WeHub 来源说明
- 原始项目:`milvus-io/milvus`
- 原始仓库:https://github.com/milvus-io/milvus
- 导入方式:上游默认分支的最新快照
- 原作者、版权和许可证信息以原始仓库及本仓库 LICENSE 为准
- 本文件仅用于记录来源,不代表 WeHub 是原项目作者
+685
View File
@@ -0,0 +1,685 @@
<img src="https://repository-images.githubusercontent.com/208728772/998c09ca-cfa6-4c01-ac75-3dfad7f4862b" alt="Milvus banner">
<div class="column" align="middle">
<a href="https://milvus.io/slack">
<img src="https://img.shields.io/badge/Join-Slack-orange" alt="join-slack"/>
</a>
<img src="https://img.shields.io/github/license/milvus-io/milvus" alt="license"/>
<img src="https://img.shields.io/docker/pulls/milvusdb/milvus" alt="docker-pull-count" />
</div>
# 欢迎来到 Milvus
## Milvus 是什么
Milvus 是一款全球领先的开源向量数据库,赋能 AI 应用和向量相似度搜索,加速非结构化数据检索。用户在任何部署环境中均可获得始终如一的用户体验。
Milvus 2.0 是一款云原生向量数据库,采用存储与计算分离的架构设计。该重构版本的所有组件均为无状态组件,极大地增强了系统弹性和灵活性。更多系统架构细节,参考 [Milvus 系统架构](https://milvus.io/cn/docs/architecture_overview.md)。
Milvus 基于 [Apache 2.0 License](https://github.com/milvus-io/milvus/blob/master/LICENSE) 协议发布,于 2019 年 10 月正式开源,是 [LF AI & Data 基金会](https://lfaidata.foundation/) 的毕业项目。
## 产品亮点
<details>
<summary><b>针对万亿级向量的毫秒级搜索</b></summary>
完成万亿条向量数据搜索的平均延迟以毫秒计。
</details>
<details>
<summary><b>简化的非结构化数据管理</b></summary>
<li>一整套专为数据科学工作流设计的 API。</li><li>无论是笔记本、本地集群还是云服务器,始终如一的跨平台用户体验。</li><li>可以在任何场景下实现实时搜索与分析。</li>
</details>
<details>
<summary><b>稳定可靠的用户体验</b></summary>
Milvus 具有故障转移和故障恢复的机制,即使服务中断,也能确保数据和应用的业务连续性。
</details>
<details>
<summary><b>高度可扩展,弹性伸缩</b></summary>
组件级别的高扩展性,支持精准扩展。
</details>
<details>
<summary><b>混合查询</b></summary>
Milvus 2.4 引入了多向量支持和混合查询框架,用户可以将多个向量字段(最多 10 个)导入到单个 Collection 中。这些来自不同的嵌入模型或经过不同的处理方法处理的向量分别代表了不同的数据特征。混合搜索的结果使用 reranking 策略对各向量列的结果进行融合,如 Reciprocal Rank Fusion (RRF) 和 Weighted Scoring。
该特性尤其适用于综合搜索场景,如基于多种属性(如照片、声音、指纹等)识别向量库中最相似的人。有关更多信息,请参阅 [混合搜索](https://milvus.io/cn/docs/multi-vector-search.md)。
</details>
<details>
<summary><b>基于 Lambda 架构的流批一体式数据存储</b></summary>
Milvus 在存储数据时支持流处理和批处理两种方式,兼顾了流处理的时效性和批处理的效率。统一的对外接口使得向量相似度查询更为便捷。
</details>
<details>
<summary><b>广受社区支持和业界认可</b></summary>
Milvus 项目在 GitHub 上获星超 8000,拥有逾 1000 家企业用户,还有活跃的开源社区。Milvus 由 <a href="https://lfaidata.foundation/">LF AI & Data 基金会</a> 背书,是该基金会的毕业项目。
</details>
## 快速开始
### 启动 Milvus
- [安装 Milvus 单机版](https://milvus.io/cn/docs/v2.0.0/install_standalone-docker.md)
- [安装 Milvus 分布式版本](https://milvus.io/cn/docs/v2.0.0/install_cluster-docker.md)
### 源码编译 Milvus
请先安装相关依赖。
```
go: 1.21
cmake: >=3.18
gcc: >= 11
protobuf: >=3.7
```
克隆 Milvus 项目并编译。
```bash
# 克隆项目
$ git clone https://github.com/milvus-io/milvus.git
# 安装第三方依赖
$ cd milvus/
$ ./scripts/install_deps.sh
# 编译 Milvus 单机版
$ make milvus
```
获取更多内容,请阅读 [开发者文档](https://github.com/milvus-io/milvus/blob/master/DEVELOPMENT.md)。
> **注意** 主分支用于 Milvus v2.0 代码开发。Milvus v1.0 于 2021 年 3 月 9 日发布,是 Milvus 的首个长期支持(LTS)版本。如需使用 Milvus 1.0,请切换至 [1.0 分支](https://github.com/milvus-io/milvus/tree/1.0)。
## Milvus 2.0:功能增加、性能升级
详见 [Milvus 2.0 vs. 1.x](https://github.com/milvus-io/milvus/blob/master/milvus20vs1x.md) 。
## 入门指南
### 教程
你可以从[教程概述](https://milvus.io/docs/tutorials-overview.md)中,找到涵盖 RAG(检索增强生成)、语义搜索、混合搜索、问答、推荐系统等主题以及各种快速入门指南。这些资源旨在帮助你快速高效地入门。
| 教程 | 使用场景 | 相关 Milvus 功能 |
| -------- | -------- | --------- |
| [使用 Milvus 构建 RAG](https://milvus.io/docs/build-rag-with-milvus.md) | RAG | 向量搜索 |
| [使用 Milvus 构建多模态 RAG](https://milvus.io/docs/multimodal_rag_with_milvus.md) | RAG | 向量搜索, 动态字段 |
| [使用 Milvus 进行图像搜索](https://milvus.io/docs/image_similarity_search.md) | 语义搜索 | 向量搜索, 动态字段 |
| [使用 Milvus 进行混合搜索](https://milvus.io/docs/hybrid_search_with_milvus.md) | 混合搜索 | 混合搜索, 多向量, 密集嵌入, 稀疏嵌入 |
| [使用多向量实现多模态搜索](https://milvus.io/docs/multimodal_rag_with_milvus.md) | 语义搜索 | 多向量, 混合搜索 |
| [问答系统](https://milvus.io/docs/question_answering_system.md) | 问答系统 | 向量搜索 |
| [推荐系统](https://milvus.io/docs/recommendation_system.md) | 推荐系统 | 向量搜索 |
| [视频相似性搜索](https://milvus.io/docs/video_similarity_search.md) | 语义搜索 | 向量搜索 |
| [音频相似性搜索](https://milvus.io/docs/audio_similarity_search.md) | 语义搜索 | 向量搜索 |
| [DNA 分类](https://milvus.io/docs/dna_sequence_classification.md) | 分类 | 向量搜索 |
| [文本搜索引擎](https://milvus.io/docs/text_search_engine.md) | 语义搜索 | 向量搜索 |
| [通过文本搜索图像](https://milvus.io/docs/text_image_search.md) | 语义搜索 | 向量搜索 |
| [图像去重](https://milvus.io/docs/image_deduplication_system.md) | 重复数据删除 | 向量搜索 |
| [使用 Milvus 构建图形 RAG](https://milvus.io/docs/graph_rag_with_milvus.md) | RAG | 图搜索 |
| [使用 Milvus 进行上下文检索](https://milvus.io/docs/contextual_retrieval_with_milvus.md) | 快速入门 | 向量搜索 |
| [使用 Milvus 进行 HDBSCAN 聚类](https://milvus.io/docs/hdbscan_clustering_with_milvus.md) | 快速入门 | 向量搜索 |
| [使用 ColPali 实现多模态检索](https://milvus.io/docs/use_ColPali_with_milvus.md) | 快速入门 | 向量搜索 |
| [向量可视化](https://milvus.io/docs/vector_visualization.md) | 快速入门 | 向量搜索 |
| [基于 Milvus 的电影推荐](https://milvus.io/docs/movie_recommendation_with_milvus.md) | 推荐系统 | 向量搜索 |
| [使用 Matryoshka 嵌入进行漏斗搜索](https://milvus.io/docs/funnel_search_with_matryoshka.md) | 快速入门 | 向量搜索 |
### 应用场景
<table>
<tr>
<td width="30%">
<a href="https://milvus.io/milvus-demos">
<img src="https://assets.zilliz.com/image_search_59a64e4f22.gif" />
</a>
</td>
<td width="30%">
<a href="https://milvus.io/milvus-demos">
<img src="https://assets.zilliz.com/qa_df5ee7bd83.gif" />
</a>
</td>
<td width="30%">
<a href="https://milvus.io/milvus-demos">
<img src="https://assets.zilliz.com/mole_search_76f8340572.gif" />
</a>
</td>
</tr>
<tr>
<th>
<a href="https://milvus.io/milvus-demos">以图搜图系统</a>
</th>
<th>
<a href="https://milvus.io/milvus-demos">智能问答机器人</a>
</th>
<th>
<a href="https://milvus.io/milvus-demos">分子式检索系统</a>
</th>
</tr>
</table>
#### 以图搜图系统
从海量图片中快速检索最相似图片。
#### 智能问答机器人
交互式智能问答机器人帮助用户节省时间和用人成本。
#### 分子式检索系统
迅速检索相似化学分子式。
## 训练营
Milvus [训练营](https://github.com/milvus-io/bootcamp)能够帮助你了解向量数据库的操作及各种应用场景。通过 Milvus 训练营探索如何进行 Milvus 性能测评,搭建智能问答机器人、推荐系统、以图搜图系统、分子式检索系统等。
## 贡献代码
欢迎向 Milvus 社区贡献你的代码。代码贡献流程或提交补丁等相关信息详见 [代码贡献准则](https://github.com/milvus-io/milvus/blob/master/CONTRIBUTING.md)。参考 [社区仓库](https://github.com/milvus-io/community) 了解社区管理准则并获取更多社区资源。
### All contributors
<br><!-- Do not remove start of hero-bot -->
<img src="https://img.shields.io/badge/all--contributors-432-orange"><br>
<a href="https://github.com/0xflotus"><img src="https://avatars.githubusercontent.com/u/26602940?v=4" width="30px" /></a>
<a href="https://github.com/404-P4rziv4L"><img src="https://avatars.githubusercontent.com/u/57059194?v=4" width="30px" /></a>
<a href="https://github.com/9Eurydice9"><img src="https://avatars.githubusercontent.com/u/220225099?v=4" width="30px" /></a>
<a href="https://github.com/ABNER-1"><img src="https://avatars.githubusercontent.com/u/24547351?v=4" width="30px" /></a>
<a href="https://github.com/Accagain2014"><img src="https://avatars.githubusercontent.com/u/9635216?v=4" width="30px" /></a>
<a href="https://github.com/AgNess-G"><img src="https://avatars.githubusercontent.com/u/79598409?v=4" width="30px" /></a>
<a href="https://github.com/Ahmetyasin"><img src="https://avatars.githubusercontent.com/u/34247619?v=4" width="30px" /></a>
<a href="https://github.com/Ald392"><img src="https://avatars.githubusercontent.com/u/166891594?v=4" width="30px" /></a>
<a href="https://github.com/AliDotS"><img src="https://avatars.githubusercontent.com/u/33119433?v=4" width="30px" /></a>
<a href="https://github.com/AlintaLu"><img src="https://avatars.githubusercontent.com/u/18751867?v=4" width="30px" /></a>
<a href="https://github.com/AllenYu1987"><img src="https://avatars.githubusercontent.com/u/12489985?v=4" width="30px" /></a>
<a href="https://github.com/Anosh21"><img src="https://avatars.githubusercontent.com/u/90505226?v=4" width="30px" /></a>
<a href="https://github.com/AnthonyTsu1984"><img src="https://avatars.githubusercontent.com/u/115786031?v=4" width="30px" /></a>
<a href="https://github.com/Aredcap"><img src="https://avatars.githubusercontent.com/u/40494761?v=4" width="30px" /></a>
<a href="https://github.com/ArenaSu"><img src="https://avatars.githubusercontent.com/u/21214629?v=4" width="30px" /></a>
<a href="https://github.com/Armaggheddon"><img src="https://avatars.githubusercontent.com/u/47779194?v=4" width="30px" /></a>
<a href="https://github.com/BUPTAnderson"><img src="https://avatars.githubusercontent.com/u/13449703?v=4" width="30px" /></a>
<a href="https://github.com/Ben-Aaron-Bio-Rad"><img src="https://avatars.githubusercontent.com/u/54123439?v=4" width="30px" /></a>
<a href="https://github.com/Bennu-Li"><img src="https://avatars.githubusercontent.com/u/53458891?v=4" width="30px" /></a>
<a href="https://github.com/Biki-das"><img src="https://avatars.githubusercontent.com/u/72331432?v=4" width="30px" /></a>
<a href="https://github.com/BossZou"><img src="https://avatars.githubusercontent.com/u/40255591?v=4" width="30px" /></a>
<a href="https://github.com/CNLHC"><img src="https://avatars.githubusercontent.com/u/21005146?v=4" width="30px" /></a>
<a href="https://github.com/CaoHaiNam"><img src="https://avatars.githubusercontent.com/u/47685795?v=4" width="30px" /></a>
<a href="https://github.com/ChelseyZ"><img src="https://avatars.githubusercontent.com/u/237714727?v=4" width="30px" /></a>
<a href="https://github.com/Chisdo"><img src="https://avatars.githubusercontent.com/u/36720318?v=4" width="30px" /></a>
<a href="https://github.com/ChunelFeng"><img src="https://avatars.githubusercontent.com/u/37905059?v=4" width="30px" /></a>
<a href="https://github.com/CocytusElias"><img src="https://avatars.githubusercontent.com/u/79587688?v=4" width="30px" /></a>
<a href="https://github.com/CodeInDreams"><img src="https://avatars.githubusercontent.com/u/17664279?v=4" width="30px" /></a>
<a href="https://github.com/Cplus-plus"><img src="https://avatars.githubusercontent.com/u/57971497?v=4" width="30px" /></a>
<a href="https://github.com/CsterKuroi"><img src="https://avatars.githubusercontent.com/u/12230174?v=4" width="30px" /></a>
<a href="https://github.com/Cupchen"><img src="https://avatars.githubusercontent.com/u/34762375?v=4" width="30px" /></a>
<a href="https://github.com/DLT1412"><img src="https://avatars.githubusercontent.com/u/8294986?v=4" width="30px" /></a>
<a href="https://github.com/DanielHuang1983"><img src="https://avatars.githubusercontent.com/u/4417873?v=4" width="30px" /></a>
<a href="https://github.com/Deep1Shikha"><img src="https://avatars.githubusercontent.com/u/47516502?v=4" width="30px" /></a>
<a href="https://github.com/DingQK"><img src="https://avatars.githubusercontent.com/u/58072531?v=4" width="30px" /></a>
<a href="https://github.com/DiptoChakrabarty"><img src="https://avatars.githubusercontent.com/u/45638240?v=4" width="30px" /></a>
<a href="https://github.com/EricStarer"><img src="https://avatars.githubusercontent.com/u/34002927?v=4" width="30px" /></a>
<a href="https://github.com/Erzangel"><img src="https://avatars.githubusercontent.com/u/57399897?v=4" width="30px" /></a>
<a href="https://github.com/FeilongHou"><img src="https://avatars.githubusercontent.com/u/77430856?v=4" width="30px" /></a>
<a href="https://github.com/Fierralin"><img src="https://avatars.githubusercontent.com/u/8857059?v=4" width="30px" /></a>
<a href="https://github.com/FluorineDog"><img src="https://avatars.githubusercontent.com/u/15663612?v=4" width="30px" /></a>
<a href="https://github.com/Gofastasf"><img src="https://avatars.githubusercontent.com/u/159963288?v=4" width="30px" /></a>
<a href="https://github.com/Goodnight77"><img src="https://avatars.githubusercontent.com/u/117648012?v=4" width="30px" /></a>
<a href="https://github.com/Gracieeea"><img src="https://avatars.githubusercontent.com/u/50101579?v=4" width="30px" /></a>
<a href="https://github.com/GuanyunFeng"><img src="https://avatars.githubusercontent.com/u/40229765?v=4" width="30px" /></a>
<a href="https://github.com/GuoRentong"><img src="https://avatars.githubusercontent.com/u/57477222?v=4" width="30px" /></a>
<a href="https://github.com/GuyKh"><img src="https://avatars.githubusercontent.com/u/3136012?v=4" width="30px" /></a>
<a href="https://github.com/Hard-Coder05"><img src="https://avatars.githubusercontent.com/u/54059881?v=4" width="30px" /></a>
<a href="https://github.com/Heisenberg-Y"><img src="https://avatars.githubusercontent.com/u/35055583?v=4" width="30px" /></a>
<a href="https://github.com/HesterG"><img src="https://avatars.githubusercontent.com/u/17645053?v=4" width="30px" /></a>
<a href="https://github.com/Hoyaspark"><img src="https://avatars.githubusercontent.com/u/88016041?v=4" width="30px" /></a>
<a href="https://github.com/HuaSheng2000"><img src="https://avatars.githubusercontent.com/u/34791273?v=4" width="30px" /></a>
<a href="https://github.com/HuangHua"><img src="https://avatars.githubusercontent.com/u/2274405?v=4" width="30px" /></a>
<a href="https://github.com/HurSungYun"><img src="https://avatars.githubusercontent.com/u/8033896?v=4" width="30px" /></a>
<a href="https://github.com/Ice-YcY"><img src="https://avatars.githubusercontent.com/u/85332705?v=4" width="30px" /></a>
<a href="https://github.com/JackLCL"><img src="https://avatars.githubusercontent.com/u/53512883?v=4" width="30px" /></a>
<a href="https://github.com/JadeFlute0127"><img src="https://avatars.githubusercontent.com/u/35321989?v=4" width="30px" /></a>
<a href="https://github.com/Janglearnstocode"><img src="https://avatars.githubusercontent.com/u/204587742?v=4" width="30px" /></a>
<a href="https://github.com/Javajava1"><img src="https://avatars.githubusercontent.com/u/29594737?v=4" width="30px" /></a>
<a href="https://github.com/Jeri-jose"><img src="https://avatars.githubusercontent.com/u/72429659?v=4" width="30px" /></a>
<a href="https://github.com/JianPeng20"><img src="https://avatars.githubusercontent.com/u/14035577?v=4" width="30px" /></a>
<a href="https://github.com/JinHai-CN"><img src="https://avatars.githubusercontent.com/u/33142505?v=4" width="30px" /></a>
<a href="https://github.com/JsDove"><img src="https://avatars.githubusercontent.com/u/35839735?v=4" width="30px" /></a>
<a href="https://github.com/Juneezee"><img src="https://avatars.githubusercontent.com/u/20135478?v=4" width="30px" /></a>
<a href="https://github.com/KubrickLiu"><img src="https://avatars.githubusercontent.com/u/24795136?v=4" width="30px" /></a>
<a href="https://github.com/KumaJie"><img src="https://avatars.githubusercontent.com/u/61139665?v=4" width="30px" /></a>
<a href="https://github.com/LeoReeYang"><img src="https://avatars.githubusercontent.com/u/58654486?v=4" width="30px" /></a>
<a href="https://github.com/Leslie-Wong-H"><img src="https://avatars.githubusercontent.com/u/27696701?v=4" width="30px" /></a>
<a href="https://github.com/Light-City"><img src="https://avatars.githubusercontent.com/u/25699850?v=4" width="30px" /></a>
<a href="https://github.com/Lin-gh-Saint"><img src="https://avatars.githubusercontent.com/u/64019322?v=4" width="30px" /></a>
<a href="https://github.com/Linkwei"><img src="https://avatars.githubusercontent.com/u/30227152?v=4" width="30px" /></a>
<a href="https://github.com/LionelDong"><img src="https://avatars.githubusercontent.com/u/7533395?v=4" width="30px" /></a>
<a href="https://github.com/LocoRichard"><img src="https://avatars.githubusercontent.com/u/81553353?v=4" width="30px" /></a>
<a href="https://github.com/LoveEachDay"><img src="https://avatars.githubusercontent.com/u/1573213?v=4" width="30px" /></a>
<a href="https://github.com/MrPresent-Han"><img src="https://avatars.githubusercontent.com/u/116052805?v=4" width="30px" /></a>
<a href="https://github.com/NavanshGoel"><img src="https://avatars.githubusercontent.com/u/74401713?v=4" width="30px" /></a>
<a href="https://github.com/NicoYuan1986"><img src="https://avatars.githubusercontent.com/u/109071306?v=4" width="30px" /></a>
<a href="https://github.com/NotRyan"><img src="https://avatars.githubusercontent.com/u/5742796?v=4" width="30px" /></a>
<a href="https://github.com/OxalisCu"><img src="https://avatars.githubusercontent.com/u/64067746?v=4" width="30px" /></a>
<a href="https://github.com/PahudPlus"><img src="https://avatars.githubusercontent.com/u/64403786?v=4" width="30px" /></a>
<a href="https://github.com/PiercarloSlavazza"><img src="https://avatars.githubusercontent.com/u/3389306?v=4" width="30px" /></a>
<a href="https://github.com/PowderLi"><img src="https://avatars.githubusercontent.com/u/135960789?v=4" width="30px" /></a>
<a href="https://github.com/QipengZhou"><img src="https://avatars.githubusercontent.com/u/5410298?v=4" width="30px" /></a>
<a href="https://github.com/RangerCD"><img src="https://avatars.githubusercontent.com/u/6872198?v=4" width="30px" /></a>
<a href="https://github.com/Raysilience"><img src="https://avatars.githubusercontent.com/u/45241093?v=4" width="30px" /></a>
<a href="https://github.com/Reidddddd"><img src="https://avatars.githubusercontent.com/u/5352837?v=4" width="30px" /></a>
<a href="https://github.com/ReigenAraka"><img src="https://avatars.githubusercontent.com/u/57280231?v=4" width="30px" /></a>
<a href="https://github.com/Rijin-N"><img src="https://avatars.githubusercontent.com/u/181319057?v=4" width="30px" /></a>
<a href="https://github.com/RosieZhang12"><img src="https://avatars.githubusercontent.com/u/106942883?v=4" width="30px" /></a>
<a href="https://github.com/RyanWei"><img src="https://avatars.githubusercontent.com/u/9876551?v=4" width="30px" /></a>
<a href="https://github.com/SCKCZJ2018"><img src="https://avatars.githubusercontent.com/u/29282370?v=4" width="30px" /></a>
<a href="https://github.com/SarthakJain26"><img src="https://avatars.githubusercontent.com/u/45846277?v=4" width="30px" /></a>
<a href="https://github.com/Shawnzheng011019"><img src="https://avatars.githubusercontent.com/u/88486803?v=4" width="30px" /></a>
<a href="https://github.com/SimFG"><img src="https://avatars.githubusercontent.com/u/21985684?v=4" width="30px" /></a>
<a href="https://github.com/SkyYang"><img src="https://avatars.githubusercontent.com/u/4702509?v=4" width="30px" /></a>
<a href="https://github.com/SnowyOwl-KHY"><img src="https://avatars.githubusercontent.com/u/10348819?v=4" width="30px" /></a>
<a href="https://github.com/SpadeA-Tang"><img src="https://avatars.githubusercontent.com/u/71589810?v=4" width="30px" /></a>
<a href="https://github.com/Sunt-ing"><img src="https://avatars.githubusercontent.com/u/43040147?v=4" width="30px" /></a>
<a href="https://github.com/SwaggySong"><img src="https://avatars.githubusercontent.com/u/36157116?v=4" width="30px" /></a>
<a href="https://github.com/TheShubhendra"><img src="https://avatars.githubusercontent.com/u/37535104?v=4" width="30px" /></a>
<a href="https://github.com/Thor-ChenBiao"><img src="https://avatars.githubusercontent.com/u/104345188?v=4" width="30px" /></a>
<a href="https://github.com/ThreadDao"><img src="https://avatars.githubusercontent.com/u/27288593?v=4" width="30px" /></a>
<a href="https://github.com/ThyeeZz"><img src="https://avatars.githubusercontent.com/u/41352919?v=4" width="30px" /></a>
<a href="https://github.com/Tlincy"><img src="https://avatars.githubusercontent.com/u/11934432?v=4" width="30px" /></a>
<a href="https://github.com/Tumao727"><img src="https://avatars.githubusercontent.com/u/20420181?v=4" width="30px" /></a>
<a href="https://github.com/UnyieldingOrca"><img src="https://avatars.githubusercontent.com/u/11794047?v=4" width="30px" /></a>
<a href="https://github.com/Writer-X"><img src="https://avatars.githubusercontent.com/u/80471801?v=4" width="30px" /></a>
<a href="https://github.com/Writtic"><img src="https://avatars.githubusercontent.com/u/11371498?v=4" width="30px" /></a>
<a href="https://github.com/Wuzhengda55"><img src="https://avatars.githubusercontent.com/u/47274057?v=4" width="30px" /></a>
<a href="https://github.com/XTxxxx"><img src="https://avatars.githubusercontent.com/u/113696527?v=4" width="30px" /></a>
<a href="https://github.com/Xieql"><img src="https://avatars.githubusercontent.com/u/45359033?v=4" width="30px" /></a>
<a href="https://github.com/XuPeng-SH"><img src="https://avatars.githubusercontent.com/u/39627130?v=4" width="30px" /></a>
<a href="https://github.com/XuanYang-cn"><img src="https://avatars.githubusercontent.com/u/51370125?v=4" width="30px" /></a>
<a href="https://github.com/YannFollet"><img src="https://avatars.githubusercontent.com/u/131855179?v=4" width="30px" /></a>
<a href="https://github.com/YidaHu"><img src="https://avatars.githubusercontent.com/u/13404367?v=4" width="30px" /></a>
<a href="https://github.com/Yinwei-Yu"><img src="https://avatars.githubusercontent.com/u/150327960?v=4" width="30px" /></a>
<a href="https://github.com/YiyunNi"><img src="https://avatars.githubusercontent.com/u/74396087?v=4" width="30px" /></a>
<a href="https://github.com/Yougigun"><img src="https://avatars.githubusercontent.com/u/9638997?v=4" width="30px" /></a>
<a href="https://github.com/Yukikaze-CZR"><img src="https://avatars.githubusercontent.com/u/48198922?v=4" width="30px" /></a>
<a href="https://github.com/Zach41"><img src="https://avatars.githubusercontent.com/u/3941604?v=4" width="30px" /></a>
<a href="https://github.com/ZhaoBQ"><img src="https://avatars.githubusercontent.com/u/35092554?v=4" width="30px" /></a>
<a href="https://github.com/aaronjin2010"><img src="https://avatars.githubusercontent.com/u/48044391?v=4" width="30px" /></a>
<a href="https://github.com/abd-770"><img src="https://avatars.githubusercontent.com/u/92085834?v=4" width="30px" /></a>
<a href="https://github.com/akihoni"><img src="https://avatars.githubusercontent.com/u/36330442?v=4" width="30px" /></a>
<a href="https://github.com/alexanderguzhva"><img src="https://avatars.githubusercontent.com/u/10901481?v=4" width="30px" /></a>
<a href="https://github.com/alwayslove2013"><img src="https://avatars.githubusercontent.com/u/22510720?v=4" width="30px" /></a>
<a href="https://github.com/anchun"><img src="https://avatars.githubusercontent.com/u/2356895?v=4" width="30px" /></a>
<a href="https://github.com/andrii-shchur"><img src="https://avatars.githubusercontent.com/u/33606307?v=4" width="30px" /></a>
<a href="https://github.com/any35"><img src="https://avatars.githubusercontent.com/u/2082210?v=4" width="30px" /></a>
<a href="https://github.com/aoiasd"><img src="https://avatars.githubusercontent.com/u/45024769?v=4" width="30px" /></a>
<a href="https://github.com/arijit-chowdhury-genea"><img src="https://avatars.githubusercontent.com/u/104769013?v=4" width="30px" /></a>
<a href="https://github.com/ashkrisk"><img src="https://avatars.githubusercontent.com/u/137368647?v=4" width="30px" /></a>
<a href="https://github.com/ashyshyshyman"><img src="https://avatars.githubusercontent.com/u/50362613?v=4" width="30px" /></a>
<a href="https://github.com/avats-dev"><img src="https://avatars.githubusercontent.com/u/35889327?v=4" width="30px" /></a>
<a href="https://github.com/avsolatorio"><img src="https://avatars.githubusercontent.com/u/3009596?v=4" width="30px" /></a>
<a href="https://github.com/balloon1995"><img src="https://avatars.githubusercontent.com/u/10573916?v=4" width="30px" /></a>
<a href="https://github.com/become-nice"><img src="https://avatars.githubusercontent.com/u/56624819?v=4" width="30px" /></a>
<a href="https://github.com/bigsheeper"><img src="https://avatars.githubusercontent.com/u/42060877?v=4" width="30px" /></a>
<a href="https://github.com/binbin12580"><img src="https://avatars.githubusercontent.com/u/30914966?v=4" width="30px" /></a>
<a href="https://github.com/binbinlv"><img src="https://avatars.githubusercontent.com/u/83755740?v=4" width="30px" /></a>
<a href="https://github.com/bjzhjing"><img src="https://avatars.githubusercontent.com/u/46661806?v=4" width="30px" /></a>
<a href="https://github.com/bo-huang"><img src="https://avatars.githubusercontent.com/u/24309515?v=4" width="30px" /></a>
<a href="https://github.com/brandonbiggs"><img src="https://avatars.githubusercontent.com/u/34954680?v=4" width="30px" /></a>
<a href="https://github.com/brcarry"><img src="https://avatars.githubusercontent.com/u/58139344?v=4" width="30px" /></a>
<a href="https://github.com/brunocfnba"><img src="https://avatars.githubusercontent.com/u/7377163?v=4" width="30px" /></a>
<a href="https://github.com/bryanwux"><img src="https://avatars.githubusercontent.com/u/17968665?v=4" width="30px" /></a>
<a href="https://github.com/caesarjuly"><img src="https://avatars.githubusercontent.com/u/927521?v=4" width="30px" /></a>
<a href="https://github.com/caosiyang"><img src="https://avatars.githubusercontent.com/u/2155120?v=4" width="30px" /></a>
<a href="https://github.com/carawaylj"><img src="https://avatars.githubusercontent.com/u/69145751?v=4" width="30px" /></a>
<a href="https://github.com/charleskakumanu"><img src="https://avatars.githubusercontent.com/u/62761315?v=4" width="30px" /></a>
<a href="https://github.com/charlspjohn"><img src="https://avatars.githubusercontent.com/u/14850736?v=4" width="30px" /></a>
<a href="https://github.com/chasingegg"><img src="https://avatars.githubusercontent.com/u/18375889?v=4" width="30px" /></a>
<a href="https://github.com/chengpu"><img src="https://avatars.githubusercontent.com/u/2233492?v=4" width="30px" /></a>
<a href="https://github.com/chenxingqiang"><img src="https://avatars.githubusercontent.com/u/12387235?v=4" width="30px" /></a>
<a href="https://github.com/chinamcafee"><img src="https://avatars.githubusercontent.com/u/3439961?v=4" width="30px" /></a>
<a href="https://github.com/chuangfengwang"><img src="https://avatars.githubusercontent.com/u/24692397?v=4" width="30px" /></a>
<a href="https://github.com/chyezh"><img src="https://avatars.githubusercontent.com/u/20332315?v=4" width="30px" /></a>
<a href="https://github.com/cjrh"><img src="https://avatars.githubusercontent.com/u/480395?v=4" width="30px" /></a>
<a href="https://github.com/claireyuw"><img src="https://avatars.githubusercontent.com/u/83751381?v=4" width="30px" /></a>
<a href="https://github.com/codacy-badger"><img src="https://avatars.githubusercontent.com/u/23704769?v=4" width="30px" /></a>
<a href="https://github.com/codenoid"><img src="https://avatars.githubusercontent.com/u/14269809?v=4" width="30px" /></a>
<a href="https://github.com/codingjaguar"><img src="https://avatars.githubusercontent.com/u/7064054?v=4" width="30px" /></a>
<a href="https://github.com/congqixia"><img src="https://avatars.githubusercontent.com/u/84113973?v=4" width="30px" /></a>
<a href="https://github.com/corest"><img src="https://avatars.githubusercontent.com/u/1071648?v=4" width="30px" /></a>
<a href="https://github.com/counter2015"><img src="https://avatars.githubusercontent.com/u/13608862?v=4" width="30px" /></a>
<a href="https://github.com/cqy123456"><img src="https://avatars.githubusercontent.com/u/39671710?v=4" width="30px" /></a>
<a href="https://github.com/cuishuang"><img src="https://avatars.githubusercontent.com/u/15921519?v=4" width="30px" /></a>
<a href="https://github.com/cxie"><img src="https://avatars.githubusercontent.com/u/653101?v=4" width="30px" /></a>
<a href="https://github.com/cxytz01"><img src="https://avatars.githubusercontent.com/u/18002438?v=4" width="30px" /></a>
<a href="https://github.com/cydrain"><img src="https://avatars.githubusercontent.com/u/3992404?v=4" width="30px" /></a>
<a href="https://github.com/czpmango"><img src="https://avatars.githubusercontent.com/u/26356194?v=4" width="30px" /></a>
<a href="https://github.com/czs007"><img src="https://avatars.githubusercontent.com/u/59249785?v=4" width="30px" /></a>
<a href="https://github.com/dandv"><img src="https://avatars.githubusercontent.com/u/33569?v=4" width="30px" /></a>
<a href="https://github.com/dariocurr"><img src="https://avatars.githubusercontent.com/u/48800335?v=4" width="30px" /></a>
<a href="https://github.com/datenhahn"><img src="https://avatars.githubusercontent.com/u/13999666?v=4" width="30px" /></a>
<a href="https://github.com/dd-He"><img src="https://avatars.githubusercontent.com/u/24242249?v=4" width="30px" /></a>
<a href="https://github.com/dddddai"><img src="https://avatars.githubusercontent.com/u/41563853?v=4" width="30px" /></a>
<a href="https://github.com/del-zhenwu"><img src="https://avatars.githubusercontent.com/u/56623710?v=4" width="30px" /></a>
<a href="https://github.com/dengxiaohai"><img src="https://avatars.githubusercontent.com/u/137682492?v=4" width="30px" /></a>
<a href="https://github.com/disflyer"><img src="https://avatars.githubusercontent.com/u/22723892?v=4" width="30px" /></a>
<a href="https://github.com/divyaruhil"><img src="https://avatars.githubusercontent.com/u/117009486?v=4" width="30px" /></a>
<a href="https://github.com/donno2048"><img src="https://avatars.githubusercontent.com/u/61805754?v=4" width="30px" /></a>
<a href="https://github.com/drow931"><img src="https://avatars.githubusercontent.com/u/11514434?v=4" width="30px" /></a>
<a href="https://github.com/dvzubarev"><img src="https://avatars.githubusercontent.com/u/14878830?v=4" width="30px" /></a>
<a href="https://github.com/dyhyfu"><img src="https://avatars.githubusercontent.com/u/64584368?v=4" width="30px" /></a>
<a href="https://github.com/eddumelendez"><img src="https://avatars.githubusercontent.com/u/1810547?v=4" width="30px" /></a>
<a href="https://github.com/ehooi"><img src="https://avatars.githubusercontent.com/u/1306183?v=4" width="30px" /></a>
<a href="https://github.com/elfisworking"><img src="https://avatars.githubusercontent.com/u/37609214?v=4" width="30px" /></a>
<a href="https://github.com/eli-b"><img src="https://avatars.githubusercontent.com/u/834999?v=4" width="30px" /></a>
<a href="https://github.com/elstic"><img src="https://avatars.githubusercontent.com/u/48523564?v=4" width="30px" /></a>
<a href="https://github.com/eltociear"><img src="https://avatars.githubusercontent.com/u/22633385?v=4" width="30px" /></a>
<a href="https://github.com/emmanuel-ferdman"><img src="https://avatars.githubusercontent.com/u/35470921?v=4" width="30px" /></a>
<a href="https://github.com/eolivelli"><img src="https://avatars.githubusercontent.com/u/9469110?v=4" width="30px" /></a>
<a href="https://github.com/erdustiggen"><img src="https://avatars.githubusercontent.com/u/25433850?v=4" width="30px" /></a>
<a href="https://github.com/feisiyicl"><img src="https://avatars.githubusercontent.com/u/64510805?v=4" width="30px" /></a>
<a href="https://github.com/fengjun2016"><img src="https://avatars.githubusercontent.com/u/23044049?v=4" width="30px" /></a>
<a href="https://github.com/filip-halt"><img src="https://avatars.githubusercontent.com/u/81822489?v=4" width="30px" /></a>
<a href="https://github.com/filipecaixeta"><img src="https://avatars.githubusercontent.com/u/1094052?v=4" width="30px" /></a>
<a href="https://github.com/fishpenguin"><img src="https://avatars.githubusercontent.com/u/49153041?v=4" width="30px" /></a>
<a href="https://github.com/forsaken628"><img src="https://avatars.githubusercontent.com/u/18322364?v=4" width="30px" /></a>
<a href="https://github.com/foxspy"><img src="https://avatars.githubusercontent.com/u/11503321?v=4" width="30px" /></a>
<a href="https://github.com/franciscojavierarceo"><img src="https://avatars.githubusercontent.com/u/4163062?v=4" width="30px" /></a>
<a href="https://github.com/freestsoul"><img src="https://avatars.githubusercontent.com/u/3909908?v=4" width="30px" /></a>
<a href="https://github.com/gcmutator"><img src="https://avatars.githubusercontent.com/u/134900551?v=4" width="30px" /></a>
<a href="https://github.com/ggaaooppeenngg"><img src="https://avatars.githubusercontent.com/u/4769989?v=4" width="30px" /></a>
<a href="https://github.com/gifi-siby"><img src="https://avatars.githubusercontent.com/u/176461003?v=4" width="30px" /></a>
<a href="https://github.com/git-hulk"><img src="https://avatars.githubusercontent.com/u/4987594?v=4" width="30px" /></a>
<a href="https://github.com/godchen0212"><img src="https://avatars.githubusercontent.com/u/67679556?v=4" width="30px" /></a>
<a href="https://github.com/gracezzzzz"><img src="https://avatars.githubusercontent.com/u/56617657?v=4" width="30px" /></a>
<a href="https://github.com/grtoverflow"><img src="https://avatars.githubusercontent.com/u/8500564?v=4" width="30px" /></a>
<a href="https://github.com/gruebel"><img src="https://avatars.githubusercontent.com/u/33207684?v=4" width="30px" /></a>
<a href="https://github.com/guimou"><img src="https://avatars.githubusercontent.com/u/3944034?v=4" width="30px" /></a>
<a href="https://github.com/gujun720"><img src="https://avatars.githubusercontent.com/u/53246671?v=4" width="30px" /></a>
<a href="https://github.com/guoxiangzhou"><img src="https://avatars.githubusercontent.com/u/52496626?v=4" width="30px" /></a>
<a href="https://github.com/hadim"><img src="https://avatars.githubusercontent.com/u/528003?v=4" width="30px" /></a>
<a href="https://github.com/haorenfsa"><img src="https://avatars.githubusercontent.com/u/15938850?v=4" width="30px" /></a>
<a href="https://github.com/hedane"><img src="https://avatars.githubusercontent.com/u/12457872?v=4" width="30px" /></a>
<a href="https://github.com/henryoswald"><img src="https://avatars.githubusercontent.com/u/343366?v=4" width="30px" /></a>
<a href="https://github.com/hishope"><img src="https://avatars.githubusercontent.com/u/153272819?v=4" width="30px" /></a>
<a href="https://github.com/huanghaoyuanhhy"><img src="https://avatars.githubusercontent.com/u/103482615?v=4" width="30px" /></a>
<a href="https://github.com/huangjincheng2022"><img src="https://avatars.githubusercontent.com/u/98305308?v=4" width="30px" /></a>
<a href="https://github.com/ibrahimhaddad"><img src="https://avatars.githubusercontent.com/u/1656002?v=4" width="30px" /></a>
<a href="https://github.com/im-ajaymeena"><img src="https://avatars.githubusercontent.com/u/19550841?v=4" width="30px" /></a>
<a href="https://github.com/ireneontheway5"><img src="https://avatars.githubusercontent.com/u/75291211?v=4" width="30px" /></a>
<a href="https://github.com/iynewz"><img src="https://avatars.githubusercontent.com/u/81401074?v=4" width="30px" /></a>
<a href="https://github.com/izapolsk"><img src="https://avatars.githubusercontent.com/u/21039333?v=4" width="30px" /></a>
<a href="https://github.com/jackyu2020"><img src="https://avatars.githubusercontent.com/u/64533877?v=4" width="30px" /></a>
<a href="https://github.com/jaelgu"><img src="https://avatars.githubusercontent.com/u/86251631?v=4" width="30px" /></a>
<a href="https://github.com/jaime0815"><img src="https://avatars.githubusercontent.com/u/4024711?v=4" width="30px" /></a>
<a href="https://github.com/jeffoverflow"><img src="https://avatars.githubusercontent.com/u/24581746?v=4" width="30px" /></a>
<a href="https://github.com/jenkoon"><img src="https://avatars.githubusercontent.com/u/27683687?v=4" width="30px" /></a>
<a href="https://github.com/jennyli-z"><img src="https://avatars.githubusercontent.com/u/93511422?v=4" width="30px" /></a>
<a href="https://github.com/jfwm2"><img src="https://avatars.githubusercontent.com/u/16882135?v=4" width="30px" /></a>
<a href="https://github.com/jhonroxton"><img src="https://avatars.githubusercontent.com/u/105436184?v=4" width="30px" /></a>
<a href="https://github.com/jiangke-sr"><img src="https://avatars.githubusercontent.com/u/68629395?v=4" width="30px" /></a>
<a href="https://github.com/jiangyinzuo"><img src="https://avatars.githubusercontent.com/u/40995042?v=4" width="30px" /></a>
<a href="https://github.com/jiaoew1991"><img src="https://avatars.githubusercontent.com/u/2297455?v=4" width="30px" /></a>
<a href="https://github.com/jiaqizho"><img src="https://avatars.githubusercontent.com/u/8388185?v=4" width="30px" /></a>
<a href="https://github.com/jielinxu"><img src="https://avatars.githubusercontent.com/u/52057195?v=4" width="30px" /></a>
<a href="https://github.com/jingkl"><img src="https://avatars.githubusercontent.com/u/34296482?v=4" width="30px" /></a>
<a href="https://github.com/jjaikumar-xyla"><img src="https://avatars.githubusercontent.com/u/144144634?v=4" width="30px" /></a>
<a href="https://github.com/jjyaoao"><img src="https://avatars.githubusercontent.com/u/88936287?v=4" width="30px" /></a>
<a href="https://github.com/jkx8fc"><img src="https://avatars.githubusercontent.com/u/31717785?v=4" width="30px" /></a>
<a href="https://github.com/joeyjooste"><img src="https://avatars.githubusercontent.com/u/72280325?v=4" width="30px" /></a>
<a href="https://github.com/john-h-luo"><img src="https://avatars.githubusercontent.com/u/67673717?v=4" width="30px" /></a>
<a href="https://github.com/jperez999"><img src="https://avatars.githubusercontent.com/u/37191411?v=4" width="30px" /></a>
<a href="https://github.com/juliens"><img src="https://avatars.githubusercontent.com/u/195661?v=4" width="30px" /></a>
<a href="https://github.com/junjiejiangjjj"><img src="https://avatars.githubusercontent.com/u/14136703?v=4" width="30px" /></a>
<a href="https://github.com/jvirgovic"><img src="https://avatars.githubusercontent.com/u/138708600?v=4" width="30px" /></a>
<a href="https://github.com/jyc4617"><img src="https://avatars.githubusercontent.com/u/3044583?v=4" width="30px" /></a>
<a href="https://github.com/kartikcho"><img src="https://avatars.githubusercontent.com/u/48270786?v=4" width="30px" /></a>
<a href="https://github.com/kateshaowanjou"><img src="https://avatars.githubusercontent.com/u/58837504?v=4" width="30px" /></a>
<a href="https://github.com/klboke"><img src="https://avatars.githubusercontent.com/u/18591662?v=4" width="30px" /></a>
<a href="https://github.com/laipz8200"><img src="https://avatars.githubusercontent.com/u/16485841?v=4" width="30px" /></a>
<a href="https://github.com/laurazhao0611"><img src="https://avatars.githubusercontent.com/u/192320184?v=4" width="30px" /></a>
<a href="https://github.com/lee-eve"><img src="https://avatars.githubusercontent.com/u/9720105?v=4" width="30px" /></a>
<a href="https://github.com/lee-taejun"><img src="https://avatars.githubusercontent.com/u/33862757?v=4" width="30px" /></a>
<a href="https://github.com/lentitude2tk"><img src="https://avatars.githubusercontent.com/u/108672767?v=4" width="30px" /></a>
<a href="https://github.com/leonardokidd"><img src="https://avatars.githubusercontent.com/u/14940941?v=4" width="30px" /></a>
<a href="https://github.com/letian-jiang"><img src="https://avatars.githubusercontent.com/u/16740944?v=4" width="30px" /></a>
<a href="https://github.com/letme5"><img src="https://avatars.githubusercontent.com/u/76860836?v=4" width="30px" /></a>
<a href="https://github.com/leykun10"><img src="https://avatars.githubusercontent.com/u/45382760?v=4" width="30px" /></a>
<a href="https://github.com/lhotari"><img src="https://avatars.githubusercontent.com/u/66864?v=4" width="30px" /></a>
<a href="https://github.com/liliu-z"><img src="https://avatars.githubusercontent.com/u/105927039?v=4" width="30px" /></a>
<a href="https://github.com/linhgao"><img src="https://avatars.githubusercontent.com/u/102851605?v=4" width="30px" /></a>
<a href="https://github.com/liyun95"><img src="https://avatars.githubusercontent.com/u/105278390?v=4" width="30px" /></a>
<a href="https://github.com/lmzzzzz1"><img src="https://avatars.githubusercontent.com/u/43360234?v=4" width="30px" /></a>
<a href="https://github.com/locustbaby"><img src="https://avatars.githubusercontent.com/u/21237232?v=4" width="30px" /></a>
<a href="https://github.com/loguo"><img src="https://avatars.githubusercontent.com/u/15364733?v=4" width="30px" /></a>
<a href="https://github.com/longjiquan"><img src="https://avatars.githubusercontent.com/u/31589260?v=4" width="30px" /></a>
<a href="https://github.com/lowener"><img src="https://avatars.githubusercontent.com/u/9810050?v=4" width="30px" /></a>
<a href="https://github.com/lsgrep"><img src="https://avatars.githubusercontent.com/u/3893940?v=4" width="30px" /></a>
<a href="https://github.com/lwglgy"><img src="https://avatars.githubusercontent.com/u/26682620?v=4" width="30px" /></a>
<a href="https://github.com/madogar"><img src="https://avatars.githubusercontent.com/u/36537062?v=4" width="30px" /></a>
<a href="https://github.com/maksspace"><img src="https://avatars.githubusercontent.com/u/9841409?v=4" width="30px" /></a>
<a href="https://github.com/marcelo-cjl"><img src="https://avatars.githubusercontent.com/u/222351274?v=4" width="30px" /></a>
<a href="https://github.com/matchyc"><img src="https://avatars.githubusercontent.com/u/57976772?v=4" width="30px" /></a>
<a href="https://github.com/matrixji"><img src="https://avatars.githubusercontent.com/u/183388?v=4" width="30px" /></a>
<a href="https://github.com/mausch"><img src="https://avatars.githubusercontent.com/u/95194?v=4" width="30px" /></a>
<a href="https://github.com/mcamou"><img src="https://avatars.githubusercontent.com/u/87200?v=4" width="30px" /></a>
<a href="https://github.com/michaelkl"><img src="https://avatars.githubusercontent.com/u/1443825?v=4" width="30px" /></a>
<a href="https://github.com/mihailyanchev"><img src="https://avatars.githubusercontent.com/u/34907806?v=4" width="30px" /></a>
<a href="https://github.com/mileyzjq"><img src="https://avatars.githubusercontent.com/u/37039827?v=4" width="30px" /></a>
<a href="https://github.com/milvus-ci-robot"><img src="https://avatars.githubusercontent.com/u/87847967?v=4" width="30px" /></a>
<a href="https://github.com/mimoning"><img src="https://avatars.githubusercontent.com/u/19261942?v=4" width="30px" /></a>
<a href="https://github.com/moe-of-faith"><img src="https://avatars.githubusercontent.com/u/5696721?v=4" width="30px" /></a>
<a href="https://github.com/mohitreddy1996"><img src="https://avatars.githubusercontent.com/u/11742913?v=4" width="30px" /></a>
<a href="https://github.com/nameczz"><img src="https://avatars.githubusercontent.com/u/20559208?v=4" width="30px" /></a>
<a href="https://github.com/natoka"><img src="https://avatars.githubusercontent.com/u/1751024?v=4" width="30px" /></a>
<a href="https://github.com/ncover21"><img src="https://avatars.githubusercontent.com/u/30241297?v=4" width="30px" /></a>
<a href="https://github.com/nexttonever"><img src="https://avatars.githubusercontent.com/u/31059690?v=4" width="30px" /></a>
<a href="https://github.com/neza2017"><img src="https://avatars.githubusercontent.com/u/34152706?v=4" width="30px" /></a>
<a href="https://github.com/nianliuu"><img src="https://avatars.githubusercontent.com/u/136299351?v=4" width="30px" /></a>
<a href="https://github.com/nish112022"><img src="https://avatars.githubusercontent.com/u/148342058?v=4" width="30px" /></a>
<a href="https://github.com/nustiueudinastea"><img src="https://avatars.githubusercontent.com/u/588327?v=4" width="30px" /></a>
<a href="https://github.com/op-hunter"><img src="https://avatars.githubusercontent.com/u/5617677?v=4" width="30px" /></a>
<a href="https://github.com/ownbylichaobao"><img src="https://avatars.githubusercontent.com/u/37684963?v=4" width="30px" /></a>
<a href="https://github.com/panjf2000"><img src="https://avatars.githubusercontent.com/u/7496278?v=4" width="30px" /></a>
<a href="https://github.com/phantom8548"><img src="https://avatars.githubusercontent.com/u/11576622?v=4" width="30px" /></a>
<a href="https://github.com/pingliu"><img src="https://avatars.githubusercontent.com/u/6415493?v=4" width="30px" /></a>
<a href="https://github.com/pj1987111"><img src="https://avatars.githubusercontent.com/u/6268414?v=4" width="30px" /></a>
<a href="https://github.com/ponponon"><img src="https://avatars.githubusercontent.com/u/38725104?v=4" width="30px" /></a>
<a href="https://github.com/preetham"><img src="https://avatars.githubusercontent.com/u/9149028?v=4" width="30px" /></a>
<a href="https://github.com/proost"><img src="https://avatars.githubusercontent.com/u/34047134?v=4" width="30px" /></a>
<a href="https://github.com/psc0606"><img src="https://avatars.githubusercontent.com/u/7888889?v=4" width="30px" /></a>
<a href="https://github.com/punkerpunker"><img src="https://avatars.githubusercontent.com/u/54440025?v=4" width="30px" /></a>
<a href="https://github.com/qbzenker"><img src="https://avatars.githubusercontent.com/u/51972064?v=4" width="30px" /></a>
<a href="https://github.com/qixuan0212"><img src="https://avatars.githubusercontent.com/u/135136620?v=4" width="30px" /></a>
<a href="https://github.com/rahulmistri1997"><img src="https://avatars.githubusercontent.com/u/58909377?v=4" width="30px" /></a>
<a href="https://github.com/rashgaroth"><img src="https://avatars.githubusercontent.com/u/50513263?v=4" width="30px" /></a>
<a href="https://github.com/richzw"><img src="https://avatars.githubusercontent.com/u/1590890?v=4" width="30px" /></a>
<a href="https://github.com/ronnie-llamado"><img src="https://avatars.githubusercontent.com/u/35092029?v=4" width="30px" /></a>
<a href="https://github.com/sachitolani"><img src="https://avatars.githubusercontent.com/u/146494073?v=4" width="30px" /></a>
<a href="https://github.com/sageanya"><img src="https://avatars.githubusercontent.com/u/37909674?v=4" width="30px" /></a>
<a href="https://github.com/saisona"><img src="https://avatars.githubusercontent.com/u/10884762?v=4" width="30px" /></a>
<a href="https://github.com/saivarunk"><img src="https://avatars.githubusercontent.com/u/2976867?v=4" width="30px" /></a>
<a href="https://github.com/sangheee"><img src="https://avatars.githubusercontent.com/u/29528531?v=4" width="30px" /></a>
<a href="https://github.com/sarah-inkeep"><img src="https://avatars.githubusercontent.com/u/129242944?v=4" width="30px" /></a>
<a href="https://github.com/scipe"><img src="https://avatars.githubusercontent.com/u/3996622?v=4" width="30px" /></a>
<a href="https://github.com/scsven"><img src="https://avatars.githubusercontent.com/u/100122127?v=4" width="30px" /></a>
<a href="https://github.com/seo-jinBro"><img src="https://avatars.githubusercontent.com/u/17746814?v=4" width="30px" /></a>
<a href="https://github.com/septemberfd"><img src="https://avatars.githubusercontent.com/u/40378371?v=4" width="30px" /></a>
<a href="https://github.com/shana0325"><img src="https://avatars.githubusercontent.com/u/33335490?v=4" width="30px" /></a>
<a href="https://github.com/shanghaikid"><img src="https://avatars.githubusercontent.com/u/185051?v=4" width="30px" /></a>
<a href="https://github.com/shaoting-huang"><img src="https://avatars.githubusercontent.com/u/167743503?v=4" width="30px" /></a>
<a href="https://github.com/shengjh"><img src="https://avatars.githubusercontent.com/u/46514371?v=4" width="30px" /></a>
<a href="https://github.com/shengjun1985"><img src="https://avatars.githubusercontent.com/u/49774184?v=4" width="30px" /></a>
<a href="https://github.com/shiyu09"><img src="https://avatars.githubusercontent.com/u/39143280?v=4" width="30px" /></a>
<a href="https://github.com/shiyu22"><img src="https://avatars.githubusercontent.com/u/53459423?v=4" width="30px" /></a>
<a href="https://github.com/shunjiezhao"><img src="https://avatars.githubusercontent.com/u/90906581?v=4" width="30px" /></a>
<a href="https://github.com/siddarth99"><img src="https://avatars.githubusercontent.com/u/38921750?v=4" width="30px" /></a>
<a href="https://github.com/sileht"><img src="https://avatars.githubusercontent.com/u/200878?v=4" width="30px" /></a>
<a href="https://github.com/simonwei97"><img src="https://avatars.githubusercontent.com/u/119845914?v=4" width="30px" /></a>
<a href="https://github.com/siriusctrl"><img src="https://avatars.githubusercontent.com/u/26541600?v=4" width="30px" /></a>
<a href="https://github.com/slobentanzer"><img src="https://avatars.githubusercontent.com/u/13223629?v=4" width="30px" /></a>
<a href="https://github.com/smackfu"><img src="https://avatars.githubusercontent.com/u/1723952?v=4" width="30px" /></a>
<a href="https://github.com/smdsbz"><img src="https://avatars.githubusercontent.com/u/19503270?v=4" width="30px" /></a>
<a href="https://github.com/smellthemoon"><img src="https://avatars.githubusercontent.com/u/64083300?v=4" width="30px" /></a>
<a href="https://github.com/snyk-bot"><img src="https://avatars.githubusercontent.com/u/19733683?v=4" width="30px" /></a>
<a href="https://github.com/songxianj"><img src="https://avatars.githubusercontent.com/u/107831450?v=4" width="30px" /></a>
<a href="https://github.com/soothing-rain"><img src="https://avatars.githubusercontent.com/u/69466447?v=4" width="30px" /></a>
<a href="https://github.com/soulteary"><img src="https://avatars.githubusercontent.com/u/1500781?v=4" width="30px" /></a>
<a href="https://github.com/sparknack"><img src="https://avatars.githubusercontent.com/u/22293270?v=4" width="30px" /></a>
<a href="https://github.com/sre-ci-robot"><img src="https://avatars.githubusercontent.com/u/56469371?v=4" width="30px" /></a>
<a href="https://github.com/sre-ro"><img src="https://avatars.githubusercontent.com/u/93502486?v=4" width="30px" /></a>
<a href="https://github.com/sreyan-ghosh"><img src="https://avatars.githubusercontent.com/u/60854658?v=4" width="30px" /></a>
<a href="https://github.com/ss892714028"><img src="https://avatars.githubusercontent.com/u/34635663?v=4" width="30px" /></a>
<a href="https://github.com/stacyli-0601"><img src="https://avatars.githubusercontent.com/u/218570478?v=4" width="30px" /></a>
<a href="https://github.com/stephen37"><img src="https://avatars.githubusercontent.com/u/6506810?v=4" width="30px" /></a>
<a href="https://github.com/stevetracvc"><img src="https://avatars.githubusercontent.com/u/70416691?v=4" width="30px" /></a>
<a href="https://github.com/stuartjing"><img src="https://avatars.githubusercontent.com/u/3454260?v=4" width="30px" /></a>
<a href="https://github.com/sunby"><img src="https://avatars.githubusercontent.com/u/9817127?v=4" width="30px" /></a>
<a href="https://github.com/sutcalag"><img src="https://avatars.githubusercontent.com/u/83750738?v=4" width="30px" /></a>
<a href="https://github.com/sworddish"><img src="https://avatars.githubusercontent.com/u/219938?v=4" width="30px" /></a>
<a href="https://github.com/talentAN"><img src="https://avatars.githubusercontent.com/u/17634030?v=4" width="30px" /></a>
<a href="https://github.com/tasty-gumi"><img src="https://avatars.githubusercontent.com/u/95212988?v=4" width="30px" /></a>
<a href="https://github.com/taydy"><img src="https://avatars.githubusercontent.com/u/24822588?v=4" width="30px" /></a>
<a href="https://github.com/tbickford"><img src="https://avatars.githubusercontent.com/u/814232?v=4" width="30px" /></a>
<a href="https://github.com/tedxu"><img src="https://avatars.githubusercontent.com/u/152654?v=4" width="30px" /></a>
<a href="https://github.com/tedyu"><img src="https://avatars.githubusercontent.com/u/235188?v=4" width="30px" /></a>
<a href="https://github.com/testwill"><img src="https://avatars.githubusercontent.com/u/8717479?v=4" width="30px" /></a>
<a href="https://github.com/thywdy"><img src="https://avatars.githubusercontent.com/u/56624359?v=4" width="30px" /></a>
<a href="https://github.com/timothycarambat"><img src="https://avatars.githubusercontent.com/u/16845892?v=4" width="30px" /></a>
<a href="https://github.com/tinkerlin"><img src="https://avatars.githubusercontent.com/u/13817362?v=4" width="30px" /></a>
<a href="https://github.com/tinswzy"><img src="https://avatars.githubusercontent.com/u/30112657?v=4" width="30px" /></a>
<a href="https://github.com/topikachu"><img src="https://avatars.githubusercontent.com/u/1520380?v=4" width="30px" /></a>
<a href="https://github.com/trovwu"><img src="https://avatars.githubusercontent.com/u/89676996?v=4" width="30px" /></a>
<a href="https://github.com/tsonglew"><img src="https://avatars.githubusercontent.com/u/14333766?v=4" width="30px" /></a>
<a href="https://github.com/tuwchia"><img src="https://avatars.githubusercontent.com/u/13282807?v=4" width="30px" /></a>
<a href="https://github.com/ulovecode"><img src="https://avatars.githubusercontent.com/u/30142181?v=4" width="30px" /></a>
<a href="https://github.com/uncle-cyh"><img src="https://avatars.githubusercontent.com/u/42989534?v=4" width="30px" /></a>
<a href="https://github.com/unfode"><img src="https://avatars.githubusercontent.com/u/95689995?v=4" width="30px" /></a>
<a href="https://github.com/vladwa"><img src="https://avatars.githubusercontent.com/u/22994848?v=4" width="30px" /></a>
<a href="https://github.com/vsanna"><img src="https://avatars.githubusercontent.com/u/7834445?v=4" width="30px" /></a>
<a href="https://github.com/vtereshyn"><img src="https://avatars.githubusercontent.com/u/32247411?v=4" width="30px" /></a>
<a href="https://github.com/wangting0128"><img src="https://avatars.githubusercontent.com/u/26307815?v=4" width="30px" /></a>
<a href="https://github.com/water32"><img src="https://avatars.githubusercontent.com/u/13234561?v=4" width="30px" /></a>
<a href="https://github.com/wayblink"><img src="https://avatars.githubusercontent.com/u/18096561?v=4" width="30px" /></a>
<a href="https://github.com/weiliu1031"><img src="https://avatars.githubusercontent.com/u/108661493?v=4" width="30px" /></a>
<a href="https://github.com/weishuo2"><img src="https://avatars.githubusercontent.com/u/27938020?v=4" width="30px" /></a>
<a href="https://github.com/wg1026688210"><img src="https://avatars.githubusercontent.com/u/14267759?v=4" width="30px" /></a>
<a href="https://github.com/wh201906"><img src="https://avatars.githubusercontent.com/u/62299611?v=4" width="30px" /></a>
<a href="https://github.com/wscxyey"><img src="https://avatars.githubusercontent.com/u/48882296?v=4" width="30px" /></a>
<a href="https://github.com/wwx441476"><img src="https://avatars.githubusercontent.com/u/28601121?v=4" width="30px" /></a>
<a href="https://github.com/wxyucs"><img src="https://avatars.githubusercontent.com/u/12595343?v=4" width="30px" /></a>
<a href="https://github.com/wxywb"><img src="https://avatars.githubusercontent.com/u/5432721?v=4" width="30px" /></a>
<a href="https://github.com/wzymumon"><img src="https://avatars.githubusercontent.com/u/46886508?v=4" width="30px" /></a>
<a href="https://github.com/xaxys"><img src="https://avatars.githubusercontent.com/u/28949072?v=4" width="30px" /></a>
<a href="https://github.com/xiangzhouguo"><img src="https://avatars.githubusercontent.com/u/93316470?v=4" width="30px" /></a>
<a href="https://github.com/xiaocai2333"><img src="https://avatars.githubusercontent.com/u/46207236?v=4" width="30px" /></a>
<a href="https://github.com/xiaofan-luan"><img src="https://avatars.githubusercontent.com/u/83447078?v=4" width="30px" /></a>
<a href="https://github.com/xiaohu4313888"><img src="https://avatars.githubusercontent.com/u/39088547?v=4" width="30px" /></a>
<a href="https://github.com/xiaowshi"><img src="https://avatars.githubusercontent.com/u/45102896?v=4" width="30px" /></a>
<a href="https://github.com/xiedeyantu"><img src="https://avatars.githubusercontent.com/u/49781471?v=4" width="30px" /></a>
<a href="https://github.com/xige-16"><img src="https://avatars.githubusercontent.com/u/20124155?v=4" width="30px" /></a>
<a href="https://github.com/xiyichan"><img src="https://avatars.githubusercontent.com/u/34647972?v=4" width="30px" /></a>
<a href="https://github.com/xlyslr"><img src="https://avatars.githubusercontent.com/u/14070517?v=4" width="30px" /></a>
<a href="https://github.com/xudalin0609"><img src="https://avatars.githubusercontent.com/u/35444753?v=4" width="30px" /></a>
<a href="https://github.com/xuqiwe"><img src="https://avatars.githubusercontent.com/u/57252655?v=4" width="30px" /></a>
<a href="https://github.com/xzshinan"><img src="https://avatars.githubusercontent.com/u/7299894?v=4" width="30px" /></a>
<a href="https://github.com/yah01"><img src="https://avatars.githubusercontent.com/u/12216890?v=4" width="30px" /></a>
<a href="https://github.com/yahorbarkouski"><img src="https://avatars.githubusercontent.com/u/94449298?v=4" width="30px" /></a>
<a href="https://github.com/yamasite"><img src="https://avatars.githubusercontent.com/u/10089260?v=4" width="30px" /></a>
<a href="https://github.com/yanbinyang"><img src="https://avatars.githubusercontent.com/u/2880762?v=4" width="30px" /></a>
<a href="https://github.com/yanliang567"><img src="https://avatars.githubusercontent.com/u/82361606?v=4" width="30px" /></a>
<a href="https://github.com/yellow-shine"><img src="https://avatars.githubusercontent.com/u/149367927?v=4" width="30px" /></a>
<a href="https://github.com/yelusion2"><img src="https://avatars.githubusercontent.com/u/97278661?v=4" width="30px" /></a>
<a href="https://github.com/yhmo"><img src="https://avatars.githubusercontent.com/u/2282099?v=4" width="30px" /></a>
<a href="https://github.com/yiuluchen"><img src="https://avatars.githubusercontent.com/u/23047684?v=4" width="30px" /></a>
<a href="https://github.com/yiwangdr"><img src="https://avatars.githubusercontent.com/u/80064917?v=4" width="30px" /></a>
<a href="https://github.com/yiwen92"><img src="https://avatars.githubusercontent.com/u/34636520?v=4" width="30px" /></a>
<a href="https://github.com/yongpengli-z"><img src="https://avatars.githubusercontent.com/u/103410837?v=4" width="30px" /></a>
<a href="https://github.com/youny626"><img src="https://avatars.githubusercontent.com/u/9016120?v=4" width="30px" /></a>
<a href="https://github.com/yuyicai"><img src="https://avatars.githubusercontent.com/u/13033733?v=4" width="30px" /></a>
<a href="https://github.com/yxm1536"><img src="https://avatars.githubusercontent.com/u/62009483?v=4" width="30px" /></a>
<a href="https://github.com/zander-bobronnikov"><img src="https://avatars.githubusercontent.com/u/183726703?v=4" width="30px" /></a>
<a href="https://github.com/zc2638"><img src="https://avatars.githubusercontent.com/u/28284116?v=4" width="30px" /></a>
<a href="https://github.com/zc277584121"><img src="https://avatars.githubusercontent.com/u/17022025?v=4" width="30px" /></a>
<a href="https://github.com/zengxy"><img src="https://avatars.githubusercontent.com/u/11961641?v=4" width="30px" /></a>
<a href="https://github.com/zerowe-seven"><img src="https://avatars.githubusercontent.com/u/57790060?v=4" width="30px" /></a>
<a href="https://github.com/zhagnlu"><img src="https://avatars.githubusercontent.com/u/11935707?v=4" width="30px" /></a>
<a href="https://github.com/zhang787jun"><img src="https://avatars.githubusercontent.com/u/51014996?v=4" width="30px" /></a>
<a href="https://github.com/zhanshuyou"><img src="https://avatars.githubusercontent.com/u/7420640?v=4" width="30px" /></a>
<a href="https://github.com/zhanxu33"><img src="https://avatars.githubusercontent.com/u/16716445?v=4" width="30px" /></a>
<a href="https://github.com/zhengbuqian"><img src="https://avatars.githubusercontent.com/u/12147173?v=4" width="30px" /></a>
<a href="https://github.com/zhenwu-cn"><img src="https://avatars.githubusercontent.com/u/2993941?v=4" width="30px" /></a>
<a href="https://github.com/zhikunyao"><img src="https://avatars.githubusercontent.com/u/129478994?v=4" width="30px" /></a>
<a href="https://github.com/zhoubo0317"><img src="https://avatars.githubusercontent.com/u/51948620?v=4" width="30px" /></a>
<a href="https://github.com/zhuwenxing"><img src="https://avatars.githubusercontent.com/u/12268675?v=4" width="30px" /></a>
<a href="https://github.com/zhuyaguang"><img src="https://avatars.githubusercontent.com/u/8857976?v=4" width="30px" /></a>
<a href="https://github.com/zjjzyl"><img src="https://avatars.githubusercontent.com/u/6939141?v=4" width="30px" /></a>
<a href="https://github.com/zxf2017"><img src="https://avatars.githubusercontent.com/u/29620478?v=4" width="30px" /></a>
<!-- Do not remove end of hero-bot --><br>
## Milvus 文档
获取更多有关安装、开发、部署和管理的指南,请查看 [Milvus 文档](https://milvus.io/cn/docs).
### SDK
- [PyMilvus](https://github.com/milvus-io/pymilvus)
- [Java SDK](https://github.com/milvus-io/milvus-sdk-java)(开发中)
- [Go SDK](https://github.com/milvus-io/milvus-sdk-go)(开发中)
- [Cpp SDK](https://github.com/milvus-io/milvus-sdk-cpp)(开发中)
- [Node SDK](https://github.com/milvus-io/milvus-sdk-node)
### Attu
Attu 提供了好用的图形化界面,帮助您更好的管理数据和Milvus.
- [快速开始](https://github.com/zilliztech/milvus-insight#quick-start)
## 社区
欢迎加入 [Slack](https://milvusio.slack.com/join/shared_invite/zt-1slimkif6-8uWK0XPL8adve6vSD4jSwg) 频道分享你的建议与问题。你也可以通过 [FAQ](https://milvus.io/cn/docs/performance_faq.md) 页面,查看常见问题及解答。
订阅 Milvus 邮件:
- [Technical Steering Committee](https://lists.lfai.foundation/g/milvus-tsc)
- [Technical Discussions](https://lists.lfai.foundation/g/milvus-technical-discuss)
- [Announcement](https://lists.lfai.foundation/g/milvus-announce)
关注 Milvus 社交媒体:
- [知乎](https://www.zhihu.com/org/zilliz-11)
- [CSDN](http://zilliz.blog.csdn.net/)
- [Bilibili](http://space.bilibili.com/478166626)
- [Medium](https://medium.com/@milvusio)
- [Twitter](https://twitter.com/milvusio)
- [Youtube](https://www.youtube.com/channel/UCMCo_F7pKjMHBlfyxwOPw-g)
- Zilliz 技术交流微信群
<img src="https://assets.zilliz.com/wechat_2abac21f5a.png?v=1" alt="Wechat QR Code">
## 加入我们
Zilliz 是 Milvus 项目的幕后公司。我们正在 [招聘](https://app.mokahr.com/apply/zilliz/37974#/) 算法、开发和全栈工程师。欢迎加入我们,让我们携手构建下一代的开源数据基础软件。
## 引用
如需在研究论文中使用 Milvus,欢迎添加以下引用:
```
@inproceedings{2021milvus,
title={Milvus: A Purpose-Built Vector Data Management System},
author={Wang, Jianguo and Yi, Xiaomeng and Guo, Rentong and Jin, Hai and Xu, Peng and Li, Shengjun and Wang, Xiangyu and Guo, Xiangzhou and Li, Chengming and Xu, Xiaohai and others},
booktitle={Proceedings of the 2021 International Conference on Management of Data},
pages={2614--2627},
year={2021}
}
```
## 特别感谢
Milvus 采用了以下依赖库:
- 感谢 [FAISS](https://github.com/facebookresearch/faiss) 相似性检索库。
- 感谢开源键值存储 [etcd](https://github.com/coreos/etcd)。
- 感谢分布式信息发布/订阅平台 [Pulsar](https://github.com/apache/pulsar)。
- 感谢存储引擎 [RocksDB](https://github.com/facebook/rocksdb)。
+72
View File
@@ -0,0 +1,72 @@
# Update Milvus API Version
This document explains how to use the `update-milvus-api` command to update the milvus-proto version across all go.mod files in the project.
## Overview
The `update-milvus-api` command has been enhanced to update the milvus-proto version in all 4 go.mod files:
1. `go.mod` (main module)
2. `client/go.mod` (client module)
3. `pkg/go.mod` (pkg module)
4. `tests/go_client/go.mod` (test client module)
## Usage
### Update to a specific tagged version
```bash
make update-milvus-api PROTO_API_VERSION=v2.3.0-dev.1
```
### Update to a specific commit ID
```bash
make update-milvus-api PROTO_API_VERSION=4080770055ad
```
## What the command does
1. **Validates the version**: Checks if the provided version is a valid git tag or treats it as a commit ID
2. **Updates all go.mod files**: Updates the milvus-proto dependency in all 4 go.mod files
3. **Runs go mod tidy**: Ensures all dependencies are properly resolved
4. **Updates the local milvus-proto repo**: Updates the third-party milvus-proto repository if it exists
5. **Provides feedback**: Shows which files were updated
## Example output
```
----------------------------
Update the milvus-proto/go-api/v2@v2.3.0-dev.1
Updating milvus-proto version in all go.mod files...
Updating main go.mod...
Updating client/go.mod...
Updating pkg/go.mod...
Updating tests/go_client/go.mod...
----------------------------
Update the milvus-proto repo
----------------------------
Successfully updated milvus-proto version to v2.3.0-dev.1 in all go.mod files:
- go.mod
- client/go.mod
- pkg/go.mod
- tests/go_client/go.mod
```
## Error handling
- If no version is provided, the command will show usage examples
- If the milvus-proto third-party directory doesn't exist, a warning will be displayed but the go.mod updates will still proceed
- If a git branch with the same name already exists, the command will checkout the commit directly
## Prerequisites
- Go must be installed and available in PATH
- Git must be installed and available in PATH
- Internet connection to fetch the milvus-proto repository
## Notes
- The command will automatically determine if the provided version is a git tag or commit ID
- All go.mod files will be updated to the same version
- The command includes proper error handling and user feedback
+6
View File
@@ -0,0 +1,6 @@
reviewers:
- czs007
- LoveEachDay
approvers:
- maintainers
+209
View File
@@ -0,0 +1,209 @@
# Building Milvus with Docker
Building Milvus is easy if you take advantage of the containerized build environment. This document will guide you through this build process.
1. Docker, using one of the following configurations:
- **macOS** Install Docker for Mac. See installation instructions [here](https://docs.docker.com/docker-for-mac/).
**Note**: You will want to set the Docker VM to have at least 2 vCPU and 8GB of initial memory or building will likely fail.
- **Linux with local Docker** Install Docker according to the [instructions](https://docs.docker.com/installation/#installation) for your OS.
- **Windows with Docker Desktop WSL2 backend** Install Docker according to the [instructions](https://docs.docker.com/desktop/windows/wsl/). Be sure to store your sources in the local Linux file system, not the Windows remote mount at `/mnt/c`.
2. **Optional** [Google Cloud SDK](https://developers.google.com/cloud/sdk/)
You must install and configure Google Cloud SDK if you want to upload your release to Google Cloud Storage and may safely omit this otherwise.
## Overview
While it is possible to build Milvus using a local golang installation, we have a build process that runs in a Docker container. This simplifies initial set up and provides a very consistent build and test environment.
## Before You Begin
Before building Milvus, you must check the eligibility of Docker, Docker Compose, and hardware in line with Milvus' requirements.
<details><summary>Check Docker and Docker Compose version</summary>
<li>Docker version 19.03 or higher is required. </li>
<div class="alert note">
Follow <a href="https://docs.docker.com/get-docker/">Get Docker</a> to install Docker on your system.
</div>
<li>Docker Compose version 1.25.1 or higher is required. </li>
<div class="alert note">
See <a href="https://docs.docker.com/compose/install/">Install Docker Compose</a> for Docker Compose installation guide.
</div>
</details>
<details><summary>Check whether your CPU supports SIMD extension instruction set</summary>
Milvus' computing operations depend on CPUs support for SIMD (Single Instruction, Multiple Data) extension instruction set. Whether your CPU supports SIMD extension instruction set is crucial to index building and vector similarity search within Milvus. Ensure that your CPU supports at least one of the following SIMD instruction sets:
- SSE4.2
- AVX
- AVX2
- AVX512
Run the lscpu command to check if your CPU supports the SIMD instruction sets mentioned above:
```
lscpu | grep -e sse4_2 -e avx -e avx2 -e avx512
```
Check Wikipedia [CPU with AVX](https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#CPUs_with_AVX) for more details.
</details>
## Key scripts
The following scripts are found in the [`build/`](.) directory. Note that all scripts must be run from the Milvus root directory.
- [`build/builder.sh`](builder.sh): Run a command in a build docker container. Common invocations are:
- `build/builder.sh make`: Build just linux binary in the container. Pass options and packages as necessary.
- `build/builder.sh make verifiers`: Run all pre-submission verification check.
- `build/builder.sh make unittest`: Run all unit tests.
- `build/builder.sh make clean`: Clean up all the generated files.
You can specify different OS for builder by setting `OS_NAME` which defaults to `ubuntu20.04`. Valid OS are `ubuntu20.04`, `amazonlinux2023`.
To specify `amazonlinux2023` builder, use these commands:
```shell
export OS_NAME=amazonlinux2023
build/builder.sh make
```
## Dev Containers
You can also get into the dev containers for development.
Enter root path of Milvus project on your host machine, execute the following commands:
```shell
$ ./scripts/devcontainer.sh up
Creating network "milvus-dev" with the default driver
Creating milvus_jaeger_1 ... done
Creating milvus_minio_1 ... done
Creating milvus_pulsar_1 ... done
Creating milvus_etcd_1 ... done
Creating milvus_builder_1 ... done
```
Check running state of Dev Container:
```shell
$ docker compose -f docker-compose-devcontainer.yml ps
Name Command State Ports
---------------------------------------------------------------------------------------------------------------------------------------
milvus_builder_1 /tini -- autouseradd --use ... Up
milvus_etcd_1 etcd -advertise-client-url ... Up 2379/tcp, 2380/tcp
milvus_jaeger_1 /go/bin/all-in-one-linux Up 14250/tcp, 14268/tcp, 16686/tcp, 5775/udp, 5778/tcp, 6831/udp,
6832/udp
milvus_minio_1 /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp
milvus_pulsar_1 bin/pulsar standalone --no ... Up
```
`milvus_builder_1` is the docker of milvus dev, other containers are used as unit test dependencies. you can run compilation and unit test inside the container, enter it:
```shell
docker exec -ti milvus_builder_1 bash
```
Compile the project and run unit test, see details at the [DEVELOPMENT.md](../DEVELOPMENT.md)
```shell
make milvus
```
```shell
make unittest
```
Stop Dev Container
```shell
./scripts/devcontainer.sh down
```
## E2E Tests
Milvus uses Python SDK to write test cases to verify the correctness of Milvus functions. Before running E2E tests, you need a running Milvus:
```shell
cd deployments/docker/dev
docker compose up -d
cd ../../../
build/builder.sh /bin/bash -c "export ROCKSMQ_PATH='/tmp/milvus/rdb_data' && ./scripts/start_standalone.sh && cat"
```
or
```shell
build/builder.sh /bin/bash -c "./scripts/start_cluster.sh && cat"
```
To run E2E tests, use these commands:
```shell
MILVUS_SERVICE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker compose ps -q builder))
cd tests/docker
docker compose run --rm pytest /bin/bash -c "pytest --host ${MILVUS_SERVICE_IP}"
```
## Basic Flow
The scripts under [`build/`](.) are used to build and test. They will ensure that the `builder` Docker image is built (based on [`build/docker/builder`] ) and then execute the appropriate command in that container. These scripts will both ensure that the right data is cached from run to run for incremental builds and will copy the results back out of the container. You can specify a different registry/name for `builder` by setting `IMAGE_REPO` which defaults to `milvusdb`.
The `builder.sh` is executed by first creating a “docker volume“ directory in `.docker/`. The `.docker/` directory is used to cache the third-party package and compiler cache data. It speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again.
## Debug on Host Machine
### Integrate vscode with docker
- Install [Visual Studio Code](https://code.visualstudio.com/)
- Install [Remote Development extension pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack)
- Integrate with VS Code
The working principle is as follows: mount the local file system to the workspace inside the container, or copy it to the container. The extension of vs code is installed inside the container and runs in it, so that the vs Code of the host can fully access the tools, platforms and file systems inside the container. This means that you just need to connect to different containers to switch the entire development environment seamlessly.
![image](../docs/imgs/vscode.png)
Taking the Milvus project as an example, there is a file named **.devcontainer.json** in the root directory of the project. This file describes how vs code accesses (or creates) a development container environment, and defines the container environment, working directory, extension tool set, etc.
- The steps to configure the development environment are as follows:
Start VS Codein the command panel ( F1 ) input **“Remote-Containers: Open Folder in Container”** , then select the project folder which contains devcontainer.json file.
or click right-bottom corner button > < , choose **“Remote-Containers: Open Folder in Container”**then select the project folder which contains devcontainer.json file.
![image](../docs/imgs/remote.png)
VS Code begin load and construct Devcontainer, the progress bar display the construction state.
![image](../docs/imgs/bar.png)
After Construction, VS Code automatically connects to the container. Now you can code and debug in VS Code, just like developing in your host machine.
You can also use terminal of VS Code to enter the Dev container to do something. Choose **Terminal >> New Terminal** in the navigation bar, then you can enter the container:
![image](../docs/imgs/terminal.png)
Modify vscode go setups if necessary, the setting path is **code -> preference -> settings**
```shell
"go.testFlags": ["-v"] //if you want say detailed output when running unit test
"go.coverOnSave": true //if you want to show coverage
"go.lintOnSave": true //if you want to auto golint and check code style
```
![image](../docs/imgs/settings.png)
### Integrate goland with docker
TBD
+67
View File
@@ -0,0 +1,67 @@
#!/bin/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.
# Exit immediately for non zero status
set -e
# Print commands
set -x
# Absolute path to the toplevel milvus directory.
toplevel=$(dirname "$(cd "$(dirname "${0}")"; pwd)")
if [[ -f "$toplevel/.env" ]]; then
set -a # automatically export all variables from .env
source $toplevel/.env
set +a # stop automatically exporting
fi
OS_NAME="${OS_NAME:-ubuntu20.04}"
MILVUS_IMAGE_REPO="${MILVUS_IMAGE_REPO:-milvusdb/milvus}"
MILVUS_IMAGE_TAG="${MILVUS_IMAGE_TAG:-latest}"
if [ -z "$IMAGE_ARCH" ]; then
MACHINE=$(uname -m)
if [ "$MACHINE" = "x86_64" ]; then
IMAGE_ARCH="amd64"
else
IMAGE_ARCH="arm64"
fi
fi
echo ${IMAGE_ARCH}
if [[ "$USE_ASAN" == "ON" ]]; then
if [[ "$OS_NAME" == "ubuntu20.04" ]]; then
BUILD_ARGS="${BUILD_ARGS:---build-arg TARGETARCH=${IMAGE_ARCH} --build-arg MILVUS_ASAN_LIB=/milvus/lib/libasan.so.6}"
elif [[ "$OS_NAME" == "ubuntu22.04" ]]; then
BUILD_ARGS="${BUILD_ARGS:---build-arg TARGETARCH=${IMAGE_ARCH} --build-arg MILVUS_ASAN_LIB=/milvus/lib/libasan.so.8}"
else
BUILD_ARGS="${BUILD_ARGS:---build-arg TARGETARCH=${IMAGE_ARCH}}"
fi
else
BUILD_ARGS="${BUILD_ARGS:---build-arg TARGETARCH=${IMAGE_ARCH}}"
fi
pushd "${toplevel}"
docker build --network host ${BUILD_ARGS} --platform linux/${IMAGE_ARCH} -f "./build/docker/milvus/${OS_NAME}/Dockerfile" -t "${MILVUS_IMAGE_REPO}:${MILVUS_IMAGE_TAG}" .
image_size=$(docker inspect ${MILVUS_IMAGE_REPO}:${MILVUS_IMAGE_TAG} -f '{{.Size}}'| awk '{ byte =$1 /1024/1024/1024; print byte " GB" }')
echo "Image Size for ${MILVUS_IMAGE_REPO}:${MILVUS_IMAGE_TAG} is ${image_size}"
popd
+50
View File
@@ -0,0 +1,50 @@
#!/bin/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.
# Exit immediately for non zero status
set -e
# Print commands
set -x
# Absolute path to the toplevel milvus directory.
toplevel=$(dirname "$(cd "$(dirname "${0}")"; pwd)")
OS_NAME="${OS_NAME:-ubuntu22.04}"
MILVUS_IMAGE_REPO="${MILVUS_IMAGE_REPO:-milvusdb/milvus}"
MILVUS_IMAGE_TAG="${MILVUS_IMAGE_TAG:-gpu-latest}"
MILVUS_BASE_IMAGE_REPO="${MILVUS_BASE_IMAGE_REPO:-milvusdb/milvus-base}"
MILVUS_BASE_IMAGE_TAG="gpu-local"
BUILD_ARGS=""
pushd "${toplevel}"
BUILD_BASE_IMAGE=${BUILD_BASE_IMAGE:-"false"}
# Separate base dockerfile to ignore install dependencies when build milvus image
if [[ ${OS_NAME} == "ubuntu20.04" && ${BUILD_BASE_IMAGE} == "true" ]]; then
docker build -f "./build/docker/milvus/gpu/${OS_NAME}/Dockerfile.base" -t "${MILVUS_BASE_IMAGE_REPO}:${MILVUS_BASE_IMAGE_TAG}" .
BUILD_ARGS="--build-arg MILVUS_BASE_IMAGE_REPO=${MILVUS_BASE_IMAGE_REPO} --build-arg MILVUS_BASE_IMAGE_TAG=${MILVUS_BASE_IMAGE_TAG}"
fi
docker build --network host ${BUILD_ARGS} -f "./build/docker/milvus/gpu/${OS_NAME}/Dockerfile" -t "${MILVUS_IMAGE_REPO}:${MILVUS_IMAGE_TAG}" .
image_size=$(docker inspect ${MILVUS_IMAGE_REPO}:${MILVUS_IMAGE_TAG} -f '{{.Size}}'| awk '{ byte =$1 /1024/1024/1024; print byte " GB" }')
echo "Image Size for ${MILVUS_IMAGE_REPO}:${MILVUS_IMAGE_TAG} is ${image_size}"
popd
+49
View File
@@ -0,0 +1,49 @@
#!/usr/bin/env bash
set -eo pipefail
source ./build/util.sh
# Absolute path to the toplevel milvus directory.
toplevel=$(dirname "$(cd "$(dirname "${0}")"; pwd)")
if [[ "$IS_NETWORK_MODE_HOST" == "true" ]]; then
sed -i '/builder:/,/^\s*$/s/image: \${IMAGE_REPO}\/milvus-env:\${OS_NAME}-\${DATE_VERSION}/&\n network_mode: "host"/' $toplevel/docker-compose.yml
fi
if [[ -f "$toplevel/.env" ]]; then
set -a # automatically export all variables from .env
source $toplevel/.env
set +a # stop automatically exporting
fi
pushd "${toplevel}"
if [[ "${1-}" == "pull" ]]; then
$DOCKER_COMPOSE_COMMAND pull builder
exit 0
fi
if [[ "${1-}" == "down" ]]; then
$DOCKER_COMPOSE_COMMAND down
exit 0
fi
PLATFORM_ARCH="${PLATFORM_ARCH:-${IMAGE_ARCH}}"
export IMAGE_ARCH=${PLATFORM_ARCH}
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-${OS_NAME}-ccache"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-${OS_NAME}-go-mod"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-${OS_NAME}-vscode-extensions"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-${OS_NAME}-conan2"
chmod -R 777 "${DOCKER_VOLUME_DIRECTORY:-.docker}"
$DOCKER_COMPOSE_COMMAND pull builder
if [[ "${CHECK_BUILDER:-}" == "1" ]]; then
$DOCKER_COMPOSE_COMMAND build builder
fi
$DOCKER_COMPOSE_COMMAND run --no-deps --rm builder "$@"
popd
+58
View File
@@ -0,0 +1,58 @@
#!/usr/bin/env bash
set -euo pipefail
source ./build/util.sh
# Absolute path to the toplevel milvus directory.
toplevel=$(dirname "$(cd "$(dirname "${0}")"; pwd)")
if [[ "$IS_NETWORK_MODE_HOST" == "true" ]]; then
sed -i '/gpubuilder:/,/^\s*$/s/image: \${IMAGE_REPO}\/milvus-env:gpu-\${OS_NAME}-\${GPU_DATE_VERSION}/&\n network_mode: "host"/' $toplevel/docker-compose.yml
fi
export OS_NAME="${OS_NAME:-ubuntu22.04}"
pushd "${toplevel}"
if [[ "${1-}" == "pull" ]]; then
$DOCKER_COMPOSE_COMMAND pull gpubuilder
exit 0
fi
if [[ "${1-}" == "down" ]]; then
$DOCKER_COMPOSE_COMMAND down
exit 0
fi
# Attempt to run in the container with the same UID/GID as we have on the host,
# as this results in the correct permissions on files created in the shared
# volumes. This isn't always possible, however, as IDs less than 100 are
# reserved by Debian, and IDs in the low 100s are dynamically assigned to
# various system users and groups. To be safe, if we see a UID/GID less than
# 500, promote it to 501. This is notably necessary on macOS Lion and later,
# where administrator accounts are created with a GID of 20. This solution is
# not foolproof, but it works well in practice.
uid=$(id -u)
gid=$(id -g)
[ "$uid" -lt 500 ] && uid=501
[ "$gid" -lt 500 ] && gid=$uid
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker-gpu}/amd64-${OS_NAME}-ccache"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker-gpu}/amd64-${OS_NAME}-go-mod"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker-gpu}/amd64-${OS_NAME}-vscode-extensions"
mkdir -p "${DOCKER_VOLUME_DIRECTORY:-.docker-gpu}/amd64-${OS_NAME}-conan"
chmod -R 777 "${DOCKER_VOLUME_DIRECTORY:-.docker-gpu}"
docker compose pull gpubuilder
if [[ "${CHECK_BUILDER:-}" == "1" ]]; then
$DOCKER_COMPOSE_COMMAND build gpubuilder
fi
if [[ "$(id -u)" != "0" ]]; then
$DOCKER_COMPOSE_COMMAND run --no-deps --rm -u "$uid:$gid" gpubuilder "$@"
else
$DOCKER_COMPOSE_COMMAND run --no-deps --rm gpubuilder "$@"
fi
popd
+355
View File
@@ -0,0 +1,355 @@
pipeline {
options {
timestamps()
timeout(time: 30, unit: 'MINUTES') // timeout on this stage
}
agent {
kubernetes {
label "milvus-test"
defaultContainer 'main'
yamlFile "build/ci/jenkins/pod/chaos-test.yaml"
customWorkspace '/home/jenkins/agent/workspace'
// idle 5 minutes to wait clean up tasks
idleMinutes 5
}
}
parameters{
choice(
description: 'Chaos Test Type',
name: 'chaos_type',
choices: ['pod-kill', 'pod-failure', 'mem-stress', 'network-latency', 'network-partition', 'io-latency']
)
choice(
description: 'Chaos Test Target: \
mem-stress: datanode, etcd, indexnode, minio, proxy, pulsar, querynode, standalone \
io-fault & io-latency: minio, pulsar, etcd ',
name: 'pod_name',
choices: ["allstandalone", "allcluster", "standalone", "datacoord", "datanode", "indexcoord", "indexnode", "proxy", "pulsar", "querycoord", "querynode", "rootcoord", "etcd", "minio"]
)
choice(
description: 'Chaos Test Task',
name: 'chaos_task',
choices: ['chaos-test', 'data-consist-test']
)
string(
description: 'Image Repository',
name: 'image_repository',
defaultValue: 'harbor.milvus.io/dockerhub/milvusdb/milvus'
)
string(
description: 'Image Tag',
name: 'image_tag',
defaultValue: 'master-latest'
)
string(
description: 'Wait Time after chaos test',
name: 'idel_time',
defaultValue: '1'
)
string(
description: 'Etcd Image Repository',
name: 'etcd_image_repository',
defaultValue: "milvusdb/etcd"
)
string(
description: 'Etcd Image Tag',
name: 'etcd_image_tag',
defaultValue: "3.5.0-r6"
)
string(
description: 'QueryNode Nums',
name: 'querynode_nums',
defaultValue: '3'
)
string(
description: 'DataNode Nums',
name: 'datanode_nums',
defaultValue: '2'
)
string(
description: 'IndexNode Nums',
name: 'indexnode_nums',
defaultValue: '1'
)
string(
description: 'Proxy Nums',
name: 'proxy_nums',
defaultValue: '1'
)
booleanParam(
description: 'Keep Env',
name: 'keep_env',
defaultValue: 'false'
)
}
environment {
ARTIFACTS = "${env.WORKSPACE}/_artifacts"
RELEASE_NAME = "${params.pod_name}-${params.chaos_type}-${env.BUILD_ID}"
NAMESPACE = "chaos-testing"
}
stages {
stage ('Install Dependency') {
steps {
container('main') {
dir ('tests/python_client') {
script {
sh "pip install -r requirements.txt --trusted-host https://test.pypi.org"
}
}
}
}
}
stage ('Modify Milvus chart values') {
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
sh """
yq -i '.queryNode.replicas = "${params.querynode_nums}"' cluster-values.yaml
yq -i '.dataNode.replicas = "${params.datanode_nums}"' cluster-values.yaml
yq -i '.indexNode.replicas = "${params.indexnode_nums}"' cluster-values.yaml
yq -i '.proxy.replicas = "${params.proxy_nums}"' cluster-values.yaml
yq -i '.etcd.image.repository = "${params.etcd_image_repository}"' cluster-values.yaml
yq -i '.etcd.image.tag = "${params.etcd_image_tag}"' cluster-values.yaml
yq -i '.etcd.image.repository = "${params.etcd_image_repository}"' standalone-values.yaml
yq -i '.etcd.image.tag = "${params.etcd_image_tag}"' standalone-values.yaml
"""
}
}
}
}
}
stage ('Deploy Milvus') {
options {
timeout(time: 15, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/chaos/scripts') {
script {
def image_tag_modified = ""
if ("${params.image_tag}" == "master-latest") {
image_tag_modified = sh(returnStdout: true, script: 'bash ../../../../scripts/docker_image_find_tag.sh -n milvusdb/milvus -t master-latest -f master- -F -L -q').trim()
}
else {
image_tag_modified = "${params.image_tag}"
}
sh "echo ${image_tag_modified}"
sh "echo ${params.chaos_type}"
sh "helm repo add milvus https://zilliztech.github.io/milvus-helm"
sh "helm repo update"
def pod_name = "${params.pod_name}"
if (pod_name.contains("standalone")){
sh"""
IMAGE_TAG="${image_tag_modified}" \
REPOSITORY="${params.image_repository}" \
RELEASE_NAME="${env.RELEASE_NAME}" \
bash install_milvus_standalone.sh
"""
}else{
sh"""
IMAGE_TAG="${image_tag_modified}" \
REPOSITORY="${params.image_repository}" \
RELEASE_NAME="${env.RELEASE_NAME}" \
bash install_milvus_cluster.sh
"""
}
sh "kubectl wait --for=condition=Ready pod -l app.kubernetes.io/instance=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl wait --for=condition=Ready pod -l release=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME}"
}
}
}
}
}
stage ('Run e2e test before chaos') {
options {
timeout(time: 5, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
sh "pytest -s -v ../testcases/test_e2e.py --host $host --log-cli-level=INFO --capture=no"
}
}
}
}
}
stage ('Run hello_milvus before chaos') {
options {
timeout(time: 5, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
sh "python3 scripts/hello_milvus.py --host $host"
}
}
}
}
}
stage ('Run chaos test'){
options {
timeout(time: 15, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
sh"""
POD_NAME="${params.pod_name}" \
CHAOS_TYPE="${params.chaos_type}" \
RELEASE_NAME="${env.RELEASE_NAME}" \
bash scripts/modify_config.sh
"""
if ("${params.chaos_task}" == "chaos-test"){
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
sh "timeout 14m pytest -s -v test_chaos.py --host $host --log-cli-level=INFO --capture=no || echo 'chaos test fail' "
}
if ("${params.chaos_task}" == "data-consist-test"){
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
sh "timeout 14m pytest -s -v test_chaos_data_consist.py --host $host --log-cli-level=INFO --capture=no || echo 'chaos test fail' "
}
echo "chaos test done"
sh "kubectl wait --for=condition=Ready pod -l app.kubernetes.io/instance=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl wait --for=condition=Ready pod -l release=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME}"
}
}
}
}
}
stage ('result analysis') {
steps {
container('main') {
dir ('tests/python_client/chaos/reports') {
script {
echo "result analysis"
sh "cat ${env.RELEASE_NAME}.log || echo 'no log file'"
}
}
}
}
}
stage ('Milvus Idle Time') {
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
echo "sleep ${params.idel_time}m"
sh "sleep ${params.idel_time}m"
}
}
}
}
}
stage ('run e2e test after chaos') {
options {
timeout(time: 5, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
sh "pytest -s -v ../testcases/test_e2e.py --host $host --log-cli-level=INFO --capture=no"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME}"
}
}
}
}
}
stage ('Run hello_milvus after chaos') {
options {
timeout(time: 5, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
sh "python3 scripts/hello_milvus.py --host $host"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME}"
}
}
}
}
}
stage ('Verify all collections after chaos') {
options {
timeout(time: 10, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
sh "python3 scripts/verify_all_collections.py --host $host"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME}"
}
}
}
}
}
}
post {
always {
echo 'upload logs'
container('main') {
dir ('tests/python_client/chaos') {
script {
echo "get pod status"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME} || true"
echo "collecte logs"
sh "bash ../../scripts/export_log_k8s.sh ${env.NAMESPACE} ${env.RELEASE_NAME} k8s_log/${env.RELEASE_NAME} || true"
sh "tar -zcvf artifacts-${env.RELEASE_NAME}-pytest-logs.tar.gz /tmp/ci_logs/ --remove-files || true"
sh "tar -zcvf artifacts-${env.RELEASE_NAME}-server-logs.tar.gz k8s_log/ --remove-files || true"
archiveArtifacts artifacts: "artifacts-${env.RELEASE_NAME}-pytest-logs.tar.gz", allowEmptyArchive: true
archiveArtifacts artifacts: "artifacts-${env.RELEASE_NAME}-server-logs.tar.gz", allowEmptyArchive: true
if ("${params.keep_env}" == "false"){
sh "bash scripts/uninstall_milvus.sh ${env.RELEASE_NAME}"
}
}
}
}
}
success {
echo 'I succeeeded!'
container('main') {
dir ('tests/python_client/chaos/scripts') {
script {
sh "bash uninstall_milvus.sh ${env.RELEASE_NAME} || true"
}
}
}
}
unstable {
echo 'I am unstable :/'
}
failure {
echo 'I failed :('
}
changed {
echo 'Things were different before...'
}
}
}
+357
View File
@@ -0,0 +1,357 @@
pipeline {
options {
timestamps()
timeout(time: 30, unit: 'MINUTES') // timeout on this stage
}
agent {
kubernetes {
label "milvus-test"
defaultContainer 'main'
yamlFile "build/ci/jenkins/pod/chaos-test.yaml"
customWorkspace '/home/jenkins/agent/workspace'
// idle 5 minutes to wait clean up tasks
idleMinutes 5
}
}
parameters{
choice(
description: 'Chaos Test Type',
name: 'chaos_type',
choices: ['pod-kill', 'pod-failure', 'mem-stress', 'network-latency', 'network-partition', 'io-latency']
)
choice(
description: 'Chaos Test Target: \
mem-stress: datanode, etcd, indexnode, minio, proxy, kafka, querynode, standalone \
io-fault & io-latency: minio, kafka, etcd ',
name: 'pod_name',
choices: ["allstandalone", "allcluster", "standalone", "datacoord", "datanode", "indexcoord", "indexnode", "proxy", "kafka", "querycoord", "querynode", "rootcoord", "etcd", "minio"]
)
choice(
description: 'Chaos Test Task',
name: 'chaos_task',
choices: ['chaos-test', 'data-consist-test']
)
string(
description: 'Image Repository',
name: 'image_repository',
defaultValue: 'harbor.milvus.io/dockerhub/milvusdb/milvus'
)
string(
description: 'Image Tag',
name: 'image_tag',
defaultValue: 'master-latest'
)
string(
description: 'Wait Time after chaos test',
name: 'idel_time',
defaultValue: '1'
)
string(
description: 'Etcd Image Repository',
name: 'etcd_image_repository',
defaultValue: "milvusdb/etcd"
)
string(
description: 'Etcd Image Tag',
name: 'etcd_image_tag',
defaultValue: "3.5.0-r6"
)
string(
description: 'QueryNode Nums',
name: 'querynode_nums',
defaultValue: '3'
)
string(
description: 'DataNode Nums',
name: 'datanode_nums',
defaultValue: '2'
)
string(
description: 'IndexNode Nums',
name: 'indexnode_nums',
defaultValue: '1'
)
string(
description: 'Proxy Nums',
name: 'proxy_nums',
defaultValue: '1'
)
booleanParam(
description: 'Keep Env',
name: 'keep_env',
defaultValue: 'false'
)
}
environment {
ARTIFACTS = "${env.WORKSPACE}/_artifacts"
RELEASE_NAME = "${params.pod_name}-${params.chaos_type}-${env.BUILD_ID}"
NAMESPACE = "chaos-testing"
}
stages {
stage ('Install Dependency') {
steps {
container('main') {
dir ('tests/python_client') {
script {
sh "pip install -r requirements.txt --trusted-host https://test.pypi.org"
}
}
}
}
}
stage ('Modify Milvus chart values') {
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
sh """
yq -i '.kafka.enabled = true' standalone-values.yaml
yq -i '.kafka.enabled = true' cluster-values.yaml
yq -i '.queryNode.replicas = "${params.querynode_nums}"' cluster-values.yaml
yq -i '.dataNode.replicas = "${params.datanode_nums}"' cluster-values.yaml
yq -i '.indexNode.replicas = "${params.indexnode_nums}"' cluster-values.yaml
yq -i '.proxy.replicas = "${params.proxy_nums}"' cluster-values.yaml
yq -i '.etcd.image.repository = "${params.etcd_image_repository}"' cluster-values.yaml
yq -i '.etcd.image.tag = "${params.etcd_image_tag}"' cluster-values.yaml
yq -i '.etcd.image.repository = "${params.etcd_image_repository}"' standalone-values.yaml
yq -i '.etcd.image.tag = "${params.etcd_image_tag}"' standalone-values.yaml
"""
}
}
}
}
}
stage ('Deploy Milvus') {
options {
timeout(time: 15, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/chaos/scripts') {
script {
def image_tag_modified = ""
if ("${params.image_tag}" == "master-latest") {
image_tag_modified = sh(returnStdout: true, script: 'bash ../../../../scripts/docker_image_find_tag.sh -n milvusdb/milvus -t master-latest -f master- -F -L -q').trim()
}
else {
image_tag_modified = "${params.image_tag}"
}
sh "echo ${image_tag_modified}"
sh "echo ${params.chaos_type}"
sh "helm repo add milvus https://zilliztech.github.io/milvus-helm"
sh "helm repo update"
def pod_name = "${params.pod_name}"
if (pod_name.contains("standalone")){
sh"""
IMAGE_TAG="${image_tag_modified}" \
REPOSITORY="${params.image_repository}" \
RELEASE_NAME="${env.RELEASE_NAME}" \
bash install_milvus_standalone.sh
"""
}else{
sh"""
IMAGE_TAG="${image_tag_modified}" \
REPOSITORY="${params.image_repository}" \
RELEASE_NAME="${env.RELEASE_NAME}" \
bash install_milvus_cluster.sh
"""
}
sh "kubectl wait --for=condition=Ready pod -l app.kubernetes.io/instance=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl wait --for=condition=Ready pod -l release=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME}"
}
}
}
}
}
stage ('Run e2e test before chaos') {
options {
timeout(time: 5, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
sh "pytest -s -v ../testcases/test_e2e.py --host $host --log-cli-level=INFO --capture=no"
}
}
}
}
}
stage ('Run hello_milvus before chaos') {
options {
timeout(time: 5, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
sh "python3 scripts/hello_milvus.py --host $host"
}
}
}
}
}
stage ('Run chaos test'){
options {
timeout(time: 15, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
sh"""
POD_NAME="${params.pod_name}" \
CHAOS_TYPE="${params.chaos_type}" \
RELEASE_NAME="${env.RELEASE_NAME}" \
bash scripts/modify_config.sh
"""
if ("${params.chaos_task}" == "chaos-test"){
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
sh "timeout 14m pytest -s -v test_chaos.py --host $host --log-cli-level=INFO --capture=no || echo 'chaos test fail' "
}
if ("${params.chaos_task}" == "data-consist-test"){
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
sh "timeout 14m pytest -s -v test_chaos_data_consist.py --host $host --log-cli-level=INFO --capture=no || echo 'chaos test fail' "
}
echo "chaos test done"
sh "kubectl wait --for=condition=Ready pod -l app.kubernetes.io/instance=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl wait --for=condition=Ready pod -l release=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME}"
}
}
}
}
}
stage ('result analysis') {
steps {
container('main') {
dir ('tests/python_client/chaos/reports') {
script {
echo "result analysis"
sh "cat ${env.RELEASE_NAME}.log || echo 'no log file'"
}
}
}
}
}
stage ('Milvus Idle Time') {
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
echo "sleep ${params.idel_time}m"
sh "sleep ${params.idel_time}m"
}
}
}
}
}
stage ('run e2e test after chaos') {
options {
timeout(time: 5, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
sh "pytest -s -v ../testcases/test_e2e.py --host $host --log-cli-level=INFO --capture=no"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME}"
}
}
}
}
}
stage ('Run hello_milvus after chaos') {
options {
timeout(time: 5, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
sh "python3 scripts/hello_milvus.py --host $host"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME}"
}
}
}
}
}
stage ('Verify all collections after chaos') {
options {
timeout(time: 10, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/chaos') {
script {
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
sh "python3 scripts/verify_all_collections.py --host $host"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME}"
}
}
}
}
}
}
post {
always {
echo 'upload logs'
container('main') {
dir ('tests/python_client/chaos') {
script {
echo "get pod status"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME} || true"
echo "collecte logs"
sh "bash ../../scripts/export_log_k8s.sh ${env.NAMESPACE} ${env.RELEASE_NAME} k8s_log/${env.RELEASE_NAME} || true"
sh "tar -zcvf artifacts-${env.RELEASE_NAME}-pytest-logs.tar.gz /tmp/ci_logs/ --remove-files || true"
sh "tar -zcvf artifacts-${env.RELEASE_NAME}-server-logs.tar.gz k8s_log/ --remove-files || true"
archiveArtifacts artifacts: "artifacts-${env.RELEASE_NAME}-pytest-logs.tar.gz", allowEmptyArchive: true
archiveArtifacts artifacts: "artifacts-${env.RELEASE_NAME}-server-logs.tar.gz", allowEmptyArchive: true
if ("${params.keep_env}" == "false"){
sh "bash scripts/uninstall_milvus.sh ${env.RELEASE_NAME}"
}
}
}
}
}
success {
echo 'I succeeeded!'
container('main') {
dir ('tests/python_client/chaos/scripts') {
script {
sh "bash uninstall_milvus.sh ${env.RELEASE_NAME} || true"
}
}
}
}
unstable {
echo 'I am unstable :/'
}
failure {
echo 'I failed :('
}
changed {
echo 'Things were different before...'
}
}
}
+393
View File
@@ -0,0 +1,393 @@
pipeline {
options {
timestamps()
}
agent {
kubernetes {
label "milvus-test"
defaultContainer 'main'
yamlFile "build/ci/jenkins/pod/chaos-test.yaml"
customWorkspace '/home/jenkins/agent/workspace'
// idle 5 minutes to wait clean up tasks
idleMinutes 5
}
}
parameters{
choice(
description: 'Choose tools to deploy Milvus',
name: 'deploy_tool',
choices: ['helm']
)
choice(
description: 'Milvus Mode',
name: 'milvus_mode',
choices: ["standalone", "cluster"]
)
choice(
description: 'Deploy Test Task',
name: 'deploy_task',
choices: ['reinstall', 'upgrade']
)
string(
description: 'Old Image Repository',
name: 'old_image_repository',
defaultValue: 'milvusdb/milvus'
)
string(
description: 'Old Version Image Tag',
name: 'old_image_tag',
defaultValue: 'latest'
)
string(
description: 'New Image Repository',
name: 'new_image_repository',
defaultValue: 'harbor.milvus.io/dockerhub/milvusdb/milvus'
)
string(
description: 'New Version Image Tag',
name: 'new_image_tag',
defaultValue: 'master-latest'
)
string(
description: 'Etcd Image Repository',
name: 'etcd_image_repository',
defaultValue: "milvusdb/etcd"
)
string(
description: 'Etcd Image Tag',
name: 'etcd_image_tag',
defaultValue: "3.5.0-r6"
)
string(
description: 'Querynode Nums',
name: 'querynode_nums',
defaultValue: '3'
)
string(
description: 'DataNode Nums',
name: 'datanode_nums',
defaultValue: '2'
)
string(
description: 'IndexNode Nums',
name: 'indexnode_nums',
defaultValue: '1'
)
string(
description: 'Proxy Nums',
name: 'proxy_nums',
defaultValue: '1'
)
string(
description: 'Data Size',
name: 'data_size',
defaultValue: '3000'
)
string(
description: 'Idle Time in Minutes',
name: 'idel_time',
defaultValue: '1'
)
booleanParam(
description: 'Keep Env',
name: 'keep_env',
defaultValue: 'false'
)
}
environment {
ARTIFACTS = "${env.WORKSPACE}/_artifacts"
RELEASE_NAME = "${params.milvus_mode}-${params.deploy_task}-${env.BUILD_ID}"
NAMESPACE = "chaos-testing"
new_image_tag_modified = ""
}
stages {
stage ('Install Dependency') {
steps {
container('main') {
dir ('tests/python_client') {
script {
sh "pip install -r requirements.txt --trusted-host https://test.pypi.org"
}
}
}
}
}
stage ('Modify Milvus chart values') {
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
sh """
yq -i '.queryNode.replicas = "${params.querynode_nums}"' cluster-values.yaml
yq -i '.dataNode.replicas = "${params.datanode_nums}"' cluster-values.yaml
yq -i '.indexNode.replicas = "${params.indexnode_nums}"' cluster-values.yaml
yq -i '.proxy.replicas = "${params.proxy_nums}"' cluster-values.yaml
yq -i '.etcd.image.repository = "${params.etcd_image_repository}"' cluster-values.yaml
yq -i '.etcd.image.tag = "${params.etcd_image_tag}"' cluster-values.yaml
yq -i '.etcd.image.repository = "${params.etcd_image_repository}"' standalone-values.yaml
yq -i '.etcd.image.tag = "${params.etcd_image_tag}"' standalone-values.yaml
cat cluster-values.yaml
"""
}
}
}
}
}
stage ('First Milvus Deployment') {
options {
timeout(time: 15, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
def old_image_tag_modified = ""
def new_image_tag_modified = ""
def old_image_repository_modified = ""
def new_image_repository_modified = ""
if ("${params.old_image_tag}" == "master-latest") {
old_image_tag_modified = sh(returnStdout: true, script: 'bash ../../../scripts/docker_image_find_tag.sh -n milvusdb/milvus -t master-latest -f master- -F -L -q').trim()
}
else if ("${params.old_image_tag}" == "latest") {
old_image_tag_modified = sh(returnStdout: true, script: 'bash ../../../scripts/docker_image_find_tag.sh -n milvusdb/milvus -t latest -F -L -q').trim()
}
else {
old_image_tag_modified = "${params.old_image_tag}"
}
if ("${params.new_image_tag}" == "master-latest") {
new_image_tag_modified = sh(returnStdout: true, script: 'bash ../../../scripts/docker_image_find_tag.sh -n milvusdb/milvus -t master-latest -f master- -F -L -q').trim()
}
else {
new_image_tag_modified = "${params.new_image_tag}"
}
sh "echo ${old_image_tag_modified}"
sh "echo ${new_image_tag_modified}"
sh "echo ${new_image_tag_modified} > new_image_tag_modified.txt"
stash includes: 'new_image_tag_modified.txt', name: 'new_image_tag_modified'
env.new_image_tag_modified = new_image_tag_modified
if ("${params.deploy_task}" == "reinstall"){
echo "reinstall Milvus with new image tag"
old_image_tag_modified = new_image_tag_modified
}
if ("${params.deploy_task}" == "reinstall"){
echo "reinstall Milvus with new image repository"
old_image_repository_modified = "${params.new_image_repository}"
}
else {
old_image_repository_modified = "${params.old_image_repository}"
}
sh "helm repo add milvus https://zilliztech.github.io/milvus-helm"
sh "helm repo update"
if ("${params.deploy_task}" == "upgrade"){
if ("${params.milvus_mode}" == "standalone") {
sh "helm install --wait --timeout 720s ${env.RELEASE_NAME} milvus/milvus --set image.all.repository=${old_image_repository_modified} --set image.all.tag=${old_image_tag_modified} --set etcd.image.repository=milvusdb/etcd --set etcd.image.tag=3.5.5-r2 -f standalone-values.yaml;"
}
if ("${params.milvus_mode}" == "cluster") {
sh "helm install --wait --timeout 720s ${env.RELEASE_NAME} milvus/milvus --set image.all.repository=${old_image_repository_modified} --set image.all.tag=${old_image_tag_modified} --set etcd.image.repository=milvusdb/etcd --set etcd.image.tag=3.5.5-r2 -f cluster-values.yaml;"
}
}
if ("${params.deploy_task}" == "reinstall"){
if ("${params.milvus_mode}" == "standalone") {
sh "helm install --wait --timeout 720s ${env.RELEASE_NAME} milvus/milvus --set image.all.repository=${old_image_repository_modified} --set image.all.tag=${old_image_tag_modified} -f standalone-values.yaml;"
}
if ("${params.milvus_mode}" == "cluster") {
sh "helm install --wait --timeout 720s ${env.RELEASE_NAME} milvus/milvus --set image.all.repository=${old_image_repository_modified} --set image.all.tag=${old_image_tag_modified} -f cluster-values.yaml;"
}
}
sh "kubectl wait --for=condition=Ready pod -l app.kubernetes.io/instance=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl wait --for=condition=Ready pod -l release=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME}"
}
}
}
}
}
stage ('Run first test') {
options {
timeout(time: 30, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
if ("${params.deploy_task}" == "reinstall") {
sh "python3 scripts/action_before_reinstall.py --host ${host} --data_size ${params.data_size}"
}
if ("${params.deploy_task}" == "upgrade") {
sh "python3 scripts/action_before_upgrade.py --host ${host} --data_size ${params.data_size}"
}
}
}
}
}
}
stage ('Milvus Idle Time') {
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
echo "sleep ${params.idel_time}m"
sh "sleep ${params.idel_time}m"
}
}
}
}
}
stage ('Export log for first deployment') {
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
echo "get pod status"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME} || true"
echo "collecte logs"
sh "bash ../../scripts/export_log_k8s.sh ${env.NAMESPACE} ${env.RELEASE_NAME} k8s_log/${env.RELEASE_NAME}/first_deployment || echo 'export log failed'"
}
}
}
}
}
stage ('Uninstall Milvus') {
options {
timeout(time: 15, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
if ("${params.milvus_mode}" == "standalone") {
sh "kubectl delete pod -l app.kubernetes.io/instance=${env.RELEASE_NAME} --grace-period=0 --force"
sh "kubectl delete pod -l release=${env.RELEASE_NAME} --grace-period=0 --force"
sh "kubectl wait --for=condition=Ready pod -l app.kubernetes.io/instance=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl wait --for=condition=Ready pod -l release=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
}
if ("${params.milvus_mode}" == "cluster") {
sh "helm uninstall ${env.RELEASE_NAME}"
}
}
}
}
}
}
stage ('Second Milvus Deployment') {
options {
timeout(time: 20, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
// in case of master-latest is different in two stages, we need use the new_image_tag_modified.txt to store the new_image_tag in first stage
def new_image_tag_modified = ""
dir ("new_image_tag_modified"){
try{
unstash 'new_image_tag_modified'
new_image_tag_modified=sh(returnStdout: true, script: 'cat new_image_tag_modified.txt | tr -d \'\n\r\'')
}catch(e){
print "No image tag info remained"
exit 1
}
}
if ("${params.milvus_mode}" == "standalone") {
sh "helm upgrade --wait --timeout 720s ${env.RELEASE_NAME} milvus/milvus --set image.all.repository=${params.new_image_repository} --set image.all.tag=${new_image_tag_modified} -f standalone-values.yaml"
}
if ("${params.milvus_mode}" == "cluster") {
sh "helm install --wait --timeout 720s ${env.RELEASE_NAME} milvus/milvus --set image.all.repository=${params.new_image_repository} --set image.all.tag=${new_image_tag_modified} -f cluster-values.yaml"
}
sh "sleep 60s"
// sh "kubectl wait --for=condition=Ready pod -l app.kubernetes.io/instance=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
// sh "kubectl wait --for=condition=Ready pod -l release=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME}"
}
}
}
}
}
stage ('Run Second Test') {
options {
timeout(time: 30, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
sh "sleep 60s" // wait loading data for the second deployment to be ready
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
if ("${params.deploy_task}" == "reinstall") {
sh "python3 scripts/action_after_reinstall.py --host ${host} --data_size ${params.data_size}"
}
if ("${params.deploy_task}" == "upgrade") {
sh "python3 scripts/action_after_upgrade.py --host ${host} --data_size ${params.data_size}"
}
}
}
}
}
}
}
post {
always {
echo 'upload logs'
container('main') {
dir ('tests/python_client/deploy') {
script {
echo "get pod status"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME} || true"
echo "collecte logs"
sh "bash ../../scripts/export_log_k8s.sh ${env.NAMESPACE} ${env.RELEASE_NAME} k8s_log/${env.RELEASE_NAME}/second_deployment || echo 'export log failed'"
echo "upload logs"
sh "tar -zcvf artifacts-${env.RELEASE_NAME}-logs.tar.gz k8s_log/ --remove-files || true"
archiveArtifacts artifacts: "artifacts-${env.RELEASE_NAME}-logs.tar.gz", allowEmptyArchive: true
if ("${params.keep_env}" == "false"){
sh "bash ../chaos/scripts/uninstall_milvus.sh ${env.RELEASE_NAME}"
}
}
}
}
}
success {
echo 'I succeeeded!'
container('main') {
dir ('tests/python_client/chaos/scripts') {
script {
sh "bash uninstall_milvus.sh ${env.RELEASE_NAME} || true"
}
}
}
}
unstable {
echo 'I am unstable :/'
}
failure {
echo 'I failed :('
}
changed {
echo 'Things were different before...'
}
}
}
+395
View File
@@ -0,0 +1,395 @@
pipeline {
options {
timestamps()
}
agent {
kubernetes {
label "milvus-test"
defaultContainer 'main'
yamlFile "build/ci/jenkins/pod/chaos-test.yaml"
customWorkspace '/home/jenkins/agent/workspace'
// idle 5 minutes to wait clean up tasks
idleMinutes 5
}
}
parameters{
choice(
description: 'Milvus Mode',
name: 'milvus_mode',
choices: ["standalone", "cluster"]
)
choice(
description: 'MQ Type',
name: 'mq_type',
choices: ["kafka"]
)
choice(
description: 'Deploy Test Task',
name: 'deploy_task',
choices: ['reinstall']
)
string(
description: 'Old Image Repository',
name: 'old_image_repository',
defaultValue: 'milvusdb/milvus'
)
string(
description: 'Old Version Image Tag',
name: 'old_image_tag',
defaultValue: 'latest'
)
string(
description: 'New Image Repository',
name: 'new_image_repository',
defaultValue: 'harbor.milvus.io/dockerhub/milvusdb/milvus'
)
string(
description: 'New Version Image Tag',
name: 'new_image_tag',
defaultValue: 'master-latest'
)
string(
description: 'Etcd Image Repository',
name: 'etcd_image_repository',
defaultValue: "milvusdb/etcd"
)
string(
description: 'Etcd Image Tag',
name: 'etcd_image_tag',
defaultValue: "3.5.0-r6"
)
string(
description: 'Querynode Nums',
name: 'querynode_nums',
defaultValue: '3'
)
string(
description: 'DataNode Nums',
name: 'datanode_nums',
defaultValue: '2'
)
string(
description: 'IndexNode Nums',
name: 'indexnode_nums',
defaultValue: '1'
)
string(
description: 'Proxy Nums',
name: 'proxy_nums',
defaultValue: '1'
)
string(
description: 'Data Size',
name: 'data_size',
defaultValue: '3000'
)
string(
description: 'Idle Time in Minutes',
name: 'idel_time',
defaultValue: '1'
)
booleanParam(
description: 'Keep Env',
name: 'keep_env',
defaultValue: 'false'
)
}
environment {
ARTIFACTS = "${env.WORKSPACE}/_artifacts"
RELEASE_NAME = "${params.milvus_mode}-${params.deploy_task}-${env.BUILD_ID}"
NAMESPACE = "chaos-testing"
new_image_tag_modified = ""
}
stages {
stage ('Install Dependency') {
steps {
container('main') {
dir ('tests/python_client') {
script {
sh "pip install -r requirements.txt --trusted-host https://test.pypi.org"
}
}
}
}
}
stage ('Modify Milvus chart values') {
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
// disable all mq
sh "yq -i '.kafka.enabled = false' cluster-values.yaml"
sh "yq -i '.pulsar.enabled = false' cluster-values.yaml"
// enable mq_type
if ("${params.mq_type}" == "pulsar") {
sh "yq -i '.pulsar.enabled = true' cluster-values.yaml"
} else if ("${params.mq_type}" == "kafka") {
sh "yq -i '.kafka.enabled = true' cluster-values.yaml"
sh "yq -i '.kafka.enabled = true' standalone-values.yaml"
}
sh"""
yq -i '.queryNode.replicas = "${params.querynode_nums}"' cluster-values.yaml
yq -i '.dataNode.replicas = "${params.datanode_nums}"' cluster-values.yaml
yq -i '.indexNode.replicas = "${params.indexnode_nums}"' cluster-values.yaml
yq -i '.proxy.replicas = "${params.proxy_nums}"' cluster-values.yaml
"""
if ("${params.milvus_mode}" == "cluster"){
sh "cat cluster-values.yaml"
}
if ("${params.mq_type}" == "standalone"){
sh "cat standalone-values.yaml"
}
}
}
}
}
}
stage ('First Milvus Deployment') {
options {
timeout(time: 10, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
def old_image_tag_modified = ""
def new_image_tag_modified = ""
def old_image_repository_modified = ""
def new_image_repository_modified = ""
if ("${params.old_image_tag}" == "master-latest") {
old_image_tag_modified = sh(returnStdout: true, script: 'bash ../../../scripts/docker_image_find_tag.sh -n milvusdb/milvus -t master-latest -f master- -F -L -q').trim()
}
else if ("${params.old_image_tag}" == "latest") {
old_image_tag_modified = sh(returnStdout: true, script: 'bash ../../../scripts/docker_image_find_tag.sh -n milvusdb/milvus -t latest -F -L -q').trim()
}
else {
old_image_tag_modified = "${params.old_image_tag}"
}
if ("${params.new_image_tag}" == "master-latest") {
new_image_tag_modified = sh(returnStdout: true, script: 'bash ../../../scripts/docker_image_find_tag.sh -n milvusdb/milvus -t master-latest -f master- -F -L -q').trim()
}
else {
new_image_tag_modified = "${params.new_image_tag}"
}
sh "echo ${old_image_tag_modified}"
sh "echo ${new_image_tag_modified}"
sh "echo ${new_image_tag_modified} > new_image_tag_modified.txt"
stash includes: 'new_image_tag_modified.txt', name: 'new_image_tag_modified'
env.new_image_tag_modified = new_image_tag_modified
if ("${params.deploy_task}" == "reinstall"){
echo "reinstall Milvus with new image tag"
old_image_tag_modified = new_image_tag_modified
}
if ("${params.deploy_task}" == "reinstall"){
echo "reinstall Milvus with new image repository"
old_image_repository_modified = "${params.new_image_repository}"
}
else {
old_image_repository_modified = "${params.old_image_repository}"
}
sh "helm repo add milvus https://zilliztech.github.io/milvus-helm"
sh "helm repo update"
if ("${params.milvus_mode}" == "standalone") {
sh "helm install --wait --timeout 720s ${env.RELEASE_NAME} milvus/milvus --set image.all.repository=${old_image_repository_modified} --set image.all.tag=${old_image_tag_modified} -f standalone-values.yaml;"
}
if ("${params.milvus_mode}" == "cluster") {
sh "helm install --wait --timeout 720s ${env.RELEASE_NAME} milvus/milvus --set image.all.repository=${old_image_repository_modified} --set image.all.tag=${old_image_tag_modified} -f cluster-values.yaml;"
}
sh "kubectl wait --for=condition=Ready pod -l app.kubernetes.io/instance=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl wait --for=condition=Ready pod -l release=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME}"
}
}
}
}
}
stage ('Run first test') {
options {
timeout(time: 20, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
if ("${params.deploy_task}" == "reinstall") {
sh "python3 scripts/action_before_reinstall.py --host ${host} --data_size ${params.data_size}"
}
if ("${params.deploy_task}" == "upgrade") {
sh "python3 scripts/action_before_upgrade.py --host ${host} --data_size ${params.data_size}"
}
}
}
}
}
}
stage ('Milvus Idle Time') {
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
echo "sleep ${params.idel_time}m"
sh "sleep ${params.idel_time}m"
}
}
}
}
}
stage ('Export log for first deployment') {
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
echo "get pod status"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME} || true"
echo "collecte logs"
sh "bash ../../scripts/export_log_k8s.sh ${env.NAMESPACE} ${env.RELEASE_NAME} k8s_log/${env.RELEASE_NAME}/first_deployment || echo 'export log failed'"
}
}
}
}
}
stage ('Uninstall Milvus') {
options {
timeout(time: 15, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
if ("${params.milvus_mode}" == "standalone") {
sh "kubectl delete pod -l app.kubernetes.io/instance=${env.RELEASE_NAME} --grace-period=0 --force"
sh "kubectl delete pod -l release=${env.RELEASE_NAME} --grace-period=0 --force"
sh "kubectl wait --for=condition=Ready pod -l app.kubernetes.io/instance=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl wait --for=condition=Ready pod -l release=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
}
if ("${params.milvus_mode}" == "cluster") {
sh "helm uninstall ${env.RELEASE_NAME}"
}
}
}
}
}
}
stage ('Second Milvus Deployment') {
options {
timeout(time: 15, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
// in case of master-latest is different in two stages, we need use the new_image_tag_modified.txt to store the new_image_tag in first stage
def new_image_tag_modified = ""
dir ("new_image_tag_modified"){
try{
unstash 'new_image_tag_modified'
new_image_tag_modified=sh(returnStdout: true, script: 'cat new_image_tag_modified.txt | tr -d \'\n\r\'')
}catch(e){
print "No image tag info remained"
exit 1
}
}
if ("${params.milvus_mode}" == "standalone") {
sh "helm upgrade --wait --timeout 720s ${env.RELEASE_NAME} milvus/milvus --set image.all.repository=${params.new_image_repository} --set image.all.tag=${new_image_tag_modified} -f standalone-values.yaml"
}
if ("${params.milvus_mode}" == "cluster") {
sh "helm install --wait --timeout 720s ${env.RELEASE_NAME} milvus/milvus --set image.all.repository=${params.new_image_repository} --set image.all.tag=${new_image_tag_modified} -f cluster-values.yaml"
}
sh "kubectl wait --for=condition=Ready pod -l app.kubernetes.io/instance=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl wait --for=condition=Ready pod -l release=${env.RELEASE_NAME} -n ${env.NAMESPACE} --timeout=360s"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME}"
}
}
}
}
}
stage ('Run Second Test') {
options {
timeout(time: 20, unit: 'MINUTES') // timeout on this stage
}
steps {
container('main') {
dir ('tests/python_client/deploy') {
script {
sh "sleep 60s" // wait loading data for the second deployment to be ready
def host = sh(returnStdout: true, script: "kubectl get svc/${env.RELEASE_NAME}-milvus -o jsonpath=\"{.spec.clusterIP}\"").trim()
if ("${params.deploy_task}" == "reinstall") {
sh "python3 scripts/action_after_reinstall.py --host ${host} --data_size ${params.data_size}"
}
if ("${params.deploy_task}" == "upgrade") {
sh "python3 scripts/action_after_upgrade.py --host ${host} --data_size ${params.data_size}"
}
}
}
}
}
}
}
post {
always {
echo 'upload logs'
container('main') {
dir ('tests/python_client/chaos') {
script {
echo "get pod status"
sh "kubectl get pods -o wide|grep ${env.RELEASE_NAME} || true"
echo "collecte logs"
sh "bash ../../scripts/export_log_k8s.sh ${env.NAMESPACE} ${env.RELEASE_NAME} k8s_log/${env.RELEASE_NAME}/second_deployment || echo 'export log failed'"
echo "upload logs"
sh "tar -zcvf artifacts-${env.RELEASE_NAME}-logs.tar.gz k8s_log/ --remove-files || true"
archiveArtifacts artifacts: "artifacts-${env.RELEASE_NAME}-logs.tar.gz", allowEmptyArchive: true
if ("${params.keep_env}" == "false"){
sh "bash scripts/uninstall_milvus.sh ${env.RELEASE_NAME}"
}
}
}
}
}
success {
echo 'I succeeeded!'
container('main') {
dir ('tests/python_client/chaos/scripts') {
script {
sh "bash uninstall_milvus.sh ${env.RELEASE_NAME} || true"
}
}
}
}
unstable {
echo 'I am unstable :/'
}
failure {
echo 'I failed :('
}
changed {
echo 'Things were different before...'
}
}
}
+100
View File
@@ -0,0 +1,100 @@
String cron_timezone = 'TZ=Asia/Shanghai'
String cron_string = BRANCH_NAME == "master" ? "05 21 * * * " : ""
int total_timeout_minutes = 90
// pipeline
pipeline {
triggers {
cron """${cron_timezone}
${cron_string}"""
}
options {
timestamps()
timeout(time: total_timeout_minutes, unit: 'MINUTES')
}
agent {
kubernetes {
// label 'milvus-scale-test'
// inheritFrom 'milvus-test'
defaultContainer 'milvus-test'
yamlFile "build/ci/jenkins/pod/scale-test.yaml"
customWorkspace "/home/jenkins/agent"
// idle 5 minutes to wait clean up tasks
idleMinutes 5
}
}
environment {
PROJECT_NAME = "milvus"
TEST_TYPE = "scale-test"
// SEMVER = "${BRANCH_NAME.contains('/') ? BRANCH_NAME.substring(BRANCH_NAME.lastIndexOf('/') + 1) : BRANCH_NAME}"
ARTIFACTS = "${env.WORKSPACE}/_artifacts"
MILVUS_LOGS = "/tmp/milvus_logs/*"
}
stages {
stage ('Install'){
steps {
container('milvus-test') {
dir ('tests/python_client'){
sh """
pip install --upgrade setuptools
pip install --upgrade pip
pip install -r requirements.txt
"""
}
}
}
}
stage ('Scale Test') {
steps {
container('milvus-test') {
dir ('tests/python_client/scale') {
script {
// pytest run scale case in parallel
sh 'pytest test_data_node_scale.py -v -s'
sh 'pytest test_index_node_scale.py -n 2 -v -s'
sh 'pytest test_proxy_scale.py -v -s'
sh 'pytest test_query_node_scale.py -n 3 -v -s'
}
}
}
}
}
}
post {
unsuccessful {
container ('jnlp') {
script {
emailext subject: '$DEFAULT_SUBJECT',
body: '$DEFAULT_CONTENT',
// recipientProviders: [requestor()],
// replyTo: '$DEFAULT_REPLYTO',
to: 'qa@zilliz.com'
}
}
}
always {
container('milvus-test') {
dir ('tests/scripts') {
script {
dir("${env.ARTIFACTS}") {
sh "tar -zcvf artifacts-${PROJECT_NAME}-${TEST_TYPE}-pytest-logs.tar.gz /tmp/ci_logs --remove-files || true"
archiveArtifacts artifacts: "artifacts-${PROJECT_NAME}-${TEST_TYPE}-pytest-logs.tar.gz ", allowEmptyArchive: true
DIR_LIST = sh(returnStdout: true, script: 'ls -d1 ${MILVUS_LOGS}').trim()
for (d in DIR_LIST.tokenize("\n")) {
sh "echo $d"
def release_name = d.split('/')[-1]
sh "tar -zcvf artifacts-${PROJECT_NAME}-${TEST_TYPE}-${release_name}-logs.tar.gz ${d} --remove-files || true"
archiveArtifacts artifacts: "artifacts-${PROJECT_NAME}-${TEST_TYPE}-${release_name}-logs.tar.gz ", allowEmptyArchive: true
}
}
}
}
}
}
}
}
+30
View File
@@ -0,0 +1,30 @@
apiVersion: v1
kind: Pod
metadata:
labels:
app: milvus-test
namespace: chaos-testing
spec:
containers:
- name: main
image: harbor.milvus.io/qa/krte:dev-4
command:
- cat
tty: true
resources:
limits:
memory: 6Gi
cpu: 2.0
requests:
memory: 4Gi
cpu: 2.0
volumeMounts:
- mountPath: /root/.kube/config
name: kubeconfig
subPath: config
volumes:
- configMap:
defaultMode: 420
name: qa-kubeconfig
name: kubeconfig
serviceAccountName: qa-chaos-admin
+24
View File
@@ -0,0 +1,24 @@
piVersion: v1
kind: Pod
metadata:
name: milvus-test-pod
namespace: qa
spec:
containers:
- name: milvus-test
image: harbor.milvus.io/qa/fouram:1.1
# image: dockerhub-mirror-sh.zilliz.cc/milvusdb/pytest:20211209-cef343f
command:
- cat
tty: true
env:
- name: IN_CLUSTER
value: True
- name: jnlp
image: jenkins/inbound-agent:4.11-1-jdk8
resources:
limits: {}
requests:
memory: 256Mi
cpu: 100m
serviceAccountName: qa-admin
+46
View File
@@ -0,0 +1,46 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: logging
# create dameonset to rsync pod logs
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: cron-logging
namespace: logging
labels:
k8s-app: cron-logging
spec:
selector:
matchLabels:
k8s-app: cron-logging
template:
metadata:
labels:
k8s-app: cron-logging
spec:
containers:
- name: rsync
image: "eeacms/rsync:latest"
imagePullPolicy: IfNotPresent
args:
- /bin/sh
- -c
- >
mkdir -p /var/log/history/;
while true;
do
rsync -ax /var/log/pods/ /var/log/history/;
sleep 1;
done
volumeMounts:
- mountPath: /var/log
name: varlog
volumes:
- hostPath:
path: /var/log
name: varlog
+399
View File
@@ -0,0 +1,399 @@
# from https://github.com/metallb/metallb/tree/v0.9.3/manifests namespace.yaml and metallb.yaml
apiVersion: v1
kind: Namespace
metadata:
name: metallb-system
labels:
app: metallb
---
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
labels:
app: metallb
name: controller
namespace: metallb-system
spec:
allowPrivilegeEscalation: false
allowedCapabilities: []
allowedHostPaths: []
defaultAddCapabilities: []
defaultAllowPrivilegeEscalation: false
fsGroup:
ranges:
- max: 65535
min: 1
rule: MustRunAs
hostIPC: false
hostNetwork: false
hostPID: false
privileged: false
readOnlyRootFilesystem: true
requiredDropCapabilities:
- ALL
runAsUser:
ranges:
- max: 65535
min: 1
rule: MustRunAs
seLinux:
rule: RunAsAny
supplementalGroups:
ranges:
- max: 65535
min: 1
rule: MustRunAs
volumes:
- configMap
- secret
- emptyDir
---
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
labels:
app: metallb
name: speaker
namespace: metallb-system
spec:
allowPrivilegeEscalation: false
allowedCapabilities:
- NET_ADMIN
- NET_RAW
- SYS_ADMIN
allowedHostPaths: []
defaultAddCapabilities: []
defaultAllowPrivilegeEscalation: false
fsGroup:
rule: RunAsAny
hostIPC: false
hostNetwork: true
hostPID: false
hostPorts:
- max: 7472
min: 7472
privileged: true
readOnlyRootFilesystem: true
requiredDropCapabilities:
- ALL
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- configMap
- secret
- emptyDir
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: metallb
name: controller
namespace: metallb-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: metallb
name: speaker
namespace: metallb-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app: metallb
name: metallb-system:controller
rules:
- apiGroups:
- ''
resources:
- services
verbs:
- get
- list
- watch
- update
- apiGroups:
- ''
resources:
- services/status
verbs:
- update
- apiGroups:
- ''
resources:
- events
verbs:
- create
- patch
- apiGroups:
- policy
resourceNames:
- controller
resources:
- podsecuritypolicies
verbs:
- use
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app: metallb
name: metallb-system:speaker
rules:
- apiGroups:
- ''
resources:
- services
- endpoints
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- ''
resources:
- events
verbs:
- create
- patch
- apiGroups:
- policy
resourceNames:
- speaker
resources:
- podsecuritypolicies
verbs:
- use
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
app: metallb
name: config-watcher
namespace: metallb-system
rules:
- apiGroups:
- ''
resources:
- configmaps
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
app: metallb
name: pod-lister
namespace: metallb-system
rules:
- apiGroups:
- ''
resources:
- pods
verbs:
- list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app: metallb
name: metallb-system:controller
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: metallb-system:controller
subjects:
- kind: ServiceAccount
name: controller
namespace: metallb-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app: metallb
name: metallb-system:speaker
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: metallb-system:speaker
subjects:
- kind: ServiceAccount
name: speaker
namespace: metallb-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
app: metallb
name: config-watcher
namespace: metallb-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: config-watcher
subjects:
- kind: ServiceAccount
name: controller
- kind: ServiceAccount
name: speaker
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
app: metallb
name: pod-lister
namespace: metallb-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: pod-lister
subjects:
- kind: ServiceAccount
name: speaker
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
app: metallb
component: speaker
name: speaker
namespace: metallb-system
spec:
selector:
matchLabels:
app: metallb
component: speaker
template:
metadata:
annotations:
prometheus.io/port: '7472'
prometheus.io/scrape: 'true'
labels:
app: metallb
component: speaker
spec:
containers:
- args:
- --port=7472
- --config=config
env:
- name: METALLB_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: METALLB_HOST
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: METALLB_ML_BIND_ADDR
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: METALLB_ML_LABELS
value: "app=metallb,component=speaker"
- name: METALLB_ML_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: METALLB_ML_SECRET_KEY
valueFrom:
secretKeyRef:
name: memberlist
key: secretkey
image: metallb/speaker:v0.9.3
imagePullPolicy: Always
name: speaker
ports:
- containerPort: 7472
name: monitoring
resources:
limits:
cpu: 100m
memory: 100Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
add:
- NET_ADMIN
- NET_RAW
- SYS_ADMIN
drop:
- ALL
readOnlyRootFilesystem: true
hostNetwork: true
nodeSelector:
beta.kubernetes.io/os: linux
serviceAccountName: speaker
terminationGracePeriodSeconds: 2
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: metallb
component: controller
name: controller
namespace: metallb-system
spec:
revisionHistoryLimit: 3
selector:
matchLabels:
app: metallb
component: controller
template:
metadata:
annotations:
prometheus.io/port: '7472'
prometheus.io/scrape: 'true'
labels:
app: metallb
component: controller
spec:
containers:
- args:
- --port=7472
- --config=config
image: metallb/controller:v0.9.3
imagePullPolicy: Always
name: controller
ports:
- containerPort: 7472
name: monitoring
resources:
limits:
cpu: 100m
memory: 100Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- all
readOnlyRootFilesystem: true
nodeSelector:
beta.kubernetes.io/os: linux
securityContext:
runAsNonRoot: true
runAsUser: 65534
serviceAccountName: controller
terminationGracePeriodSeconds: 0
+195
View File
@@ -0,0 +1,195 @@
# Created with `curl -Ls https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.0/components.yaml > build/config/metrics/metrics.yaml`
# And special patches noted below
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
k8s-app: metrics-server
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-view: "true"
name: system:aggregated-metrics-reader
rules:
- apiGroups:
- metrics.k8s.io
resources:
- pods
- nodes
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
k8s-app: metrics-server
name: system:metrics-server
rules:
- apiGroups:
- ""
resources:
- pods
- nodes
- nodes/stats
- namespaces
- configmaps
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
k8s-app: metrics-server
name: metrics-server-auth-reader
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: extension-apiserver-authentication-reader
subjects:
- kind: ServiceAccount
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
k8s-app: metrics-server
name: metrics-server:system:auth-delegator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:auth-delegator
subjects:
- kind: ServiceAccount
name: metrics-server
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
k8s-app: metrics-server
name: system:metrics-server
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:metrics-server
subjects:
- kind: ServiceAccount
name: metrics-server
namespace: kube-system
---
apiVersion: v1
kind: Service
metadata:
labels:
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
spec:
ports:
- name: https
port: 443
protocol: TCP
targetPort: https
selector:
k8s-app: metrics-server
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
k8s-app: metrics-server
name: metrics-server
namespace: kube-system
spec:
selector:
matchLabels:
k8s-app: metrics-server
strategy:
rollingUpdate:
maxUnavailable: 0
template:
metadata:
labels:
k8s-app: metrics-server
spec:
containers:
- args:
- --cert-dir=/tmp
- --secure-port=443
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
- --kubelet-use-node-status-port
- --kubelet-insecure-tls
image: k8s.gcr.io/metrics-server/metrics-server:v0.5.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 3
httpGet:
path: /livez
port: https
scheme: HTTPS
periodSeconds: 10
name: metrics-server
ports:
- containerPort: 443
name: https
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /readyz
port: https
scheme: HTTPS
initialDelaySeconds: 20
periodSeconds: 10
resources:
requests:
cpu: 100m
memory: 200Mi
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000
volumeMounts:
- mountPath: /tmp
name: tmp-dir
nodeSelector:
kubernetes.io/os: linux
priorityClassName: system-cluster-critical
serviceAccountName: metrics-server
volumes:
- emptyDir: {}
name: tmp-dir
---
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
labels:
k8s-app: metrics-server
name: v1beta1.metrics.k8s.io
spec:
group: metrics.k8s.io
groupPriorityMinimum: 100
insecureSkipTLSVerify: true
service:
name: metrics-server
namespace: kube-system
version: v1beta1
versionPriority: 100
+27
View File
@@ -0,0 +1,27 @@
[
{
"kind": "Kubernetes",
"clusterName": "primary",
"podSubnet": "10.10.0.0/16",
"svcSubnet": "10.255.10.0/24",
"network": "network-1"
},
{
"kind": "Kubernetes",
"clusterName": "remote",
"podSubnet": "10.20.0.0/16",
"svcSubnet": "10.255.20.0/24",
"network": "network-1",
"primaryClusterName": "primary",
"meta": {
"fakeVM": false
}
},
{
"kind": "Kubernetes",
"clusterName": "cross-network-primary",
"podSubnet": "10.30.0.0/16",
"svcSubnet": "10.255.30.0/24",
"network": "network-2"
}
]
@@ -0,0 +1,51 @@
# This configures KinD to spin up a k8s cluster with trustworthy jwt (Service Account Token Volume Projection) feature.
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
ipFamily: "ipv4"
kubeProxyMode: "iptables"
podSubnet: "10.247.0.0/16"
serviceSubnet: "10.248.0.0/16"
nodes:
- role: control-plane
- role: worker
- role: worker
kubeadmConfigPatches:
- |
apiVersion: kubeadm.k8s.io/v1beta2
kind: JoinConfiguration
metadata:
name: config
nodeRegistration:
kubeletExtraArgs:
cgroup-root: "/kubelet"
- |
apiVersion: kubeadm.k8s.io/v1beta2
kind: InitConfiguration
metadata:
name: config
nodeRegistration:
kubeletExtraArgs:
cgroup-root: "/kubelet"
- |
apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
metadata:
name: config
controllerManager:
extraArgs:
"v": "4"
scheduler:
extraArgs:
"v": "4"
etcd:
local:
# Run etcd in a tmpfs (in RAM) for performance improvements
dataDir: /tmp/kind-cluster-etcd
apiServer:
extraArgs:
"v": "4"
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"]
endpoint = ["http://kind-registry:5000"]
+61
View File
@@ -0,0 +1,61 @@
# Building Deb package with Docker
Building Milvus Deb package is easy if you take advantage of the containerized build environment. This document will guide you through this build process.
1. Docker, using one of the following configurations:
- **Linux with local Docker** Install Docker according to the [instructions](https://docs.docker.com/installation/#installation) for your OS.
2. Get the opensource milvus code
```bash
git clone https://github.com/milvus-io/milvus.git
cp -r milvus/build/deb .
cd deb
```
3. Start the milvus container and build the deb package
```bash
# Replace the VERSION with your own
sudo docker run -v .:/deb -ti --entrypoint /bin/bash milvusdb/milvus:v$VERSION
# in the container
cd /deb
bash build_deb.sh $VERSION $VERSION $MAINTAINER $DEBEMAIL
```
4. Install the deb package on ubuntu system
```bash
sudo apt-get update
sudo dpkg -i milvus_$VERSION-1_amd64.deb # This package is in the milvus-deb directory
sudo apt-get -f install
```
5. Check the status of Milvus
```bash
sudo systemctl status milvus
```
6. Connect to Milvus
Please refer to [Hello Milvus](https://milvus.io/docs/v2.3.x/example_code.md), then run the example code.
7. Uninstall Milvus
```bash
sudo dpkg -P milvus
```
8. (Optional) By default, Milvus is started in embed mode. If you rely on external etcd and minio, you can modify the following configuration and then restart Milvus.
```bash
sudo vim /etc/milvus/configs/milvus.yaml
```
```yaml
etcd:
endpoints: etcd-ip:2379
...
use:
embed: false
minio:
address: minio-ip
...
common:
storageType: remote
```
+63
View File
@@ -0,0 +1,63 @@
#!/bin/bash
#Change config
rm -rf milvus
cp -r /milvus .
sed -i 's#embed: false#embed: true#' milvus/configs/milvus.yaml
sed -i 's#dir: default.etcd#data.dir: /var/lib/milvus/etcd#' milvus/configs/milvus.yaml
sed -i '/data.dir: \/var\/lib\/milvus\/etcd/a \ config:\n path: /etc/milvus/configs/embedEtcd.yaml' milvus/configs/milvus.yaml
sed -i 's#storageType: remote#storageType: local#' milvus/configs/milvus.yaml
cat << EOF > milvus/configs/embedEtcd.yaml
listen-client-urls: http://0.0.0.0:2379
advertise-client-urls: http://0.0.0.0:2379
quota-backend-bytes: 4294967296
auto-compaction-mode: revision
auto-compaction-retention: '1000'
EOF
#Prepare for milvus-deb
rm -rf milvus-deb
mkdir -p milvus-deb/milvus
mkdir milvus-deb/milvus/milvus-bin
mkdir milvus-deb/milvus/milvus-lib
## binary
cp milvus/bin/milvus milvus-deb/milvus/milvus-bin/
## lib
cp -d milvus/lib/* milvus-deb/milvus/milvus-lib/
cp /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0 milvus-deb/milvus/milvus-lib/libgomp.so.1
## script
cp -r scripts milvus-deb/milvus/
## config
cp -r milvus/configs milvus-deb/milvus/
# set env
apt update
apt install gnupg pbuilder ubuntu-dev-tools apt-file dh-make build-essential brz-debian -y
## $3 is name, $4 is email
bzr whoami "$3 $4"
export DEBFULLNAME="$3"
export DEBEMAIL="$4"
#Initial milvus package
cd milvus-deb
#$2 is Milvus version
tar zcf milvus-$2.tar.gz milvus
rm -rf milvus
bzr dh-make milvus $2 milvus-$2.tar.gz
##Modify debian files
sed -i '1s/unstable/bionic/' milvus/debian/changelog
sed -i "3s/(Closes: #nnnn) <nnnn is the bug number of your ITP>/$2-1/" milvus/debian/changelog
sed -i '3,4d' milvus/debian/README.Debian
sed -i '3,5d' milvus/debian/README.source
cp ../debian/* milvus/debian/
rm -rf milvus/debian/*.ex milvus/debian/*.EX
# package milvus deb
cd milvus
bzr add debian/source/format
bzr commit -m "Initial commit of Debian packaging."
dpkg-buildpackage -us -uc -ui
+1
View File
@@ -0,0 +1 @@
10
+14
View File
@@ -0,0 +1,14 @@
Source: milvus
Section: devel
Priority: optional
Maintainer: Yunmei Li <yunmei.li@zilliz.com>
Build-Depends: debhelper (>= 10), gcc (>= 7.5), g++ (>= 7.5)
Standards-Version: 4.1.2
Homepage: https://github.com/milvus-io/milvus
Package: milvus
Architecture: any-amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, tzdata
Description: An open-source vector dstabase for unstructured data.
Milvus was created in 2019 with a singular goal: store, index, and manage massive embedding vectors generated by deep neural networks and other machine learning (ML) models.
+35
View File
@@ -0,0 +1,35 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: milvus
Source: https://github.com/milvus-io/milvus
Files: *
Copyright: 2019-2022, Zilliz <yunmei.li@zilliz.com>
License: Apache-2.0
Files: debian/*
Copyright: 2022 Zilliz <yunmei.li@zilliz.com>
License: GPL-2+
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
License: Apache-2.0
This package is free software; you can redistribute it and/or modify
it under the terms of the Apache-2.0 License.
On Debian systems, the complete text of the Artistic License can be
found in `/usr/share/common-licenses/Apache-2.0
+2
View File
@@ -0,0 +1,2 @@
README.Debian
README.source
+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/make -f
export HOME = $(CURDIR)
%:
dh $@
override_dh_auto_build:
echo "skip build"
override_dh_auto_install:
mkdir -p $(PWD)/debian/milvus/usr/bin
mkdir -p $(PWD)/debian/milvus/usr/lib/milvus/
mkdir -p $(PWD)/debian/milvus/etc/milvus/configs/advanced
mkdir -p $(PWD)/debian/milvus/lib/systemd/system
mkdir -p $(PWD)/debian/milvus/etc/ld.so.conf.d
cp -f $(PWD)/milvus-bin/milvus $(PWD)/debian/milvus/usr/bin/
cp -P -r $(PWD)/milvus-lib/* $(PWD)/debian/milvus/usr/lib/milvus/
cp -r $(PWD)/configs/advanced/* $(PWD)/debian/milvus/etc/milvus/configs/advanced/
cp $(PWD)/configs/milvus.yaml $(PWD)/debian/milvus/etc/milvus/configs/
cp $(PWD)/configs/glog.conf $(PWD)/debian/milvus/etc/milvus/configs/
cp $(PWD)/configs/embedEtcd.yaml $(PWD)/debian/milvus/etc/milvus/configs/
cp $(PWD)/scripts/milvus.conf $(PWD)/debian/milvus/etc/ld.so.conf.d/
cp $(PWD)/scripts/milvus.service $(PWD)/debian/milvus/lib/systemd/system/
override_dh_shlibdeps:
dh_shlibdeps -l$(shell pwd)/milvus-lib
+1
View File
@@ -0,0 +1 @@
3.0 (quilt)
+1
View File
@@ -0,0 +1 @@
/usr/lib/milvus
+19
View File
@@ -0,0 +1,19 @@
# targets cannot be reloaded.
[Unit]
Description=Milvus Standalone Server
After=network.target syslog.target
[Install]
WantedBy=multi-user.target
Alias=milvus.service
[Service]
Type=simple
StandardOutput=journal
StandardError=inherit
Restart=always
Environment=MILVUSCONF=/etc/milvus/configs/
ExecStart=/usr/bin/milvus run standalone
@@ -0,0 +1,55 @@
# Copyright (C) 2019-2022 Zilliz. All rights reserved.
#
# Licensed 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.
FROM amazonlinux:2023
ARG TARGETARCH
RUN dnf install -y wget g++ gcc gcc-gfortran gdb libatomic libstdc++-static ninja-build git make zip unzip tar which \
autoconf automake python3 python3-pip perl-FindBin texinfo \
pkg-config libuuid-devel libaio perl-IPC-Cmd perl-Digest-SHA libasan tzdata && \
rm -rf /var/cache/yum/*
ENV GOPATH /go
ENV GOROOT /usr/local/go
ENV GO111MODULE on
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.26.4.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
go clean --modcache && \
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
RUN pip3 install conan==2.25.1
RUN echo "target arch $TARGETARCH"
RUN wget -qO- "https://cmake.org/files/v3.27/cmake-3.27.5-linux-`uname -m`.tar.gz" | tar --strip-components=1 -xz -C /usr/local
RUN mkdir /tmp/ccache && cd /tmp/ccache &&\
wget https://dl.fedoraproject.org/pub/epel/9/Everything/`uname -m`/Packages/h/hiredis-1.0.2-2.el9.`uname -m`.rpm &&\
wget https://dl.fedoraproject.org/pub/epel/9/Everything/`uname -m`/Packages/c/ccache-4.5.1-2.el9.`uname -m`.rpm &&\
rpm -i hiredis-1.0.2-2.el9.`uname -m`.rpm ccache-4.5.1-2.el9.`uname -m`.rpm &&\
rm -rf /tmp/ccache
# refer: https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild
RUN mkdir -p /home/milvus/.vscode-server/extensions \
/home/milvus/.vscode-server-insiders/extensions \
&& chmod -R 777 /home/milvus
COPY --chown=0:0 build/docker/builder/entrypoint.sh /
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain=1.92 -y
ENV PATH=/root/.cargo/bin:$PATH
ENTRYPOINT [ "/entrypoint.sh" ]
CMD ["tail", "-f", "/dev/null"]
@@ -0,0 +1,54 @@
# Copyright (C) 2019-2022 Zilliz. All rights reserved.
#
# Licensed 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.
FROM rockylinux/rockylinux:9
ARG TARGETARCH
# Rocky 9 ships with GCC 11 and Python 3.9 by default.
# Enable CRB (CodeReady Builder) repo for texinfo and related build tools.
RUN dnf install -y dnf-plugins-core epel-release && \
dnf config-manager --set-enabled crb && \
dnf install -y \
wget g++ gcc gcc-gfortran gdb libatomic libstdc++-static ninja-build git make zip unzip tar which \
autoconf automake python3 python3-pip perl-FindBin texinfo ccache \
pkg-config libuuid-devel libaio libaio-devel perl-IPC-Cmd perl-Digest-SHA \
libasan tzdata libtool && \
rm -rf /var/cache/dnf/*
ENV GOPATH /go
ENV GOROOT /usr/local/go
ENV GO111MODULE on
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.26.4.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
go clean --modcache && \
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
RUN pip3 install conan==2.25.1
RUN echo "target arch $TARGETARCH"
RUN wget -qO- "https://cmake.org/files/v3.27/cmake-3.27.5-linux-`uname -m`.tar.gz" | tar --strip-components=1 -xz -C /usr/local
# refer: https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild
RUN mkdir -p /home/milvus/.vscode-server/extensions \
/home/milvus/.vscode-server-insiders/extensions \
&& chmod -R 777 /home/milvus
COPY --chown=0:0 build/docker/builder/entrypoint.sh /
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain=1.92 -y
ENV PATH=/root/.cargo/bin:$PATH
ENTRYPOINT [ "/entrypoint.sh" ]
CMD ["tail", "-f", "/dev/null"]
@@ -0,0 +1,63 @@
# Copyright (C) 2019-2022 Zilliz. All rights reserved.
#
# Licensed 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.
FROM ubuntu:focal-20220426
ARG TARGETARCH
RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-certificates gnupg2 \
g++ gcc gfortran gdb gdbserver ninja-build git make ccache libssl-dev zlib1g-dev zip unzip \
clang-format-12 clang-tidy-12 lcov libtool m4 autoconf automake python3 python3-pip \
pkg-config uuid-dev libaio-dev software-properties-common && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata && \
ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
echo "Etc/UTC" > /etc/timezone && \
apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/*
# Upgrade GCC to 11 (focal default is 9, which folly 2024.08.12.00 rejects)
RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
apt-get update && apt-get install -y gcc-11 g++-11 && \
cd /usr/bin && \
unlink gcc && ln -s gcc-11 gcc && \
unlink g++ && ln -s g++-11 g++ && \
unlink gcov && ln -s gcov-11 gcov && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install conan==2.25.1
RUN echo "target arch $TARGETARCH"
RUN wget -qO- "https://cmake.org/files/v3.27/cmake-3.27.5-linux-`uname -m`.tar.gz" | tar --strip-components=1 -xz -C /usr/local
# Install Go
ENV GOPATH /go
ENV GOROOT /usr/local/go
ENV GO111MODULE on
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.26.4.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
go clean --modcache && \
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
# refer: https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild
RUN mkdir -p /home/milvus/.vscode-server/extensions \
/home/milvus/.vscode-server-insiders/extensions \
&& chmod -R 777 /home/milvus
COPY --chown=0:0 build/docker/builder/entrypoint.sh /
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain=1.92 -y
ENV PATH=/root/.cargo/bin:$PATH
ENTRYPOINT [ "/entrypoint.sh" ]
CMD ["tail", "-f", "/dev/null"]
@@ -0,0 +1,60 @@
# Copyright (C) 2019-2022 Zilliz. All rights reserved.
#
# Licensed 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.
FROM ubuntu:jammy-20240530
ARG TARGETARCH
RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-certificates gnupg2 \
g++ gcc gfortran gdb gdbserver ninja-build git make ccache libssl-dev zlib1g-dev zip unzip \
clang-format-15 clang-tidy-15 lcov libtool m4 autoconf automake python3 python3-pip \
pkg-config uuid-dev libaio-dev && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata && \
ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
echo "Etc/UTC" > /etc/timezone && \
apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/*
# upgrade gcc to 12
RUN apt-get update && apt-get install -y gcc-12 g++-12 && cd /usr/bin \
&& unlink gcc && ln -s gcc-12 gcc \
&& unlink g++ && ln -s g++-12 g++ \
&& unlink gcov && ln -s gcov-12 gcov
RUN pip3 install conan==2.25.1
RUN echo "target arch $TARGETARCH"
RUN wget -qO- "https://cmake.org/files/v3.31/cmake-3.31.8-linux-`uname -m`.tar.gz" | tar --strip-components=1 -xz -C /usr/local
# Install Go
ENV GOPATH /go
ENV GOROOT /usr/local/go
ENV GO111MODULE on
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.26.4.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
go clean --modcache && \
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
# refer: https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild
RUN mkdir -p /home/milvus/.vscode-server/extensions \
/home/milvus/.vscode-server-insiders/extensions \
&& chmod -R 777 /home/milvus
COPY --chown=0:0 build/docker/builder/entrypoint.sh /
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain=1.92 -y
ENV PATH=/root/.cargo/bin:$PATH
ENTRYPOINT [ "/entrypoint.sh" ]
CMD ["tail", "-f", "/dev/null"]
@@ -0,0 +1,56 @@
# Copyright (C) 2019-2022 Zilliz. All rights reserved.
#
# Licensed 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.
FROM ubuntu:noble-20240530
ARG TARGETARCH
RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-certificates gnupg2 \
g++ gcc gfortran gdb gdbserver ninja-build git make ccache libssl-dev zlib1g-dev zip unzip \
clang-format-18 clang-tidy-18 lcov libtool m4 autoconf automake python3 python3-pip pipx \
pkg-config uuid-dev libaio-dev && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata && \
ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
echo "Etc/UTC" > /etc/timezone && \
apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/*
# Ubuntu 24.04 ships GCC 13 by default, no upgrade needed
RUN pip3 install --break-system-packages conan==2.25.1
RUN echo "target arch $TARGETARCH"
RUN wget -qO- "https://cmake.org/files/v3.31/cmake-3.31.8-linux-`uname -m`.tar.gz" | tar --strip-components=1 -xz -C /usr/local
# Install Go
ENV GOPATH /go
ENV GOROOT /usr/local/go
ENV GO111MODULE on
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.26.4.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
go clean --modcache && \
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
# refer: https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild
RUN mkdir -p /home/milvus/.vscode-server/extensions \
/home/milvus/.vscode-server-insiders/extensions \
&& chmod -R 777 /home/milvus
COPY --chown=0:0 build/docker/builder/entrypoint.sh /
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain=1.92 -y
ENV PATH=/root/.cargo/bin:$PATH
ENTRYPOINT [ "/entrypoint.sh" ]
CMD ["tail", "-f", "/dev/null"]
+40
View File
@@ -0,0 +1,40 @@
#!/bin/bash
# Exit immediately for non zero status
set -e
# Ensure $HOME exists when starting
if [ ! -d "${HOME}" ]; then
mkdir -p "${HOME}"
fi
# Setup $PS1 for a consistent and reasonable prompt
if [ -w "${HOME}" ] && [ -d /etc/skel ]; then
cp /etc/skel/.bash* "${HOME}"
fi
# Add current (arbitrary) user to /etc/passwd and /etc/group
if ! whoami &> /dev/null; then
if [ -w /etc/passwd ]; then
echo "${USER_NAME:-user}:x:$(id -u):0:${USER_NAME:-user} user:${HOME}:/bin/bash" >> /etc/passwd
echo "${USER_NAME:-user}:x:$(id -u):" >> /etc/group
fi
fi
set +e
if [ -f "/etc/profile.d/devtoolset-11.sh" ]; then
source "/etc/profile.d/devtoolset-11.sh"
fi
if [ -f "/opt/rh/gcc-toolset-11/enable" ]; then
source "/opt/rh/gcc-toolset-11/enable"
fi
if [ -f "/etc/profile.d/llvm-toolset-11.sh" ]; then
source "/etc/profile.d/llvm-toolset-11.sh"
fi
# Exit immediately for non zero status
set -e
exec "$@"
@@ -0,0 +1,88 @@
# Copyright (C) 2019-2022 Zilliz. All rights reserved.
#
# Licensed 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.
FROM nvidia/cuda:11.8.0-devel-ubuntu20.04
ARG TARGETARCH
RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-certificates gnupg2 ninja-build && \
wget -qO- "https://cmake.org/files/v3.27/cmake-3.27.5-linux-`uname -m`.tar.gz" | tar --strip-components=1 -xz -C /usr/local && \
apt-get update && apt-get install -y --no-install-recommends \
g++ gcc gfortran git make ccache libssl-dev zlib1g-dev zip unzip \
clang-format-12 clang-tidy-12 lcov libtool m4 autoconf automake python3 python3-pip \
pkg-config uuid-dev libaio-dev libgoogle-perftools-dev && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata && \
ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
echo "Etc/UTC" > /etc/timezone && \
apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install conan==2.25.1
# Install openblas
# RUN wget https://github.com/xianyi/OpenBLAS/archive/v0.3.21.tar.gz && \
# tar zxvf v0.3.21.tar.gz && cd OpenBLAS-0.3.21 && \
# make NO_STATIC=1 NO_LAPACK=1 NO_LAPACKE=1 NO_CBLAS=1 NO_AFFINITY=1 USE_OPENMP=1 \
# TARGET=HASWELL DYNAMIC_ARCH=1 \
# NUM_THREADS=64 MAJOR_VERSION=3 libs shared && \
# make PREFIX=/usr/local NUM_THREADS=64 MAJOR_VERSION=3 install && \
# rm -f /usr/local/include/cblas.h /usr/local/include/lapack* && \
# cd .. && rm -rf OpenBLAS-0.3.21 && rm v0.3.21.tar.gz
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib"
# Install Go
ENV GOPATH /go
ENV GOROOT /usr/local/go
ENV GO111MODULE on
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.26.4.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go && \
mkdir -p "$GOPATH/src" "$GOPATH/bin" && \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${GOROOT}/bin v2.11.3 && \
# export GO111MODULE=on && go get github.com/quasilyte/go-ruleguard/cmd/ruleguard@v0.2.1 && \
go install github.com/ramya-rao-a/go-outline@latest && \
go install golang.org/x/tools/gopls@latest && \
go install github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest && \
go install github.com/go-delve/delve/cmd/dlv@latest && \
go install honnef.co/go/tools/cmd/staticcheck@2022.1 && \
go clean --modcache && \
chmod -R 777 "$GOPATH" && chmod -R a+w $(go env GOTOOLDIR)
RUN ln -s /go/bin/dlv /go/bin/dlv-dap
RUN apt-get update && apt-get install -y --no-install-recommends \
gdb gdbserver && \
apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/*
RUN echo 'root:root' | chpasswd
# refer: https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild
RUN mkdir -p /home/milvus/.vscode-server/extensions \
/home/milvus/.vscode-server-insiders/extensions \
&& chmod -R 777 /home/milvus
COPY --chown=0:0 build/docker/builder/entrypoint.sh /
RUN ls -la /entrypoint.sh
RUN wget -qO- "https://github.com/jeffoverflow/autouseradd/releases/download/1.2.0/autouseradd-1.2.0-amd64.tar.gz" | tar xz -C / --strip-components 1
RUN wget -O /tini https://github.com/krallin/tini/releases/download/v0.19.0/tini && \
chmod +x /tini
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain=1.92 -y
ENV PATH=/root/.cargo/bin:$PATH
ENTRYPOINT [ "/tini", "--", "autouseradd", "--user", "milvus", "--", "/entrypoint.sh" ]
CMD ["tail", "-f", "/dev/null"]
@@ -0,0 +1,36 @@
FROM nvidia/cuda:12.9.1-devel-ubuntu22.04 as builder
ARG TARGETARCH
RUN apt-get update && apt-get install -y --no-install-recommends wget curl ca-certificates gnupg2 ninja-build && \
wget -qO- "https://cmake.org/files/v3.31/cmake-3.31.8-linux-`uname -m`.tar.gz" | tar --strip-components=1 -xz -C /usr/local && \
apt-get update && apt-get install -y --no-install-recommends \
g++ gcc gfortran git make ccache libssl-dev zlib1g-dev zip unzip \
clang-format-15 clang-tidy-15 lcov libtool m4 autoconf automake python3 python3-pip \
pkg-config uuid-dev libaio-dev libgoogle-perftools-dev && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata && \
ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
echo "Etc/UTC" > /etc/timezone && \
apt-get remove --purge -y && \
rm -rf /var/lib/apt/lists/*
# Install go
RUN mkdir -p /usr/local/go && wget -qO- "https://go.dev/dl/go1.26.4.linux-$TARGETARCH.tar.gz" | tar --strip-components=1 -xz -C /usr/local/go
# Install conan
RUN pip3 install conan==2.25.1
# Install rust
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain=1.92 -y
ENV PATH=/root/.cargo/bin:/usr/local/bin:/usr/local/go/bin:$PATH
# refer: https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild
RUN mkdir -p /home/milvus/.vscode-server/extensions \
/home/milvus/.vscode-server-insiders/extensions \
&& chmod -R 777 /home/milvus
RUN wget -O /tini https://github.com/krallin/tini/releases/download/v0.19.0/tini-$TARGETARCH && \
chmod +x /tini

Some files were not shown because too many files have changed in this diff Show More