Skip to content

Commit

Permalink
Merge branch 'main' into refactor/pkg/fix-agent-handler
Browse files Browse the repository at this point in the history
  • Loading branch information
kmrmt authored Oct 8, 2024
2 parents b55e795 + 210c3ef commit 9a2f6c9
Show file tree
Hide file tree
Showing 99 changed files with 6,150 additions and 1,519 deletions.
9 changes: 8 additions & 1 deletion .gitfiles
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ go.mod
go.sum
hack/CHANGELOG.template.md
hack/actions/gen/main.go
hack/actions/gen/main_test.go
hack/benchmark/assets/checksum/fashion-mnist-784-euclidean.md5
hack/benchmark/assets/checksum/gist-960-euclidean.md5
hack/benchmark/assets/checksum/glove-100-angular.md5
Expand Down Expand Up @@ -717,6 +718,8 @@ hack/helm/schema/gen/main.go
hack/helm/schema/gen/main_test.go
hack/license/gen/main.go
hack/license/gen/main_test.go
hack/tools/deadlink/index.html
hack/tools/deadlink/main.go
hack/tools/kvsdb/main.go
hack/tools/metrics/main.go
hack/tools/metrics/main_test.go
Expand Down Expand Up @@ -887,6 +890,7 @@ internal/core/algorithm/ngt/ngt_test.go
internal/core/algorithm/ngt/option.go
internal/core/algorithm/ngt/option_test.go
internal/core/algorithm/usearch/option.go
internal/core/algorithm/usearch/option_test.go
internal/core/algorithm/usearch/usearch.go
internal/core/algorithm/usearch/usearch_test.go
internal/db/kvs/bbolt/bbolt.go
Expand Down Expand Up @@ -1032,6 +1036,7 @@ internal/errors/tls.go
internal/errors/unit.go
internal/errors/unit_test.go
internal/errors/usearch.go
internal/errors/usearch_test.go
internal/errors/vald.go
internal/errors/vald_test.go
internal/errors/vqueue.go
Expand Down Expand Up @@ -1161,6 +1166,7 @@ internal/net/grpc/client_test.go
internal/net/grpc/codec.go
internal/net/grpc/codec_test.go
internal/net/grpc/codes/codes.go
internal/net/grpc/codes/codes_test.go
internal/net/grpc/context.go
internal/net/grpc/context_test.go
internal/net/grpc/credentials/credentials.go
Expand Down Expand Up @@ -1288,6 +1294,8 @@ internal/observability/trace/status_test.go
internal/observability/trace/trace.go
internal/observability/trace/trace_option.go
internal/observability/trace/trace_test.go
internal/os/hostname.go
internal/os/hostname_test.go
internal/params/option.go
internal/params/option_test.go
internal/params/params.go
Expand Down Expand Up @@ -1702,7 +1710,6 @@ pkg/gateway/filter/router/router.go
pkg/gateway/filter/router/router_test.go
pkg/gateway/filter/usecase/vald.go
pkg/gateway/filter/usecase/vald_test.go
pkg/gateway/internal/location/location_test.go
pkg/gateway/lb/README.md
pkg/gateway/lb/config/config.go
pkg/gateway/lb/config/config_test.go
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ assignees: ""
<!--- Please change the versions below along with your environment -->

- Vald Version: v1.7.13
- Go Version: v1.23.1
- Go Version: v1.23.2
- Rust Version: v1.81.0
- Docker Version: v27.3.1
- Kubernetes Version: v1.31.1
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/security_issue_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ assignees: ""
<!--- Please change the versions below along with your environment -->

- Vald Version: v1.7.13
- Go Version: v1.23.1
- Go Version: v1.23.2
- Rust Version: v1.81.0
- Docker Version: v27.3.1
- Kubernetes Version: v1.31.1
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!--- Please change the versions below along with your environment -->
- Vald Version: v1.7.13
- Go Version: v1.23.1
- Go Version: v1.23.2
- Rust Version: v1.81.0
- Docker Version: v27.3.1
- Kubernetes Version: v1.31.1
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,18 @@ GIT_COMMIT := $(eval GIT_COMMIT := $(shell git rev-list -1 HEAD))$(GIT_COMMIT)
MAKELISTS := Makefile $(shell find Makefile.d -type f -regex ".*\.mk")

