Skip to content

Commit

Permalink
[BUGFIX] index correction process
Browse files Browse the repository at this point in the history
Signed-off-by: kpango <[email protected]>
  • Loading branch information
kpango committed Aug 5, 2024
1 parent 70d9daa commit 9322c54
Show file tree
Hide file tree
Showing 41 changed files with 3,747 additions and 2,895 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
SHELL = bash
ORG ?= vdaas
NAME = vald
GOPKG = github.com/$(ORG)/$(NAME)
REPO = $(ORG)/$(NAME)
GOPKG = github.com/$(REPO)
DATETIME = $(eval DATETIME := $(shell date -u +%Y/%m/%d_%H:%M:%S%z))$(DATETIME)
TAG ?= latest
CRORG ?= $(ORG)
GHCRORG = ghcr.io/$(ORG)/$(NAME)
GHCRORG = ghcr.io/$(REPO)
AGENT_NGT_IMAGE = $(NAME)-agent-ngt
AGENT_FAISS_IMAGE = $(NAME)-agent-faiss
AGENT_SIDECAR_IMAGE = $(NAME)-agent-sidecar
Expand Down
4 changes: 2 additions & 2 deletions Makefile.d/dependencies.mk
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,12 @@ update/hdf5:
.PHONY: update/vald
## update vald it's self version
update/vald:
curl -fsSL https://api.github.com/repos/vdaas/vald/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' > $(ROOTDIR)/versions/VALD_VERSION
curl -fsSL https://api.github.com/repos/$(REPO)/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' > $(ROOTDIR)/versions/VALD_VERSION

.PHONY: update/valdcli
## update vald client library made by clojure self version
update/valdcli:
curl -fsSL https://api.github.com/repos/vdaas/vald-client-clj/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' > $(ROOTDIR)/versions/VALDCLI_VERSION
curl -fsSL https://api.github.com/repos/$(REPO)-client-clj/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' > $(ROOTDIR)/versions/VALDCLI_VERSION

.PHONY: update/template
## update PULL_REQUEST_TEMPLATE and ISSUE_TEMPLATE
Expand Down
14 changes: 9 additions & 5 deletions Makefile.d/k8s.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ k8s/manifest/update: \
helm template \
--values $(HELM_VALUES) \
$(HELM_EXTRA_OPTIONS) \
--set manager.index.operator.enabled=true \
--set manager.index.saver.enabled=true \
--set manager.index.creator.enabled=true \
--set manager.index.corrector.enabled=true \
--output-dir $(TEMP_DIR) \
charts/vald
mkdir -p k8s/gateway
Expand Down Expand Up @@ -536,27 +540,27 @@ $(BINDIR)/telepresence:
.PHONY: telepresence/swap/agent-ngt
## swap agent-ngt deployment using telepresence
telepresence/swap/agent-ngt:
$(call telepresence,vald-agent-ngt,vdaas/vald-agent-ngt)
$(call telepresence,vald-agent-ngt,$(REPO)-agent-ngt)

.PHONY: telepresence/swap/agent-faiss
## swap agent-faiss deployment using telepresence
telepresence/swap/agent-faiss:
$(call telepresence,vald-agent-faiss,vdaas/vald-agent-faiss)
$(call telepresence,vald-agent-faiss,$(REPO)-agent-faiss)

.PHONY: telepresence/swap/discoverer
## swap discoverer deployment using telepresence
telepresence/swap/discoverer:
$(call telepresence,vald-discoverer,vdaas/vald-discoverer-k8s)
$(call telepresence,vald-discoverer,$(REPO)-discoverer-k8s)

.PHONY: telepresence/swap/manager-index
## swap manager-index deployment using telepresence
telepresence/swap/manager-index:
$(call telepresence,vald-manager-index,vdaas/vald-manager-index)
$(call telepresence,vald-manager-index,$(REPO)-manager-index)

