Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
Signed-off-by: kpango <[email protected]>
  • Loading branch information
kpango committed Jul 29, 2024
1 parent caa8f03 commit 035da01
Show file tree
Hide file tree
Showing 41 changed files with 814 additions and 244 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-e2e/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ inputs:
require_libhdf5:
description: "If libhdf5 is not required, set this to false"
required: false
default: "true"
default: "false"
require_go:
description: "If go is not required, set this to false"
required: false
Expand Down
25 changes: 24 additions & 1 deletion .github/actions/setup-k3d/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,32 @@ runs:
shell: bash
id: start_k3d
run: |
k3d cluster create ${{ inputs.name }} ${{ steps.k3d_options.outputs.options }}
k3d cluster create ${{ inputs.name }} ${{ steps.k3d_options.outputs.options }} \
--image docker.io/rancher/k3s:latest \
--host-pid-mode=true \
--k3s-arg "--disable=traefik@server:*" \
--api-port 0.0.0.0:6443 \
-v "/lib/modules:/lib/modules"
k3d cluster start ${{ inputs.name }}
k3d kubeconfig merge ${{ inputs.name }} --kubeconfig-switch-context
- name: Ready k8s cluster
shell: bash
run: |
k3d cluster list
server="k3d-${{ inputs.name }}-server-0"
docker logs ${server}
docker inspect ${server}
- name: Set k3d cluster config to KUBECONFIG
shell: bash
run: |
echo "KUBECONFIG=$(k3d kubeconfig write ${{ inputs.name }})" >> $GITHUB_ENV
- name: Check KUBECONFIG environment variable
shell: bash
run: |
echo $KUBECONFIG
cat $KUBECONFIG
cat /etc/hosts
- name: Show Kubernetes Cluster Info
shell: bash
run: |
kubectl cluster-info dump
18 changes: 14 additions & 4 deletions .github/workflows/e2e-chaos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/dump-context
detect-ci-container:
uses: ./.github/workflows/_detect-ci-container.yml
agent-failure:
name: "E2E chaos test (Agent failure: to test insert/search works even if one of the agents is failing)"
needs: [dump-contexts-to-log]
needs: [detect-ci-container]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down Expand Up @@ -75,9 +79,11 @@ jobs:
e2e/insert/search
random-pod-failure:
name: "E2E chaos test (random Pod failure: to test redundancy)"
needs: [dump-contexts-to-log]
needs: [detect-ci-container]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down Expand Up @@ -113,9 +119,11 @@ jobs:
e2e/insert/search
agent-network-partition:
name: "E2E chaos test (agent network partition: to test retries)"
needs: [dump-contexts-to-log]
needs: [detect-ci-container]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down Expand Up @@ -151,9 +159,11 @@ jobs:
e2e/insert/search
clusterwide-network-bandwidth:
name: "E2E chaos test (network bandwidth: to test it works properly under bandwidth limitation)"
needs: [dump-contexts-to-log]
needs: [detect-ci-container]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/e2e-max-dim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/dump-context
detect-ci-container:
uses: ./.github/workflows/_detect-ci-container.yml
e2e-max-dimension-insert:
name: "E2E test (Max Dimension Insert: skip strict exist check)"
needs: [dump-contexts-to-log]
needs: [detect-ci-container]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/e2e-profiling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/dump-context
detect-ci-container:
uses: ./.github/workflows/_detect-ci-container.yml
e2e-profiling:
name: "E2E profiling"
needs: [dump-contexts-to-log]
needs: [detect-ci-container]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down
34 changes: 26 additions & 8 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/dump-context
detect-ci-container:
uses: ./.github/workflows/_detect-ci-container.yml
e2e-stream-crud:
name: "E2E test (Stream CRUD)"
needs: [dump-contexts-to-log]
needs: [detect-ci-container]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down Expand Up @@ -73,9 +77,11 @@ jobs:
POD_NAME: ${{ steps.deploy_vald.outputs.POD_NAME }}
e2e-stream-crud-for-operator:
name: "E2E test (Stream CRUD) for operator"
needs: [dump-contexts-to-log]
needs: [detect-ci-container]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down Expand Up @@ -133,9 +139,11 @@ jobs:
POD_NAME: ${{ steps.deploy_vald.outputs.POD_NAME }}
e2e-stream-crud-under-index-management-jobs:
name: "E2E test (Stream CRUD) under index management jobs"
needs: [dump-contexts-to-log]
needs: [detect-ci-container]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down Expand Up @@ -175,9 +183,11 @@ jobs:
POD_NAME: ${{ steps.deploy_vald.outputs.POD_NAME }}
e2e-stream-crud-skip-exist-check:
name: "E2E test (Stream CRUD: skip strict exist check)"
needs: [dump-contexts-to-log]
needs: [detect-ci-container]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down Expand Up @@ -213,9 +223,11 @@ jobs:
POD_NAME: ${{ steps.deploy_vald.outputs.POD_NAME }}
e2e-multiapis-crud:
name: "E2E test (Multi-APIs CRUD)"
needs: [dump-contexts-to-log]
needs: [detect-ci-container]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down Expand Up @@ -247,9 +259,11 @@ jobs:
POD_NAME: ${{ steps.deploy_vald.outputs.POD_NAME }}
e2e-jobs:
name: "E2E test (Jobs)"
needs: [dump-contexts-to-log]
needs: [detect-ci-container]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down Expand Up @@ -278,9 +292,11 @@ jobs:
POD_NAME: ${{ steps.deploy_vald.outputs.POD_NAME }}
e2e-stream-crud-with-readreplica:
name: "E2E test (Stream CRUD) with read replica"
needs: [dump-contexts-to-log]
needs: [detect-ci-container]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down Expand Up @@ -326,9 +342,11 @@ jobs:
POD_NAME: ${{ steps.deploy_vald_readreplica.outputs.POD_NAME }}
e2e-stream-crud-with-mirror:
name: "E2E test (Stream CRUD) with mirror"
needs: [dump-contexts-to-log]
needs: [detect-ci-container]
runs-on: ubuntu-latest
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ jobs:
name: CRUD test on remote Helm chart
runs-on: ubuntu-latest
timeout-minutes: 60
needs: [detect-ci-container]
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down
43 changes: 30 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ CARGO_HOME ?= $(RUST_HOME)/cargo
RUST_VERSION := $(eval RUST_VERSION := $(shell cat versions/RUST_VERSION))$(RUST_VERSION)