ROOTDIR = $(eval ROOTDIR := $(or $(shell git rev-parse --show-toplevel), $(PWD)))$(ROOTDIR)
PROTODIRS := $(eval PROTODIRS := $(shell find apis/proto -type d | sed -e "s%apis/proto/%%g" | grep -v "apis/proto"))$(PROTODIRS)
PROTODIRS := $(eval PROTODIRS := $(shell find $(ROOTDIR)/apis/proto -type d | sed -e "s%apis/proto/%%g" | grep -v "apis/proto"))$(PROTODIRS)
BENCH_DATASET_BASE_DIR = hack/benchmark/assets
BENCH_DATASET_MD5_DIR_NAME = checksum
BENCH_DATASET_HDF5_DIR_NAME = dataset
BENCH_DATASET_MD5_DIR = $(BENCH_DATASET_BASE_DIR)/$(BENCH_DATASET_MD5_DIR_NAME)
BENCH_DATASET_HDF5_DIR = $(BENCH_DATASET_BASE_DIR)/$(BENCH_DATASET_HDF5_DIR_NAME)

PROTOS := $(eval PROTOS := $(shell find apis/proto -type f -regex ".*\.proto"))$(PROTOS)
PROTOS := $(eval PROTOS := $(shell find $(ROOTDIR)/apis/proto -type f -regex ".*\.proto"))$(PROTOS)
PROTOS_V1 := $(eval PROTOS_V1 := $(filter apis/proto/v1/%.proto,$(PROTOS)))$(PROTOS_V1)
PBGOS = $(PROTOS:apis/proto/%.proto=apis/grpc/%.pb.go)
SWAGGERS = $(PROTOS:apis/proto/%.proto=apis/swagger/%.swagger.json)
PBDOCS = apis/docs/v1/docs.md
PBDOCS = $(ROOTDIR)/apis/docs/v1/docs.md

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

Expand Down Expand Up @@ -795,13 +795,13 @@ changelog/update:
echo "" >> $(TEMP_DIR)/CHANGELOG.md
$(MAKE) -s changelog/next/print >> $(TEMP_DIR)/CHANGELOG.md
echo "" >> $(TEMP_DIR)/CHANGELOG.md
tail -n +2 CHANGELOG.md >> $(TEMP_DIR)/CHANGELOG.md
mv -f $(TEMP_DIR)/CHANGELOG.md CHANGELOG.md
tail -n +2 $(ROOTDIR)/CHANGELOG.md >> $(TEMP_DIR)/CHANGELOG.md
mv -f $(TEMP_DIR)/CHANGELOG.md $(ROOTDIR)/CHANGELOG.md

.PHONY: changelog/next/print
## print next changelog entry
changelog/next/print:
@cat hack/CHANGELOG.template.md | \
@cat $(ROOTDIR)/hack/CHANGELOG.template.md | \
sed -e 's/{{ version }}/$(VERSION)/g'
@echo "$$BODY"

Expand Down
4 changes: 2 additions & 2 deletions Makefile.d/docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ ifeq ($(REMOTE),true)
-t $(GHCRORG)/$(IMAGE):$(TAG) \
$(EXTRA_ARGS) \
--output type=registry,oci-mediatypes=true,compression=zstd,compression-level=5,force-compression=true,push=true \
-f $(DOCKERFILE) .
-f $(DOCKERFILE) $(ROOTDIR)
else
@echo "starting local build for $(IMAGE):$(TAG)"
DOCKER_BUILDKIT=1 $(DOCKER) build \
Expand All @@ -113,7 +113,7 @@ else
$(EXTRA_ARGS) \
-t $(CRORG)/$(IMAGE):$(TAG) \
-t $(GHCRORG)/$(IMAGE):$(TAG) \
-f $(DOCKERFILE) .
-f $(DOCKERFILE) $(ROOTDIR)
endif

.PHONY: docker/name/agent-ngt
Expand Down
3 changes: 1 addition & 2 deletions Makefile.d/functions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ define go-build
-X '$(GOPKG)/internal/info.AlgorithmInfo=$5' \
-X '$(GOPKG)/internal/info.BuildCPUInfoFlags=$(CPU_INFO_FLAGS)' \
-X '$(GOPKG)/internal/info.BuildTime=$(DATETIME)' \
-X '$(GOPKG)/internal/info.CGOEnabled=$(CGO_ENABLED)' \
-X '$(GOPKG)/internal/info.CGOEnabled=$(if $(filter 1,$(strip $(CGO_ENABLED))),true,false)' \
-X '$(GOPKG)/internal/info.GitCommit=$(GIT_COMMIT)' \
-X '$(GOPKG)/internal/info.GoArch=$(GOARCH)' \
-X '$(GOPKG)/internal/info.GoOS=$(GOOS)' \
Expand Down Expand Up @@ -434,4 +434,3 @@ define gen-deadlink-checker
$$BIN_PATH -path $3 -ignore-path $4 -format $5 $1; \
rm -rf $$BIN_PATH
endef

