Skip to content

Commit

Permalink
Update internal/net/grpc/status/status.go
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Signed-off-by: Yusuke Kato <[email protected]>
Signed-off-by: kpango <[email protected]>
  • Loading branch information
kpango and coderabbitai[bot] committed Sep 21, 2024
1 parent 25c6bd6 commit f9f0b86
Show file tree
Hide file tree
Showing 21 changed files with 53 additions and 55 deletions.
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -683,16 +683,17 @@ usearch/install:
git clone --depth 1 --recursive --branch v$(USEARCH_VERSION) https://github.com/unum-cloud/usearch $(TEMP_DIR)/usearch-$(USEARCH_VERSION)
cd $(TEMP_DIR)/usearch-$(USEARCH_VERSION) && \
cmake -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=NO \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF \
-DUSEARCH_BUILD_LIB_C=1 \
-DUSEARCH_USE_FP16LIB=1 \
-DUSEARCH_USE_OPENMP=1 \
-DUSEARCH_USE_SIMSIMD=1 \
-DUSEARCH_USE_JEMALLOC=1 \
-DUSEARCH_BUILD_LIB_C=ON \
-DUSEARCH_USE_FP16LIB=ON \
-DUSEARCH_USE_OPENMP=ON \
-DUSEARCH_USE_SIMSIMD=ON \
-DUSEARCH_USE_JEMALLOC=ON \
-DCMAKE_C_FLAGS="$(CFLAGS)" \
-DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \
-DCMAKE_INSTALL_PREFIX=$(USR_LOCAL) \
-DCMAKE_INSTALL_LIBDIR=$(LIB_PATH) \
-B $(TEMP_DIR)/usearch-$(USEARCH_VERSION)/build $(TEMP_DIR)/usearch-$(USEARCH_VERSION)
cmake --build $(TEMP_DIR)/usearch-$(USEARCH_VERSION)/build -j$(CORES)
cmake --install $(TEMP_DIR)/usearch-$(USEARCH_VERSION)/build --prefix=$(USR_LOCAL)
Expand Down
24 changes: 12 additions & 12 deletions charts/vald/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1075,13 +1075,13 @@ gateway:
name: wait-for-discoverer
target: discoverer
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
sleepDuration: 2
- type: wait-for
name: wait-for-agent
target: agent
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
sleepDuration: 2
# @schema {"name": "gateway.lb.env", "type": "array", "items": {"type": "object"}, "anchor": "env"}
# gateway.lb.env -- environment variables
Expand Down Expand Up @@ -1359,7 +1359,7 @@ gateway:
name: wait-for-gateway-lb
target: gateway-lb
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
sleepDuration: 2
# @schema {"name": "gateway.filter.env", "type": "array", "items": {"type": "object"}, "anchor": "env"}
# gateway.filter.env -- environment variables
Expand Down Expand Up @@ -1647,7 +1647,7 @@ gateway:
name: wait-for-gateway-lb
target: gateway-lb
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
sleepDuration: 2
# @schema {"name": "gateway.mirror.env", "type": "array", "items": {"type": "object"}, "anchor": "env"}
# gateway.mirror.env -- environment variables
Expand Down Expand Up @@ -3137,13 +3137,13 @@ manager:
name: wait-for-agent
target: agent
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
sleepDuration: 2
- type: wait-for
name: wait-for-discoverer
target: discoverer
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
sleepDuration: 2
# @schema {"name": "manager.index.env", "alias": "env"}
# manager.index.env -- environment variables
Expand Down Expand Up @@ -3299,13 +3299,13 @@ manager:
name: wait-for-agent
target: agent
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
sleepDuration: 2
- type: wait-for
name: wait-for-discoverer
target: discoverer
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
sleepDuration: 2
# @schema {"name": "manager.index.corrector.env", "alias": "env"}
# manager.index.corrector.env -- environment variables
Expand Down Expand Up @@ -3411,13 +3411,13 @@ manager:
name: wait-for-agent
target: agent
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
sleepDuration: 2
- type: wait-for
name: wait-for-discoverer
target: discoverer
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
sleepDuration: 2
# @schema {"name": "manager.index.creator.env", "alias": "env"}
# manager.index.creator.env -- environment variables
Expand Down Expand Up @@ -3520,13 +3520,13 @@ manager:
name: wait-for-agent
target: agent
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
sleepDuration: 2
- type: wait-for
name: wait-for-discoverer
target: discoverer
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
sleepDuration: 2
# @schema {"name": "manager.index.saver.env", "alias": "env"}
# manager.index.saver.env -- environment variables
Expand Down
8 changes: 4 additions & 4 deletions cmd/index/operator/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ operator:
containers:
- name: vald-readreplica-rotate
image: "vdaas/vald-readreplica-rotate:pr-2444"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
volumeMounts:
- name: vald-readreplica-rotate-config
mountPath: /etc/server/
Expand Down Expand Up @@ -335,7 +335,7 @@ operator:
containers:
- name: vald-index-creation
image: "vdaas/vald-index-creation:pr-2444"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
volumeMounts:
- name: vald-index-creation-config
mountPath: /etc/server/
Expand Down Expand Up @@ -450,7 +450,7 @@ operator:
containers:
- name: vald-index-save
image: "vdaas/vald-index-save:pr-2444"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
volumeMounts:
- name: vald-index-save-config
mountPath: /etc/server/
Expand Down Expand Up @@ -565,7 +565,7 @@ operator:
containers:
- name: vald-index-correction
image: "vdaas/vald-index-correction:pr-2444"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
volumeMounts:
- name: vald-index-correction-config
mountPath: /etc/server/
Expand Down
2 changes: 1 addition & 1 deletion example/manifest/scylla/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
containers:
- name: scylla-init
image: "cassandra:latest"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
Expand Down
7 changes: 2 additions & 5 deletions internal/net/grpc/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -684,10 +684,7 @@ func withDetails(st *Status, err error, details ...any) *Status {
for _, msg := range ds {
r, ok := msg.(*errdetails.RetryInfo)
if ok && r != nil {
if m.GetRetryDelay().GetSeconds() == 0 &&
r.GetRetryDelay().GetSeconds() != 0 {
m.RetryDelay = r.GetRetryDelay()
} else if m.GetRetryDelay().GetSeconds() > r.GetRetryDelay().GetSeconds() {
if m.GetRetryDelay() == nil || r.GetRetryDelay().Seconds < m.GetRetryDelay().Seconds {
m.RetryDelay = r.GetRetryDelay()
}
}
Expand Down Expand Up @@ -748,7 +745,7 @@ func typeURL(msg proto.Message) string {
case *errdetails.RetryInfo:
return errdetails.RetryInfoMessageName
}
return ""
return "unknown"
}

func appendM[K comparable](maps ...map[K]string) (result map[K]string) {
Expand Down
2 changes: 1 addition & 1 deletion k8s/agent/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ spec:
containers:
- name: vald-agent
image: "vdaas/vald-agent-ngt:nightly"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 2
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion k8s/discoverer/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ spec:
containers:
- name: vald-discoverer
image: "vdaas/vald-discoverer-k8s:nightly"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 2
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion k8s/external/minio/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
containers:
- name: minio
image: minio/minio
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command:
- "/usr/bin/docker-entrypoint.sh"
- "server"
Expand Down
2 changes: 1 addition & 1 deletion k8s/external/minio/mb-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
containers:
- name: mc
image: minio/mc
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
Expand Down
6 changes: 3 additions & 3 deletions k8s/gateway/gateway/lb/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
initContainers:
- name: wait-for-discoverer
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -e
Expand All @@ -70,7 +70,7 @@ spec:
done
- name: wait-for-agent
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -e
Expand Down Expand Up @@ -101,7 +101,7 @@ spec:
containers:
- name: vald-lb-gateway
image: "vdaas/vald-lb-gateway:nightly"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 2
httpGet:
Expand Down
4 changes: 2 additions & 2 deletions k8s/gateway/gateway/mirror/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
initContainers:
- name: wait-for-gateway-lb
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -e
Expand Down Expand Up @@ -86,7 +86,7 @@ spec:
containers:
- name: vald-mirror-gateway
image: "vdaas/vald-mirror-gateway:nightly"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 2
httpGet:
Expand Down
6 changes: 3 additions & 3 deletions k8s/index/job/correction/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
initContainers:
- name: wait-for-agent
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -e
Expand All @@ -65,7 +65,7 @@ spec:
done
- name: wait-for-discoverer
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -e
Expand All @@ -78,7 +78,7 @@ spec:
containers:
- name: vald-index-correction
image: "vdaas/vald-index-correction:nightly"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
volumeMounts:
- name: vald-index-correction-config
mountPath: /etc/server/
Expand Down
6 changes: 3 additions & 3 deletions k8s/index/job/creation/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
initContainers:
- name: wait-for-agent
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -e
Expand All @@ -65,7 +65,7 @@ spec:
done
- name: wait-for-discoverer
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -e
Expand All @@ -78,7 +78,7 @@ spec:
containers:
- name: vald-index-creation
image: "vdaas/vald-index-creation:nightly"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
volumeMounts:
- name: vald-index-creation-config
mountPath: /etc/server/
Expand Down
6 changes: 3 additions & 3 deletions k8s/index/job/save/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
initContainers:
- name: wait-for-agent
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -e
Expand All @@ -65,7 +65,7 @@ spec:
done
- name: wait-for-discoverer
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -e
Expand All @@ -78,7 +78,7 @@ spec:
containers:
- name: vald-index-save
image: "vdaas/vald-index-save:nightly"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
volumeMounts:
- name: vald-index-save-config
mountPath: /etc/server/
Expand Down
2 changes: 1 addition & 1 deletion k8s/index/operator/configmap.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion k8s/index/operator/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
containers:
- name: vald-index-operator
image: "vdaas/vald-index-operator:nightly"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 2
httpGet:
Expand Down
6 changes: 3 additions & 3 deletions k8s/manager/index/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
initContainers:
- name: wait-for-agent
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -e
Expand All @@ -71,7 +71,7 @@ spec:
done
- name: wait-for-discoverer
image: busybox:stable
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -e
Expand All @@ -93,7 +93,7 @@ spec:
containers:
- name: vald-manager-index
image: "vdaas/vald-manager-index:nightly"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 2
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion k8s/operator/helm/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ spec:
containers:
- name: vald-helm-operator
image: "vdaas/vald-helm-operator:v1.7.13"
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
args:
- "--leader-elect"
- "--leader-election-id=vald-helm-operator"
Expand Down
Loading

0 comments on commit f9f0b86

Please sign in to comment.