BUF_VERSION := $(eval BUF_VERSION := $(shell cat versions/BUF_VERSION))$(BUF_VERSION)
DOCKER_VERSION := $(eval DOCKER_VERSION := $(shell cat versions/DOCKER_VERSION))$(DOCKER_VERSION)
CMAKE_VERSION := $(eval CMAKE_VERSION := $(shell cat versions/CMAKE_VERSION))$(CMAKE_VERSION)
DOCKER_VERSION := $(eval DOCKER_VERSION := $(shell cat versions/DOCKER_VERSION))$(DOCKER_VERSION)
FAISS_VERSION := $(eval FAISS_VERSION := $(shell cat versions/FAISS_VERSION))$(FAISS_VERSION)
GOLANGCILINT_VERSION := $(eval GOLANGCILINT_VERSION := $(shell cat versions/GOLANGCILINT_VERSION))$(GOLANGCILINT_VERSION)
HDF5_VERSION := $(eval HDF5_VERSION := $(shell cat versions/HDF5_VERSION))$(HDF5_VERSION)
Expand Down Expand Up @@ -139,7 +140,7 @@ PBGOS = $(PROTOS:apis/proto/%.proto=apis/grpc/%.pb.go)
SWAGGERS = $(PROTOS:apis/proto/%.proto=apis/swagger/%.swagger.json)
PBDOCS = apis/docs/v1/docs.md

LDFLAGS = -static -fPIC -pthread -std=gnu++20 -lstdc++ -lm -z relro -z now -flto=auto -march=native -mtune=native -fno-plt -Ofast -fvisibility=hidden -ffp-contract=fast -fomit-frame-pointer -fmerge-all-constants -funroll-loops -falign-functions=32 -ffunction-sections -fdata-sections
LDFLAGS = -static -fPIC -pthread -std=gnu++23 -lstdc++ -lm -z relro -z now -flto=auto -march=native -mtune=native -fno-plt -Ofast -fvisibility=hidden -ffp-contract=fast -fomit-frame-pointer -fmerge-all-constants -funroll-loops -falign-functions=32 -ffunction-sections -fdata-sections

NGT_LDFLAGS = -fopenmp -lopenblas -llapack
FAISS_LDFLAGS = $(NGT_LDFLAGS) -lgfortran
Expand All @@ -150,17 +151,14 @@ ifeq ($(GOARCH),amd64)
CFLAGS ?= -mno-avx512f -mno-avx512dq -mno-avx512cd -mno-avx512bw -mno-avx512vl
CXXFLAGS ?= $(CFLAGS)
EXTLDFLAGS ?= -m64
NGT_EXTRA_FLAGS ?=
else ifeq ($(GOARCH),arm64)
CFLAGS ?=
CXXFLAGS ?= $(CFLAGS)
EXTLDFLAGS ?= -march=armv8-a
NGT_EXTRA_FLAGS ?=
else
CFLAGS ?=
CXXFLAGS ?= $(CFLAGS)
EXTLDFLAGS ?=
NGT_EXTRA_FLAGS ?=
endif