2 changes: 1 addition & 1 deletion Makefile.d/git.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
.PHONY: git/config/init
## add git configs required for development
git/config/init:
git config commit.template ".commit_template"
git config commit.template "$(ROOTDIR)/.commit_template"
git config core.fileMode false

.PHONY: git/hooks/init
Expand Down
78 changes: 39 additions & 39 deletions Makefile.d/helm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,69 +37,69 @@ $(BINDIR)/helm-docs:
.PHONY: helm/package/vald
## packaging Helm chart for Vald
helm/package/vald:
helm package charts/vald
helm package $(ROOTDIR)/charts/vald

.PHONY: helm/package/vald-helm-operator
## packaging Helm chart for vald-helm-operator
helm/package/vald-helm-operator: \
helm/schema/crd/vald \
helm/schema/crd/vald-helm-operator
helm package charts/vald-helm-operator
helm package $(ROOTDIR)/charts/vald-helm-operator

.PHONY: helm/package/vald-benchmark-operator
## packaging Helm chart for vald-helm-operator
helm/package/vald-benchmark-operator: \
helm/schema/crd/vald-benchmark-job \
helm/schema/crd/vald-benchmark-scenario \
helm/schema/crd/vald-benchmark-operator
helm package charts/vald-benchmark-operator
helm package $(ROOTDIR)/charts/vald-benchmark-operator

.PHONY: helm/package/vald-readreplica
helm/package/vald-readreplica:
helm package charts/vald-readreplica
helm package $(ROOTDIR)/charts/vald-readreplica

.PHONY: helm/repo/add
## add Helm chart repository
helm/repo/add:
helm repo add vald https://vald.vdaas.org/charts

.PHONY: helm/docs/vald
helm/docs/vald: charts/vald/README.md
helm/docs/vald: $(ROOTDIR)/charts/vald/README.md

# force to rebuild
.PHONY: charts/vald/README.md
charts/vald/README.md: \
charts/vald/README.md.gotmpl \
charts/vald/values.yaml
.PHONY: $(ROOTDIR)/charts/vald/README.md
$(ROOTDIR)/charts/vald/README.md: \
$(ROOTDIR)/charts/vald/README.md.gotmpl \
$(ROOTDIR)/charts/vald/values.yaml
helm-docs

.PHONY: helm/docs/vald-helm-operator
helm/docs/vald-helm-operator: charts/vald-helm-operator/README.md
helm/docs/vald-helm-operator: $(ROOTDIR)/charts/vald-helm-operator/README.md

# force to rebuild
.PHONY: charts/vald-helm-operator/README.md
charts/vald-helm-operator/README.md: \
charts/vald-helm-operator/README.md.gotmpl \
charts/vald-helm-operator/values.yaml
.PHONY: $(ROOTDIR)/charts/vald-helm-operator/README.md
$(ROOTDIR)/charts/vald-helm-operator/README.md: \
$(ROOTDIR)/charts/vald-helm-operator/README.md.gotmpl \
$(ROOTDIR)/charts/vald-helm-operator/values.yaml
helm-docs

.PHONY: helm/docs/vald-readreplica
helm/docs/vald-readreplica: charts/vald-readreplica/README.md
helm/docs/vald-readreplica: $(ROOTDIR)/charts/vald-readreplica/README.md

.PHONY: helm/docs/vald-benchmark-operator
helm/docs/vald-benchmark-operator: charts/vald-benchmark-operator/README.md
helm/docs/vald-benchmark-operator: $(ROOTDIR)/charts/vald-benchmark-operator/README.md

