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

[WIP] Implement ngt Statistics API #2533

Closed
wants to merge 1 commit into from
Closed
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
  •  
  •  
  •  
111 changes: 111 additions & 0 deletions .gitfiles

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Run formatter and license.go
run: |
make format
git checkout go.mod go.sum ./rust/Cargo.lock
git checkout go.mod go.sum ./example/client/go.mod ./example/client/go.sum ./rust/Cargo.lock ./dockers
- name: Check and Push to main branch
continue-on-error: true
run: |
Expand Down
33 changes: 23 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ 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 -march=native -fno-plt -Ofast -fvisibility=hidden -ffp-contract=fast
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 @@ -599,7 +605,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 +626,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
5 changes: 5 additions & 0 deletions Makefile.d/functions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ define run-e2e-crud-test
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_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="$(CGO_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="$(CGO_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="$(CGO_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="$(CGO_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"
22 changes: 21 additions & 1 deletion Makefile.d/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ test:
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -cover -timeout=$(GOTEST_TIMEOUT) $(ROOTDIR)/cmd/... $(ROOTDIR)/internal/... $(ROOTDIR)/pkg/...

.PHONY: test/tparse
Expand All @@ -56,6 +57,7 @@ test/tparse: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -json -cover -timeout=$(GOTEST_TIMEOUT) $(ROOTDIR)/cmd/... $(ROOTDIR)/internal/... $(ROOTDIR)/pkg/... \
| tee "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" \
| tparse -pass -notests
Expand All @@ -69,6 +71,7 @@ test/cmd/tparse: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -json -cover -timeout=$(GOTEST_TIMEOUT) $(ROOTDIR)/cmd/... \
| tee "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" \
| tparse -pass -notests
Expand All @@ -82,6 +85,7 @@ test/internal/tparse: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -json -cover -timeout=$(GOTEST_TIMEOUT) $(ROOTDIR)/internal/... \
| tee "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" \
| tparse -pass -notests
Expand All @@ -95,6 +99,7 @@ test/pkg/tparse: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -json -cover -timeout=$(GOTEST_TIMEOUT) $(ROOTDIR)/pkg/... \
| tee "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" \
| tparse -pass -notests
Expand All @@ -110,6 +115,7 @@ test/hack/tparse: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=vendor -json -cover \
$(ROOTDIR)/hack/gorules/... \
$(ROOTDIR)/hack/helm/... \
Expand All @@ -128,6 +134,7 @@ test/all/tparse: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -json -cover -timeout=$(GOTEST_TIMEOUT) $(ROOTDIR)/... \
| tee "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" \
| tparse -pass -notests
Expand All @@ -141,6 +148,7 @@ test/gotestfmt: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -json -cover -timeout=$(GOTEST_TIMEOUT) $(ROOTDIR)/cmd/... $(ROOTDIR)/internal/... $(ROOTDIR)/pkg/... \
| tee "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" \
| gotestfmt -showteststatus
Expand All @@ -154,6 +162,7 @@ test/cmd/gotestfmt: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -json -cover -timeout=$(GOTEST_TIMEOUT) $(ROOTDIR)/cmd/... \
| tee "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" \
| gotestfmt -showteststatus
Expand All @@ -167,6 +176,7 @@ test/internal/gotestfmt: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -json -cover -timeout=$(GOTEST_TIMEOUT) $(ROOTDIR)/internal/... \
| tee "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" \
| gotestfmt -showteststatus
Expand All @@ -180,6 +190,7 @@ test/pkg/gotestfmt: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -json -cover -timeout=$(GOTEST_TIMEOUT) $(ROOTDIR)/pkg/... \
| tee "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" \
| gotestfmt -showteststatus
Expand All @@ -195,6 +206,7 @@ test/hack/gotestfmt: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=vendor -json -cover \
$(ROOTDIR)/hack/gorules/... \
$(ROOTDIR)/hack/helm/... \
Expand All @@ -213,6 +225,7 @@ test/all/gotestfmt: \
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -json -cover -timeout=$(GOTEST_TIMEOUT) $(ROOTDIR)/... \
| tee "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" \
| gotestfmt -showteststatus
Expand Down Expand Up @@ -250,6 +263,7 @@ test/pkg:
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -cover $(ROOTDIR)/pkg/...

.PHONY: test/internal
Expand All @@ -258,6 +272,7 @@ test/internal:
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -cover $(ROOTDIR)/internal/...

.PHONY: test/cmd
Expand All @@ -266,6 +281,7 @@ test/cmd:
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -cover $(ROOTDIR)/cmd/...

.PHONY: test/hack
Expand All @@ -276,6 +292,7 @@ test/hack:
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=vendor -cover \
$(ROOTDIR)/hack/gorules... \
$(ROOTDIR)/hack/helm/... \
Expand All @@ -289,6 +306,7 @@ test/all:
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -cover $(ROOTDIR)/...

.PHONY: coverage
Expand All @@ -297,6 +315,7 @@ coverage:
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
GOOS=$(GOOS) \
CGO_LDFLAGS="$(CGO_LDFLAGS)" \
go test -short -shuffle=on -race -mod=readonly -v -race -covermode=atomic -timeout=$(GOTEST_TIMEOUT) -coverprofile=coverage.out $(ROOTDIR)/...
GOPRIVATE=$(GOPRIVATE) \
GOARCH=$(GOARCH) \
Expand Down Expand Up @@ -349,7 +368,8 @@ test/patch-placeholder:

.PHONY: test/comment-unimplemented
## comment out unimplemented tests
test/comment-unimplemented:
test/comment-unimplemented: \
format/go/test
@$(call green, "comment out unimplemented test...")
@for f in $(GO_ALL_TEST_SOURCES) ; do \
if [ ! -f "$$f" ] ; then continue; fi; \
Expand Down
Loading
Loading