Skip to content

Commit

Permalink
Merge branch 'master' into fix-main-yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yellow-shine authored Jan 5, 2024
2 parents e67165d + 3561586 commit 99510f4
Show file tree
Hide file tree
Showing 272 changed files with 8,115 additions and 3,277 deletions.
55 changes: 55 additions & 0 deletions .github/actions/bump-builder-version/action.yaml
Original file line number Diff line number Diff line change
@@ -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 }}"
45 changes: 19 additions & 26 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,15 @@ jobs:
- name: Build
run: |
./build/builder.sh /bin/bash -c "make USE_ASAN=${{env.useasan}} build-cpp-with-coverage"
- run: |
zip -r code.zip . -x "./.docker/*" -x "./cmake_build/thirdparty/*"
- name: Archive code
uses: actions/upload-artifact@v3
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: code
path: code.zip
compression-level: 0 # no compression
path: |
**/*
!./.docker/**
!./cmake_build/thirdparty/**
UT-Cpp:
name: UT for Cpp
needs: Build
Expand All @@ -107,13 +109,10 @@ jobs:
env:
UBUNTU: 20.04
steps:
- name: Download code
uses: actions/download-artifact@v3.0.1
- name: Download Artifact
uses: actions/download-artifact@v4.1.0
with:
name: code
- run: |
unzip code.zip
rm code.zip
- name: Download Caches
uses: ./.github/actions/cache
with:
Expand All @@ -130,7 +129,7 @@ jobs:
chmod +x internal/core/output/unittest/*
./build/builder.sh /bin/bash -c ./scripts/run_cpp_codecov.sh
- name: Archive result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cpp-result
path: |
Expand All @@ -148,13 +147,10 @@ jobs:
env:
UBUNTU: 20.04
steps:
- name: Download code
uses: actions/download-artifact@v3.0.1
- name: Download Artifact
uses: actions/download-artifact@v4.1.0
with:
name: code
- run: |
unzip code.zip
rm code.zip
- name: Download Caches
uses: ./.github/actions/cache
with:
Expand All @@ -170,7 +166,7 @@ jobs:
chmod +x scripts/run_go_codecov.sh
./build/builder.sh /bin/bash -c ./scripts/run_go_codecov.sh
- name: Archive result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: go-result
path: |
Expand All @@ -189,13 +185,10 @@ jobs:
env:
UBUNTU: 20.04
steps:
- name: Download code
uses: actions/download-artifact@v3.0.1
- name: Download Artifact
uses: actions/download-artifact@v4.1.0
with:
name: code
- run: |
unzip code.zip
rm code.zip
- name: Download Caches
uses: ./.github/actions/cache
with:
Expand All @@ -211,7 +204,7 @@ jobs:
chmod +x scripts/run_intergration_test.sh
./build/builder.sh /bin/bash -c ./scripts/run_intergration_test.sh
- name: Archive result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: it-result
path: |
Expand All @@ -225,15 +218,15 @@ jobs:
timeout-minutes: 5
steps:
- name: Download Cpp code coverage results
uses: actions/download-artifact@v3.0.1
uses: actions/download-artifact@v4.1.0
with:
name: cpp-result
- name: Download Go code coverage results
uses: actions/download-artifact@v3.0.1
uses: actions/download-artifact@v4.1.0
with:
name: go-result
- name: Download Integration Test coverage results
uses: actions/download-artifact@v3.0.1
uses: actions/download-artifact@v4.1.0
with:
name: it-result
- name: Display structure of code coverage results
Expand Down
57 changes: 11 additions & 46 deletions .github/workflows/publish-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,12 @@ jobs:
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
- name: Docker Pull
shell: bash
run: |
docker run --rm --privileged tonistiigi/binfmt:latest --install arm64
docker buildx ls
# Check if the builder named "milvus" exists
if docker buildx ls | grep -q "milvus"; then
echo "Builder 'milvus' already exists. Skipping creation."
else
# Create the builder named "milvus"
echo "Creating builder named 'milvus'..."
docker buildx create --use --name=milvus --driver docker-container
echo "'milvus' builder created."
fi
- 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: Docker Build
if: success() && github.event_name == 'pull_request' && github.repository == 'milvus-io/milvus'
shell: bash
Expand All @@ -83,36 +74,10 @@ jobs:
-p ${{ secrets.DOCKERHUB_TOKEN }}
docker buildx build --platform linux/amd64,linux/arm64 --push -t milvusdb/milvus-env:${OS_NAME}-${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }} -f build/docker/builder/cpu/${OS_NAME}/Dockerfile .
docker buildx build --platform linux/amd64,linux/arm64 --push -t milvusdb/milvus-env:${OS_NAME}-latest -f build/docker/builder/cpu/${OS_NAME}/Dockerfile .
- name: Update Builder Image Changes
- name: Bump Builder Version
uses: ./.github/actions/bump-builder-version
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus' && matrix.os == 'ubuntu20.04'
continue-on-error: true
shell: bash
run: |
sed -i "s#^DATE_VERSION=.*#DATE_VERSION=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}#g" .env
sed -i "s#^LATEST_DATE_VERSION=.*#LATEST_DATE_VERSION=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}#g" .env
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
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus' && matrix.os == 'ubuntu20.04'
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_builder_${{ github.sha }}
delete-branch: true
title: '[automated] Update Builder image changes'
body: |
Update 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
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus' && matrix.os == 'ubuntu20.04'
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
tag: "${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}"
type: cpu
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
36 changes: 5 additions & 31 deletions .github/workflows/publish-gpu-builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,36 +73,10 @@ jobs:
# Building the second image
docker build -t milvusdb/milvus-env:gpu-${OS_NAME}-latest -f build/docker/builder/gpu/${OS_NAME}/Dockerfile .
docker push milvusdb/milvus-env:gpu-${OS_NAME}-latest
- name: Update Builder Image Changes
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus' && matrix.os == 'ubuntu20.04'
continue-on-error: true
shell: bash
run: |
sed -i "s#^GPU_DATE_VERSION=.*#GPU_DATE_VERSION=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}#g" .env
sed -i "s#^LATEST_GPU_DATE_VERSION=.*#LATEST_GPU_DATE_VERSION=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}#g" .env
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 gpu image changes"
- name: Create Pull Request
id: cpr
- name: Bump Builder Version
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus' && matrix.os == 'ubuntu20.04'
continue-on-error: true
uses: peter-evans/create-pull-request@v3
uses: ./.github/actions/bump-builder-version
with:
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: update_gpu_builder_${{ github.sha }}
delete-branch: true
title: '[automated] Update Builder gpu image changes'
body: |
Update Builder gpu 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' && matrix.os == 'ubuntu20.04'
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
tag: "${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}"
type: gpu
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ generate-mockery-datanode: getdeps
$(INSTALL_PATH)/mockery --name=BufferManager --dir=$(PWD)/internal/datanode/writebuffer --output=$(PWD)/internal/datanode/writebuffer --filename=mock_mananger.go --with-expecter --structname=MockBufferManager --outpkg=writebuffer --inpackage
$(INSTALL_PATH)/mockery --name=BinlogIO --dir=$(PWD)/internal/datanode/io --output=$(PWD)/internal/datanode/io --filename=mock_binlogio.go --with-expecter --structname=MockBinlogIO --outpkg=io --inpackage
$(INSTALL_PATH)/mockery --name=FlowgraphManager --dir=$(PWD)/internal/datanode --output=$(PWD)/internal/datanode --filename=mock_fgmanager.go --with-expecter --structname=MockFlowgraphManager --outpkg=datanode --inpackage
$(INSTALL_PATH)/mockery --name=ChannelManager --dir=$(PWD)/internal/datanode --output=$(PWD)/internal/datanode --filename=mock_channelmanager.go --with-expecter --structname=MockChannelManager --outpkg=datanode --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
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Contributions to Milvus are welcome from everyone. See [Guidelines for Contribut
### All contributors

<br><!-- Do not remove start of hero-bot -->
<img src="https://img.shields.io/badge/all--contributors-346-orange"><br>
<img src="https://img.shields.io/badge/all--contributors-348-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/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>
Expand Down Expand Up @@ -299,6 +299,7 @@ Contributions to Milvus are welcome from everyone. See [Guidelines for Contribut
<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/cqy123456"><img src="https://avatars.githubusercontent.com/u/39671710?v=4" width="30px" /></a>
Expand Down Expand Up @@ -371,7 +372,6 @@ Contributions to Milvus are welcome from everyone. See [Guidelines for Contribut
<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/kilianovski"><img src="https://avatars.githubusercontent.com/u/22048793?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/lee-eve"><img src="https://avatars.githubusercontent.com/u/9720105?v=4" width="30px" /></a>
<a href="https://github.com/lentitude2tk"><img src="https://avatars.githubusercontent.com/u/108672767?v=4" width="30px" /></a>
Expand All @@ -397,6 +397,7 @@ Contributions to Milvus are welcome from everyone. See [Guidelines for Contribut
<a href="https://github.com/miia12"><img src="https://avatars.githubusercontent.com/u/22544815?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/mishakeyvalue"><img src="https://avatars.githubusercontent.com/u/22048793?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>
Expand Down Expand Up @@ -463,6 +464,7 @@ Contributions to Milvus are welcome from everyone. See [Guidelines for Contribut
<a href="https://github.com/ulovecode"><img src="https://avatars.githubusercontent.com/u/30142181?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/want-fly"><img src="https://avatars.githubusercontent.com/u/36727480?v=4" width="30px" /></a>
Expand Down
Loading

0 comments on commit 99510f4

Please sign in to comment.