.PHONY: charts/vald-benchmark-operator/README.md
charts/vald-benchmark-operator/README.md: \
charts/vald-benchmark-operator/README.md.gotmpl \
charts/vald-benchmark-operator/values.yaml
.PHONY: $(ROOTDIR)/charts/vald-benchmark-operator/README.md
$(ROOTDIR)/charts/vald-benchmark-operator/README.md: \
$(ROOTDIR)/charts/vald-benchmark-operator/README.md.gotmpl \
$(ROOTDIR)/charts/vald-benchmark-operator/values.yaml
helm-docs

# force to rebuild
.PHONY: charts/vald-readreplica/README.md
charts/vald-readreplica/README.md: \
charts/vald-readreplica/README.md.gotmpl \
charts/vald-readreplica/values.yaml
.PHONY: $(ROOTDIR)/charts/vald-readreplica/README.md
$(ROOTDIR)/charts/vald-readreplica/README.md: \
$(ROOTDIR)/charts/vald-readreplica/README.md.gotmpl \
$(ROOTDIR)/charts/vald-readreplica/values.yaml
helm-docs

.PHONY: helm/schema/all
Expand All @@ -112,42 +112,42 @@ helm/schema/all: \

.PHONY: helm/schema/vald
## generate json schema for Vald Helm Chart
helm/schema/vald: charts/vald/values.schema.json
helm/schema/vald: $(ROOTDIR)/charts/vald/values.schema.json

charts/vald/values.schema.json: \
charts/vald/values.yaml
$(ROOTDIR)/charts/vald/values.schema.json: \
$(ROOTDIR)/charts/vald/values.yaml
$(call gen-vald-helm-schema,vald/values)

.PHONY: helm/schema/vald-helm-operator
## generate json schema for Vald Helm Operator Chart
helm/schema/vald-helm-operator: charts/vald-helm-operator/values.schema.json
helm/schema/vald-helm-operator: $(ROOTDIR)/charts/vald-helm-operator/values.schema.json

charts/vald-helm-operator/values.schema.json: \
charts/vald-helm-operator/values.yaml
$(ROOTDIR)/charts/vald-helm-operator/values.schema.json: \
$(ROOTDIR)/charts/vald-helm-operator/values.yaml
$(call gen-vald-helm-schema,vald-helm-operator/values)

.PHONY: helm/schema/vald-benchmark-job
## generate json schema for Vald Benchmark Job Chart
helm/schema/vald-benchmark-job: charts/vald-benchmark-operator/job-values.schema.json
helm/schema/vald-benchmark-job: $(ROOTDIR)/charts/vald-benchmark-operator/job-values.schema.json

charts/vald-benchmark-operator/job-values.schema.json: \
charts/vald-benchmark-operator/schemas/job-values.yaml
$(ROOTDIR)/charts/vald-benchmark-operator/job-values.schema.json: \
$(ROOTDIR)/charts/vald-benchmark-operator/schemas/job-values.yaml
$(call gen-vald-helm-schema,vald-benchmark-operator/schemas/job-values)

.PHONY: helm/schema/vald-benchmark-scenario
## generate json schema for Vald Benchmark Job Chart
helm/schema/vald-benchmark-scenario: charts/vald-benchmark-operator/scenario-values.schema.json
helm/schema/vald-benchmark-scenario: $(ROOTDIR)/charts/vald-benchmark-operator/scenario-values.schema.json

charts/vald-benchmark-operator/scenario-values.schema.json: \
charts/vald-benchmark-operator/schemas/scenario-values.yaml
$(ROOTDIR)/charts/vald-benchmark-operator/scenario-values.schema.json: \
$(ROOTDIR)/charts/vald-benchmark-operator/schemas/scenario-values.yaml
$(call gen-vald-helm-schema,vald-benchmark-operator/schemas/scenario-values)

.PHONY: helm/schema/vald-benchmark-operator
## generate json schema for Vald Benchmark Operator Chart
helm/schema/vald-benchmark-operator: charts/vald-benchmark-operator/values.schema.json
helm/schema/vald-benchmark-operator: $(ROOTDIR)/charts/vald-benchmark-operator/values.schema.json

charts/vald-benchmark-operator/values.schema.json: \
charts/vald-benchmark-operator/values.yaml
$(ROOTDIR)/charts/vald-benchmark-operator/values.schema.json: \
$(ROOTDIR)/charts/vald-benchmark-operator/values.yaml
$(call gen-vald-helm-schema,vald-benchmark-operator/values)

.PHONY: yq/install
Expand Down
Loading

0 comments on commit 9a2f6c9

Please sign in to comment.