.PHONY: telepresence/swap/lb-gateway
## swap lb-gateway deployment using telepresence
telepresence/swap/lb-gateway:
$(call telepresence,vald-lb-gateway,vdaas/vald-lb-gateway)
$(call telepresence,vald-lb-gateway,$(REPO)-lb-gateway)

.PHONY: kubelinter/install
## install kubelinter
Expand Down
10 changes: 5 additions & 5 deletions Makefile.d/proto.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ $(GOBIN)/buf:
$(ROOTDIR)/apis/proto/v1/rpc/errdetails/error_details.proto:
curl -fsSL https://raw.githubusercontent.com/googleapis/googleapis/master/google/rpc/error_details.proto -o $(ROOTDIR)/apis/proto/v1/rpc/errdetails/error_details.proto
sed -i -e "s/package google.rpc/package rpc.v1/" $(ROOTDIR)/apis/proto/v1/rpc/errdetails/error_details.proto
sed -i -e "s%google.golang.org/genproto/googleapis/rpc/errdetails;errdetails%github.com/vdaas/vald/apis/grpc/v1/rpc/errdetails%" $(ROOTDIR)/apis/proto/v1/rpc/errdetails/error_details.proto
sed -i -e "s%google.golang.org/genproto/googleapis/rpc/errdetails;errdetails%$(GOPKG)/apis/grpc/v1/rpc/errdetails%" $(ROOTDIR)/apis/proto/v1/rpc/errdetails/error_details.proto
sed -i -e "s/com.google.rpc/org.vdaas.vald.api.v1.rpc/" $(ROOTDIR)/apis/proto/v1/rpc/errdetails/error_details.proto