BENCH_DATASET_MD5S := $(eval BENCH_DATASET_MD5S := $(shell find $(BENCH_DATASET_MD5_DIR) -type f -regex ".*\.md5"))$(BENCH_DATASET_MD5S)
Expand Down Expand Up @@ -622,9 +620,9 @@ $(USR_LOCAL)/include/NGT/Capi.h:
-DCMAKE_C_FLAGS="$(CFLAGS)" \
-DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \
-DCMAKE_INSTALL_PREFIX=$(USR_LOCAL) \
"$(NGT_EXTRA_FLAGS)" .
make -j$(CORES) -C $(TEMP_DIR)/NGT-$(NGT_VERSION)
make install -C $(TEMP_DIR)/NGT-$(NGT_VERSION)
-B $(TEMP_DIR)/NGT-$(NGT_VERSION)/build $(TEMP_DIR)/NGT-$(NGT_VERSION)
make -C $(TEMP_DIR)/NGT-$(NGT_VERSION)/build -j$(CORES) ngt
make -C $(TEMP_DIR)/NGT-$(NGT_VERSION)/build install
cd $(ROOTDIR)
rm -rf $(TEMP_DIR)/NGT-$(NGT_VERSION)
ldconfig
Expand All @@ -646,12 +644,31 @@ $(LIB_PATH)/libfaiss.a:
-DFAISS_ENABLE_GPU=OFF \
-DBLA_VENDOR=OpenBLAS \
-DCMAKE_EXE_LINKER_FLAGS="$(FAISS_LDFLAGS)" \
-B build . && \
make -C build -j$(CORES) faiss && \
make -C build install
rm -rf v$(FAISS_VERSION).tar.gz
rm -rf $(TEMP_DIR)/faiss-$(FAISS_VERSION)
-B $(TEMP_DIR)/faiss-$(FAISS_VERSION)/build $(TEMP_DIR)/faiss-$(FAISS_VERSION)
make -C $(TEMP_DIR)/faiss-$(FAISS_VERSION)/build -j$(CORES) faiss
make -C $(TEMP_DIR)/faiss-$(FAISS_VERSION)/build install
cd $(ROOTDIR)
rm -rf $(TEMP_DIR)/v$(FAISS_VERSION).tar.gz $(TEMP_DIR)/faiss-$(FAISS_VERSION)
ldconfig

.PHONY: cmake/install
## install CMAKE
cmake/install:
git clone --depth 1 --branch v$(CMAKE_VERSION) https://github.com/Kitware/CMake.git $(TEMP_DIR)/CMAKE-$(CMAKE_VERSION)
cd $(TEMP_DIR)/CMAKE-$(CMAKE_VERSION) && \
cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF \
-DCMAKE_C_FLAGS="$(CFLAGS)" \
-DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \
-DCMAKE_INSTALL_PREFIX=$(USR_LOCAL) \
-B $(TEMP_DIR)/CMAKE-$(CMAKE_VERSION)/build $(TEMP_DIR)/CMAKE-$(CMAKE_VERSION)
make -C $(TEMP_DIR)/CMAKE-$(CMAKE_VERSION)/build -j$(CORES) cmake
make -C $(TEMP_DIR)/CMAKE-$(CMAKE_VERSION)/build install
cd $(ROOTDIR)
rm -rf $(TEMP_DIR)/CMAKE-$(CMAKE_VERSION)
ldconfig
# -DCMAKE_USE_OPENSSL=OFF

.PHONY: lint
## run lints
Expand Down
12 changes: 10 additions & 2 deletions Makefile.d/dependencies.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@
## update vald libraries including tools
update/libs: \
update/chaos-mesh \
update/cmake \
update/docker \
update/faiss \
update/go \
update/golangci-lint \
update/hdf5 \
update/helm \
update/helm-docs \
update/helm-operator \
Expand All @@ -33,12 +36,12 @@ update/libs: \
update/prometheus-stack \
update/protobuf \
update/reviewdog \
update/rust \
update/telepresence \
update/vald \
update/valdcli \
update/yq \
update/zlib \
update/hdf5
update/zlib

.PHONY: go/download
## download Go package dependencies
Expand Down Expand Up @@ -186,6 +189,11 @@ update/ngt:
update/faiss:
curl -fsSL https://api.github.com/repos/facebookresearch/faiss/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' | sed 's/v//g' > $(ROOTDIR)/versions/FAISS_VERSION

.PHONY: update/cmake
## update CMAKE version
update/cmake:
curl -fsSL https://api.github.com/repos/Kitware/CMAKE/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' | sed 's/v//g' > $(ROOTDIR)/versions/CMAKE_VERSION

.PHONY: update/reviewdog
## update reviewdog version
update/reviewdog:
Expand Down
Loading

0 comments on commit 035da01

Please sign in to comment.