Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement ngt Statistics API #2539

Merged
merged 2 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
112 changes: 112 additions & 0 deletions .gitfiles

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ assignees: ""

<!--- Please change the versions below along with your environment -->

- Go Version: 1.22.5
- Rust Version: 1.77.2
- Docker Version: 20.10.8
- Vald Version: v1.7.12
- Go Version: v1.22.5
- Rust Version: v1.77.2
- Docker Version: v27.1.1
- Kubernetes Version: v1.30.3
- NGT Version: 2.2.3
- Helm Version: v3.15.3
- NGT Version: v2.2.4
- Faiss Version: v1.8.0
11 changes: 7 additions & 4 deletions .github/ISSUE_TEMPLATE/security_issue_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ assignees: ""

<!--- Please change the versions below along with your environment -->

- Go Version: 1.22.5
- Rust Version: 1.77.2
- Docker Version: 20.10.8
- Vald Version: v1.7.12
- Go Version: v1.22.5
- Rust Version: v1.77.2
- Docker Version: v27.1.1
- Kubernetes Version: v1.30.3
- NGT Version: 2.2.3
- Helm Version: v3.15.3
- NGT Version: v2.2.4
- Faiss Version: v1.8.0
12 changes: 7 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
### Versions

<!--- Please change the versions below along with your environment -->

- Go Version: 1.22.5
- Rust Version: 1.77.2
- Docker Version: 20.10.8
- Vald Version: v1.7.12
- Go Version: v1.22.5
- Rust Version: v1.77.2
- Docker Version: v27.1.1
- Kubernetes Version: v1.30.3
- NGT Version: 2.2.3
- Helm Version: v3.15.3
- NGT Version: v2.2.4
- Faiss Version: v1.8.0

### Checklist