proto/gen: \
Expand All @@ -59,9 +59,9 @@ proto/gen: \
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%google.golang.org/grpc/codes%$(GOPKG)/internal/net/grpc/codes%g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs -P$(CORES) sed -i -E "s%google.golang.org/grpc/status%$(GOPKG)/internal/net/grpc/status%g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs -P$(CORES) sed -i -E "s%\"io\"%\"$(GOPKG)/internal/io\"%g"
find $(ROOTDIR)/apis/grpc/* -name '*.go' | xargs -P$(CORES) sed -i -E "s%\"sync\"%\"$(GOPKG)/internal/sync\"%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"
16 changes: 8 additions & 8 deletions Makefile.d/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,15 @@ gotests/gen-test:
## apply patches to generated go test files
gotests/patch:
@$(call green, "apply patches to go test files...")
find $(ROOTDIR)/internal/k8s/* -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%k8s.io/apimachinery/pkg/api/errors%github.com/vdaas/vald/internal/errors%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%cockroachdb/errors%vdaas/vald/internal/errors%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%golang.org/x/sync/errgroup%github.com/vdaas/vald/internal/sync/errgroup%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%pkg/errors%vdaas/vald/internal/errors%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%go-errors/errors%vdaas/vald/internal/errors%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%go.uber.org/goleak%github.com/vdaas/vald/internal/test/goleak%g"
find $(ROOTDIR)/internal/errors -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%\"github.com/vdaas/vald/internal/errors\"%%g"
find $(ROOTDIR)/internal/k8s/* -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%k8s.io/apimachinery/pkg/api/errors%$(GOPKG)/internal/errors%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%cockroachdb/errors%$(REPO)/internal/errors%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%golang.org/x/sync/errgroup%$(GOPKG)/internal/sync/errgroup%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%pkg/errors%$(REPO)/internal/errors%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%go-errors/errors%$(REPO)/internal/errors%g"
find $(ROOTDIR)/* -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%go.uber.org/goleak%$(GOPKG)/internal/test/goleak%g"
find $(ROOTDIR)/internal/errors -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%\"$(GOPKG)/internal/errors\"%%g"
find $(ROOTDIR)/internal/errors -name '*_test.go' -not -name '*_benchmark_test.go' | xargs -P$(CORES) sed -i -E "s/errors\.//g"
find $(ROOTDIR)/internal/test/goleak -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%\"github.com/vdaas/vald/internal/test/goleak\"%%g"
find $(ROOTDIR)/internal/test/goleak -name '*_test.go' | xargs -P$(CORES) sed -i -E "s%\"$(GOPKG)/internal/test/goleak\"%%g"
find $(ROOTDIR)/internal/test/goleak -name '*_test.go' | xargs -P$(CORES) sed -i -E "s/goleak\.//g"

.PHONY: test/patch-placeholder
Expand Down
182 changes: 179 additions & 3 deletions charts/vald-helm-operator/crds/valdrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7888,6 +7888,181 @@ spec:
items:
type: object
x-kubernetes-preserve-unknown-fields: true
gateway:
type: object
properties:
addrs:
type: array
items:
type: string
backoff:
type: object
properties:
backoff_factor:
type: number
backoff_time_limit:
type: string
enable_error_log:
type: boolean
initial_duration:
type: string
jitter_limit:
type: string
maximum_duration:
type: string
retry_count:
type: integer
call_option:
type: object
x-kubernetes-preserve-unknown-fields: true
circuit_breaker:
type: object
properties:
closed_error_rate:
type: number
closed_refresh_timeout:
type: string
half_open_error_rate:
type: number
min_samples:
type: integer
open_timeout:
type: string
connection_pool:
type: object
properties:
enable_dns_resolver:
type: boolean
enable_rebalance:
type: boolean
old_conn_close_duration:
type: string
rebalance_duration:
type: string
size:
type: integer
dial_option:
type: object
properties:
backoff_base_delay:
type: string
backoff_jitter:
type: number
backoff_max_delay:
type: string
backoff_multiplier:
type: number
enable_backoff:
type: boolean
initial_connection_window_size:
type: integer
initial_window_size:
type: integer
insecure:
type: boolean
interceptors:
type: array
items:
type: string
enum:
- TraceInterceptor
keepalive:
type: object
properties:
permit_without_stream:
type: boolean
time:
type: string
timeout:
type: string
max_msg_size:
type: integer
min_connection_timeout:
type: string
net:
type: object
properties:
dialer:
type: object
properties:
dual_stack_enabled:
type: boolean
keepalive:
type: string
timeout:
type: string
dns:
type: object
properties:
cache_enabled:
type: boolean
cache_expiration:
type: string
refresh_duration:
type: string
socket_option:
type: object
properties:
ip_recover_destination_addr:
type: boolean
ip_transparent:
type: boolean
reuse_addr:
type: boolean
reuse_port:
type: boolean
tcp_cork:
type: boolean
tcp_defer_accept:
type: boolean
tcp_fast_open:
type: boolean
tcp_no_delay:
type: boolean
tcp_quick_ack:
type: boolean
tls:
type: object
properties:
ca:
type: string
cert:
type: string
enabled:
type: boolean
insecure_skip_verify:
type: boolean
key:
type: string
read_buffer_size:
type: integer
timeout:
type: string
write_buffer_size:
type: integer
health_check_duration:
type: string
max_recv_msg_size:
type: integer
max_retry_rpc_buffer_size:
type: integer
max_send_msg_size:
type: integer
tls:
type: object
properties:
ca:
type: string
cert:
type: string
enabled:
type: boolean
insecure_skip_verify:
type: boolean
key:
type: string
wait_for_ready:
type: boolean
image:
type: object
properties:
Expand All @@ -7906,9 +8081,10 @@ spec:
items:
type: object
x-kubernetes-preserve-unknown-fields: true
kvs_async_write_concurrency:
type: integer
minimum: 1
kvs_background_compaction_interval:
type: string
kvs_background_sync_interval:
type: string
name:
type: string
node_name:
Expand Down
Loading

0 comments on commit 9322c54

Please sign in to comment.