Expand Down
49 changes: 36 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ 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)
NGT_VERSION := $(eval NGT_VERSION := $(shell cat versions/NGT_VERSION))$(NGT_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)
HELM_DOCS_VERSION := $(eval HELM_DOCS_VERSION := $(shell cat versions/HELM_DOCS_VERSION))$(HELM_DOCS_VERSION)
HELM_VERSION := $(eval HELM_VERSION := $(shell cat versions/HELM_VERSION))$(HELM_VERSION)
JAEGER_OPERATOR_VERSION := $(eval JAEGER_OPERATOR_VERSION := $(shell cat versions/JAEGER_OPERATOR_VERSION))$(JAEGER_OPERATOR_VERSION)
Expand All @@ -95,9 +96,7 @@ REVIEWDOG_VERSION := $(eval REVIEWDOG_VERSION := $(shell cat versions/RE
TELEPRESENCE_VERSION := $(eval TELEPRESENCE_VERSION := $(shell cat versions/TELEPRESENCE_VERSION))$(TELEPRESENCE_VERSION)
VALDCLI_VERSION := $(eval VALDCLI_VERSION := $(shell cat versions/VALDCLI_VERSION))$(VALDCLI_VERSION)
YQ_VERSION := $(eval YQ_VERSION := $(shell cat versions/YQ_VERSION))$(YQ_VERSION)
BUF_VERSION := $(eval BUF_VERSION := $(shell cat versions/BUF_VERSION))$(BUF_VERSION)
ZLIB_VERSION := $(eval ZLIB_VERSION := $(shell cat versions/ZLIB_VERSION))$(ZLIB_VERSION)
HDF5_VERSION := $(eval HDF5_VERSION := $(shell cat versions/HDF5_VERSION))$(HDF5_VERSION)

OTEL_OPERATOR_RELEASE_NAME ?= opentelemetry-operator
PROMETHEUS_RELEASE_NAME ?= prometheus
Expand Down Expand Up @@ -140,6 +139,13 @@ 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

NGT_LDFLAGS = -fopenmp -lopenblas -llapack
FAISS_LDFLAGS = $(NGT_LDFLAGS) -lgfortran
HDF5_LDFLAGS = -lhdf5 -lhdf5_hl -lsz -laec -lz -ldl
CGO_LDFLAGS = $(FAISS_LDFLAGS) $(HDF5_LDFLAGS)

ifeq ($(GOARCH),amd64)
CFLAGS ?= -mno-avx512f -mno-avx512dq -mno-avx512cd -mno-avx512bw -mno-avx512vl
CXXFLAGS ?= $(CFLAGS)
Expand Down Expand Up @@ -472,11 +478,11 @@ format/go: \
gofumpt/install \
strictgoimports/install \
goimports/install
find $(ROOTDIR)/ -type d -name .git -prune -o -type f -regex '.*[^\.pb]\.go' -print | xargs -P$(CORES) $(GOBIN)/golines -w -m $(GOLINES_MAX_WIDTH)
find $(ROOTDIR)/ -type d -name .git -prune -o -type f -regex '.*[^\.pb]\.go' -print | xargs -P$(CORES) $(GOBIN)/strictgoimports -w
find $(ROOTDIR)/ -type d -name .git -prune -o -type f -regex '.*\.go' -print | xargs -P$(CORES) $(GOBIN)/golines -w -m $(GOLINES_MAX_WIDTH)
find $(ROOTDIR)/ -type d -name .git -prune -o -type f -regex '.*\.go' -print | xargs -P$(CORES) $(GOBIN)/strictgoimports -w
find $(ROOTDIR)/ -type d -name .git -prune -o -type f -regex '.*\.go' -print | xargs -P$(CORES) $(GOBIN)/goimports -w
find $(ROOTDIR)/ -type d -name .git -prune -o -type f -regex '.*\.go' -print | xargs -P$(CORES) $(GOBIN)/crlfmt -w
find $(ROOTDIR)/ -type d -name .git -prune -o -type f -regex '.*[^\.pb]\.go' -print | xargs -P$(CORES) $(GOBIN)/gofumpt -w
find $(ROOTDIR)/ -type d -name .git -prune -o -type f -regex '.*\.go' -print | xargs -P$(CORES) $(GOBIN)/crlfmt -w -diff=false
find $(ROOTDIR)/ -type d -name .git -prune -o -type f -regex '.*\.go' -print | xargs -P$(CORES) $(GOBIN)/gofumpt -w

.PHONY: format/go/test
## run golines, gofumpt, goimports for go test files
Expand All @@ -489,7 +495,7 @@ format/go/test: \
find $(ROOTDIR) -name '*_test.go' | xargs -P$(CORES) $(GOBIN)/golines -w -m $(GOLINES_MAX_WIDTH)
find $(ROOTDIR) -name '*_test.go' | xargs -P$(CORES) $(GOBIN)/strictgoimports -w
find $(ROOTDIR) -name '*_test.go' | xargs -P$(CORES) $(GOBIN)/goimports -w
find $(ROOTDIR) -name '*_test.go' | xargs -P$(CORES) $(GOBIN)/crlfmt -w
find $(ROOTDIR) -name '*_test.go' | xargs -P$(CORES) $(GOBIN)/crlfmt -w -diff=false
find $(ROOTDIR) -name '*_test.go' | xargs -P$(CORES) $(GOBIN)/gofumpt -w

.PHONY: format/yaml
Expand Down Expand Up @@ -568,6 +574,16 @@ version/rust:
version/ngt:
@echo $(NGT_VERSION)

.PHONY: version/faiss
## print Faiss version
version/faiss:
@echo $(FAISS_VERSION)

.PHONY: version/docker
## print Kubernetes version
version/docker:
@echo $(DOCKER_VERSION)

.PHONY: version/k8s
## print Kubernetes version
version/k8s:
Expand Down Expand Up @@ -599,7 +615,14 @@ ngt/install: $(USR_LOCAL)/include/NGT/Capi.h
$(USR_LOCAL)/include/NGT/Capi.h:
git clone --depth 1 --branch v$(NGT_VERSION) https://github.com/yahoojapan/NGT $(TEMP_DIR)/NGT-$(NGT_VERSION)
cd $(TEMP_DIR)/NGT-$(NGT_VERSION) && \
cmake -DCMAKE_C_FLAGS="$(CFLAGS)" -DCMAKE_CXX_FLAGS="$(CXXFLAGS)" "$(NGT_EXTRA_FLAGS)" .
cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_STATIC_EXECS=ON \
-DBUILD_TESTING=OFF \
-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)
cd $(ROOTDIR)
Expand All @@ -613,18 +636,18 @@ $(LIB_PATH)/libfaiss.a:
curl -fsSL https://github.com/facebookresearch/faiss/archive/v$(FAISS_VERSION).tar.gz -o $(TEMP_DIR)/v$(FAISS_VERSION).tar.gz
tar zxf $(TEMP_DIR)/v$(FAISS_VERSION).tar.gz -C $(TEMP_DIR)/
cd $(TEMP_DIR)/faiss-$(FAISS_VERSION) && \
cmake -DCMAKE_BUILD_TYPE=Release \
cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_STATIC_EXECS=ON \
-DBUILD_TESTING=OFF \
-DCMAKE_C_FLAGS="-fPIC" \
-DCMAKE_C_FLAGS="$(LDFLAGS)" \
-DCMAKE_INSTALL_PREFIX=$(USR_LOCAL) \
-DFAISS_ENABLE_PYTHON=OFF \
-DFAISS_ENABLE_GPU=OFF \
-DBLA_VENDOR=OpenBLAS \
-DCMAKE_EXE_LINKER_FLAGS="-lopenblas -llapack -lgfortran -lm" \
-DCMAKE_EXE_LINKER_FLAGS="$(FAISS_LDFLAGS)" \
-B build . && \
make -C build -j faiss && \
make -C build -j$(CORES) faiss && \
make -C build install
rm -rf v$(FAISS_VERSION).tar.gz
rm -rf $(TEMP_DIR)/faiss-$(FAISS_VERSION)
Expand Down
6 changes: 6 additions & 0 deletions Makefile.d/bench.mk
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ pprof/core/ngt/sequential.bin: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test \
-mod=readonly \
-count=1 \
Expand All @@ -154,6 +155,7 @@ pprof/core/ngt/parallel.bin: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test \
-mod=readonly \
-count=1 \
Expand Down Expand Up @@ -185,6 +187,7 @@ pprof/agent/stream.bin: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test \
-mod=readonly \
-count=1 \
Expand All @@ -210,6 +213,7 @@ pprof/agent/sequential/grpc.bin: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test \
-mod=readonly \
-count=1 \
Expand Down Expand Up @@ -240,6 +244,7 @@ pprof/gateway/sequential.bin: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test \
-mod=readonly \
-count=1 \
Expand Down Expand Up @@ -288,6 +293,7 @@ $(ROOTDIR)/metrics.gob:
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -mod=readonly -v --timeout=1h $(ROOTDIR)/hack/benchmark/e2e/agent/core/ngt/... -output=$(ROOTDIR)/metrics.gob

.PHONY: metrics/chart
Expand Down
8 changes: 4 additions & 4 deletions Makefile.d/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ binary/build: \
cmd/agent/core/ngt/ngt: \
ngt/install
$(eval CGO_ENABLED = 1)
$(call go-build,agent/core/ngt,-linkmode 'external',-static -fPIC -pthread -fopenmp -std=gnu++20 -lstdc++ -lm -z relro -z now -flto -march=native -fno-plt -Ofast -fvisibility=hidden -ffp-contract=fast $(EXTLDFLAGS), cgo,NGT-$(NGT_VERSION),$@)
$(call go-build,agent/core/ngt,-linkmode 'external',$(LDFLAGS) $(NGT_LDFLAGS) $(EXTLDFLAGS), cgo,NGT-$(NGT_VERSION),$@)

cmd/agent/core/faiss/faiss: \
faiss/install
$(eval CGO_ENABLED = 1)
$(call go-build,agent/core/faiss,-linkmode 'external',-static -fPIC -pthread -fopenmp -std=gnu++20 -lstdc++ -lopenblas -llapack -lgfortran -lm -z relro -z now -flto -march=native -fno-plt -Ofast -fvisibility=hidden -ffp-contract=fast, cgo,FAISS-$(FAISS_VERSION),$@)
$(call go-build,agent/core/faiss,-linkmode 'external',$(LDFLAGS) $(FAISS_LDFLAGS), cgo,FAISS-$(FAISS_VERSION),$@)

cmd/agent/sidecar/sidecar:
$(eval CGO_ENABLED = 0)
Expand Down Expand Up @@ -93,15 +93,15 @@ cmd/index/operator/index-operator:

cmd/tools/benchmark/job/job:
$(eval CGO_ENABLED = 1)
$(call go-build,tools/benchmark/job,-linkmode 'external',-static -fPIC -pthread -fopenmp -std=gnu++20 -lhdf5 -lhdf5_hl -lsz -laec -lz -lm -ldl, cgo,$(HDF5_VERSION),$@)
$(call go-build,tools/benchmark/job,-linkmode 'external',$(LDFLAGS) $(HDF5_LDFLAGS), cgo,$(HDF5_VERSION),$@)

cmd/tools/benchmark/operator/operator:
$(eval CGO_ENABLED = 0)
$(call go-build,tools/benchmark/operator,,-static,,,$@)

cmd/tools/cli/loadtest/loadtest:
$(eval CGO_ENABLED = 1)
$(call go-build,tools/cli/loadtest,-linkmode 'external',-static -fPIC -pthread -fopenmp -std=gnu++20 -lhdf5 -lhdf5_hl -lsz -laec -lz -lm -ldl, cgo,$(HDF5_VERSION),$@)
$(call go-build,tools/cli/loadtest,-linkmode 'external',$(LDFLAGS) $(HDF5_LDFLAGS), cgo,$(HDF5_VERSION),$@)

rust/target/release/agent:
pushd rust && cargo build -p agent --release && popd
Expand Down
49 changes: 38 additions & 11 deletions Makefile.d/dependencies.mk
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ update/golangci-lint:
update/rust:
curl -fsSL https://releases.rs | grep -Po 'Stable: \K[\d.]+\s' | head -n 1 > $(ROOTDIR)/versions/RUST_VERSION

.PHONY: update/docker
## update docker version
update/docker:
curl -fsSL https://api.github.com/repos/moby/moby/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' > $(ROOTDIR)/versions/DOCKER_VERSION

.PHONY: update/helm
## update helm version
update/helm:
Expand Down Expand Up @@ -219,22 +224,44 @@ update/valdcli:
.PHONY: update/template
## update PULL_REQUEST_TEMPLATE and ISSUE_TEMPLATE
update/template:
$(eval VALD_VERSION := $(shell $(MAKE) -s version/vald))
$(eval GO_VERSION := $(shell $(MAKE) -s version/go))
$(eval NGT_VERSION := $(shell $(MAKE) -s version/ngt))
$(eval KUBECTL_VERSION := $(shell $(MAKE) -s version/k8s))
$(eval RUST_VERSION := $(shell $(MAKE) -s version/rust))
sed -i -e "s/^- Go Version: .*$$/- Go Version: $(GO_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/bug_report.md
sed -i -e "s/^- Go Version: .*$$/- Go Version: $(GO_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/security_issue_report.md
sed -i -e "s/^- Go Version: .*$$/- Go Version: $(GO_VERSION)/" $(ROOTDIR)/.github/PULL_REQUEST_TEMPLATE.md
$(eval DOCKER_VERSION := $(shell $(MAKE) -s version/docker))
$(eval KUBECTL_VERSION := $(shell $(MAKE) -s version/k8s))
$(eval HELM_VERSION := $(shell $(MAKE) -s version/helm))
$(eval NGT_VERSION := $(shell $(MAKE) -s version/ngt))
$(eval FAISS_VERSION := $(shell $(MAKE) -s version/faiss))

sed -i -e "s/^- Vald Version: .*$$/- Vald Version: $(VALD_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/bug_report.md
sed -i -e "s/^- Vald Version: .*$$/- Vald Version: $(VALD_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/security_issue_report.md
sed -i -e "s/^- Vald Version: .*$$/- Vald Version: $(VALD_VERSION)/" $(ROOTDIR)/.github/PULL_REQUEST_TEMPLATE.md

sed -i -e "s/^- NGT Version: .*$$/- NGT Version: $(NGT_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/bug_report.md
sed -i -e "s/^- NGT Version: .*$$/- NGT Version: $(NGT_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/security_issue_report.md
sed -i -e "s/^- NGT Version: .*$$/- NGT Version: $(NGT_VERSION)/" $(ROOTDIR)/.github/PULL_REQUEST_TEMPLATE.md
sed -i -e "s/^- Go Version: .*$$/- Go Version: v$(GO_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/bug_report.md
sed -i -e "s/^- Go Version: .*$$/- Go Version: v$(GO_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/security_issue_report.md
sed -i -e "s/^- Go Version: .*$$/- Go Version: v$(GO_VERSION)/" $(ROOTDIR)/.github/PULL_REQUEST_TEMPLATE.md

sed -i -e "s/^- Rust Version: .*$$/- Rust Version: v$(RUST_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/bug_report.md
sed -i -e "s/^- Rust Version: .*$$/- Rust Version: v$(RUST_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/security_issue_report.md
sed -i -e "s/^- Rust Version: .*$$/- Rust Version: v$(RUST_VERSION)/" $(ROOTDIR)/.github/PULL_REQUEST_TEMPLATE.md

sed -i -e "s/^- Docker Version: .*$$/- Docker Version: $(DOCKER_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/bug_report.md
sed -i -e "s/^- Docker Version: .*$$/- Docker Version: $(DOCKER_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/security_issue_report.md
sed -i -e "s/^- Docker Version: .*$$/- Docker Version: $(DOCKER_VERSION)/" $(ROOTDIR)/.github/PULL_REQUEST_TEMPLATE.md

sed -i -e "s/^- Kubernetes Version: .*$$/- Kubernetes Version: $(KUBECTL_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/bug_report.md
sed -i -e "s/^- Kubernetes Version: .*$$/- Kubernetes Version: $(KUBECTL_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/security_issue_report.md
sed -i -e "s/^- Kubernetes Version: .*$$/- Kubernetes Version: $(KUBECTL_VERSION)/" $(ROOTDIR)/.github/PULL_REQUEST_TEMPLATE.md

sed -i -e "s/^- Rust Version: .*$$/- Rust Version: $(RUST_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/bug_report.md
sed -i -e "s/^- Rust Version: .*$$/- Rust Version: $(RUST_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/security_issue_report.md
sed -i -e "s/^- Rust Version: .*$$/- Rust Version: $(RUST_VERSION)/" $(ROOTDIR)/.github/PULL_REQUEST_TEMPLATE.md
sed -i -e "s/^- Helm Version: .*$$/- Helm Version: $(HELM_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/bug_report.md
sed -i -e "s/^- Helm Version: .*$$/- Helm Version: $(HELM_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/security_issue_report.md
sed -i -e "s/^- Helm Version: .*$$/- Helm Version: $(HELM_VERSION)/" $(ROOTDIR)/.github/PULL_REQUEST_TEMPLATE.md

sed -i -e "s/^- NGT Version: .*$$/- NGT Version: v$(NGT_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/bug_report.md
sed -i -e "s/^- NGT Version: .*$$/- NGT Version: v$(NGT_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/security_issue_report.md
sed -i -e "s/^- NGT Version: .*$$/- NGT Version: v$(NGT_VERSION)/" $(ROOTDIR)/.github/PULL_REQUEST_TEMPLATE.md

sed -i -e "s/^- Faiss Version: .*$$/- Faiss Version: v$(FAISS_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/bug_report.md
sed -i -e "s/^- Faiss Version: .*$$/- Faiss Version: v$(FAISS_VERSION)/" $(ROOTDIR)/.github/ISSUE_TEMPLATE/security_issue_report.md
sed -i -e "s/^- Faiss Version: .*$$/- Faiss Version: v$(FAISS_VERSION)/" $(ROOTDIR)/.github/PULL_REQUEST_TEMPLATE.md

11 changes: 8 additions & 3 deletions Makefile.d/functions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ define go-build
CFLAGS="$(CFLAGS)" \
CXXFLAGS="$(CXXFLAGS)" \
CGO_ENABLED=$(CGO_ENABLED) \
CGO_CXXFLAGS="-g -Ofast -march=native" \
CGO_FFLAGS="-g -Ofast -march=native" \
CGO_LDFLAGS="-g -Ofast -march=native" \
CGO_CXXFLAGS="$3" \
CGO_FFLAGS="$3" \
CGO_LDFLAGS="$3" \
GO111MODULE=on \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
Expand Down Expand Up @@ -106,6 +106,7 @@ define run-e2e-crud-test
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(HDF5_LDFLAGS)" \
go test \
-race \
-mod=readonly \
Expand Down Expand Up @@ -135,6 +136,7 @@ define run-e2e-crud-faiss-test
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(HDF5_LDFLAGS)" \
go test \
-race \
-mod=readonly \
Expand All @@ -160,6 +162,7 @@ define run-e2e-multi-crud-test
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(HDF5_LDFLAGS)" \
go test \
-race \
-mod=readonly \
Expand Down Expand Up @@ -189,6 +192,7 @@ define run-e2e-max-dim-test
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(HDF5_LDFLAGS)" \
go test \
-race \
-mod=readonly \
Expand All @@ -210,6 +214,7 @@ define run-e2e-sidecar-test
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(HDF5_LDFLAGS)" \
go test \
-race \
-mod=readonly \
Expand Down
7 changes: 6 additions & 1 deletion Makefile.d/proto.mk
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,14 @@ proto/gen: \
$(PROTOS) \
proto/deps
@$(call green, "generating pb.go and swagger.json files and documents for API v1...")
buf format -w
buf generate
make proto/replace

proto/replace:
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs -P$(CORES) sed -i -E "s%google.golang.org/grpc/codes%github.com/vdaas/vald/internal/net/grpc/codes%g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs -P$(CORES) sed -i -E "s%google.golang.org/grpc/status%github.com/vdaas/vald/internal/net/grpc/status%g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs -P$(CORES) sed -i -E "s%\"io\"%\"github.com/vdaas/vald/internal/io\"%g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs -P$(CORES) sed -i -E "s%\"sync\"%\"github.com/vdaas/vald/internal/sync\"%g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs -P$(CORES) sed -i -E "s%any%any%g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs -P$(CORES) sed -i -E "s%interface\{\}%any%g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs -P$(CORES) sed -i -E "s%For_%For%g"
Loading
Loading