diff --git a/.devcontainer/postAttachCommand.sh b/.devcontainer/postAttachCommand.sh index 2198678504f..ac06beb87a1 100644 --- a/.devcontainer/postAttachCommand.sh +++ b/.devcontainer/postAttachCommand.sh @@ -15,7 +15,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -: # # This script is executed as postAttachCommand in devcontainer.json @@ -23,7 +22,6 @@ # - create symbolic link of config.yaml for easier development # - add command history setting to .zshrc to persist history # - echo "creating symbolic link of config..." LINK_TARGET="$(pwd)/cmd/agent/core/ngt/sample.yaml" diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index b64413705bf..c693fdf6473 100755 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -22,7 +22,7 @@ assignees: "" -- Go Version: 1.21.5 +- Go Version: 1.21.6 - Docker Version: 20.10.8 -- Kubernetes Version: v1.28.4 +- Kubernetes Version: v1.29.1 - NGT Version: 2.1.6 diff --git a/.github/ISSUE_TEMPLATE/security_issue_report.md b/.github/ISSUE_TEMPLATE/security_issue_report.md index ab6d03444da..a9d86f602c1 100644 --- a/.github/ISSUE_TEMPLATE/security_issue_report.md +++ b/.github/ISSUE_TEMPLATE/security_issue_report.md @@ -16,7 +16,7 @@ assignees: "" -- Go Version: 1.21.5 +- Go Version: 1.21.6 - Docker Version: 20.10.8 -- Kubernetes Version: v1.28.4 +- Kubernetes Version: v1.29.1 - NGT Version: 2.1.6 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c2a32df316a..036179e0b35 100755 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -16,9 +16,9 @@ -- Go Version: 1.21.5 +- Go Version: 1.21.6 - Docker Version: 20.10.8 -- Kubernetes Version: v1.28.4 +- Kubernetes Version: v1.29.1 - NGT Version: 2.1.6 ### Checklist: diff --git a/.github/actions/detect-docker-image-tags/action.yaml b/.github/actions/detect-docker-image-tags/action.yaml index c9f8c5c819d..630890f6451 100644 --- a/.github/actions/detect-docker-image-tags/action.yaml +++ b/.github/actions/detect-docker-image-tags/action.yaml @@ -15,7 +15,6 @@ # name: "Detect Docker image tags" description: "A action to detect Docker image tags" - inputs: tag_name: description: "Tag name to check whether exists or not" @@ -24,10 +23,7 @@ inputs: images: description: "Image names" required: false - default: "vdaas/vald-agent-ngt \ - vdaas/vald-discoverer-k8s \ - vdaas/vald-lb-gateway \ - vdaas/vald-manager-index" + default: "vdaas/vald-agent-ngt vdaas/vald-agent-faiss vdaas/vald-agent-sidecar vdaas/vald-discoverer-k8s vdaas/vald-lb-gateway vdaas/vald-filter-gateway vdaas/vald-mirror-gateway vdaas/vald-manager-index" outputs: HELM_EXTRA_OPTIONS: description: "Helm extra options that specifies image tags" @@ -35,7 +31,6 @@ outputs: IMAGE_TAGS: description: "Specifies image tags" value: ${{ steps.specify_container_versions.outputs.IMAGE_TAGS }} - runs: using: "composite" steps: @@ -45,6 +40,7 @@ runs: run: | declare -A m=( ["vdaas/vald-agent-ngt"]="agent.image.tag" + ["vdaas/vald-agent-faiss"]="agent.image.tag" ["vdaas/vald-agent-sidecar"]="agent.sidecar.image.tag" ["vdaas/vald-discoverer-k8s"]="discoverer.image.tag" ["vdaas/vald-lb-gateway"]="gateway.lb.image.tag" diff --git a/.github/actions/determine-docker-image-tag/action.yaml b/.github/actions/determine-docker-image-tag/action.yaml index f50ee093fc0..1f4b4498613 100644 --- a/.github/actions/determine-docker-image-tag/action.yaml +++ b/.github/actions/determine-docker-image-tag/action.yaml @@ -15,7 +15,6 @@ # name: "Determine Docker image tag" description: "A action to determine Docker image tag" - outputs: PRIMARY_TAG: description: "Primary tag" @@ -23,7 +22,6 @@ outputs: DEFAULT_TAG: description: "default tag. Tag to be used if the primary tag does not exist" value: ${{ steps.determine_tag_name.outputs.DEFAULT_TAG }} - runs: using: "composite" steps: @@ -35,7 +33,6 @@ runs: echo "GITHUB_EVENT_PATH $GITHUB_EVENT_PATH" echo "GITHUB_EVENT_NAME ${{ github.event_name }}" echo "GITHUB_EVENT_NUMBER ${{ github.event.number }}" - - name: Determine tag name shell: bash id: determine_tag_name diff --git a/.github/actions/notify-slack/action.yaml b/.github/actions/notify-slack/action.yaml index 9b71791913f..be705283261 100644 --- a/.github/actions/notify-slack/action.yaml +++ b/.github/actions/notify-slack/action.yaml @@ -15,7 +15,6 @@ # name: "Notify Slack" description: "A action to notify Slack" - inputs: author_name: description: "User name for slack notification" @@ -30,14 +29,12 @@ inputs: status: description: "Specify success or failure or cancelled or custom" required: false - runs: using: "composite" steps: - - uses: technote-space/workflow-conclusion-action@v2 + - uses: technote-space/workflow-conclusion-action@v3 with: GITHUB_TOKEN: ${{ inputs.token }} - - uses: 8398a7/action-slack@v3 with: author_name: ${{ inputs.author_name }} diff --git a/.github/actions/setup-e2e/action.yaml b/.github/actions/setup-e2e/action.yaml index 19fd24100a8..c99eab09e3f 100644 --- a/.github/actions/setup-e2e/action.yaml +++ b/.github/actions/setup-e2e/action.yaml @@ -15,7 +15,6 @@ # name: "Setup E2E environment" description: "A action to set up the environment for executing E2E test" - inputs: require_libhdf5: description: "If libhdf5 is not required, set this to false" @@ -44,8 +43,7 @@ inputs: target_images: description: "Image names" required: false - default: "vdaas/vald-agent-ngt vdaas/vald-discoverer-k8s vdaas/vald-lb-gateway vdaas/vald-manager-index" - + default: "vdaas/vald-agent-ngt vdaas/vald-agent-faiss vdaas/vald-agent-sidecar vdaas/vald-discoverer-k8s vdaas/vald-lb-gateway vdaas/vald-filter-gateway vdaas/vald-mirror-gateway vdaas/vald-manager-index" outputs: HELM_EXTRA_OPTIONS: description: "Helm extra options that specifies E2E target image tags" @@ -56,7 +54,6 @@ outputs: DEFAULT_IMAGE_TAG: description: "Default E2E target image tag" value: ${{ steps.determine_tag_name.outputs.DEFAULT_TAG }} - runs: using: "composite" steps: @@ -66,45 +63,37 @@ runs: run: | sudo apt-get update sudo apt-get install -y libhdf5-dev - - name: Setup Go environment if: ${{ inputs.require_go == 'true' }} uses: ./.github/actions/setup-go - - name: Setup Helm environment if: ${{ inputs.require_helm == 'true' }} uses: ./.github/actions/setup-helm - - name: Wait for target Docker images if: startsWith( github.ref, 'refs/tags/') uses: ./.github/actions/wait-for-docker-image with: images: ${{ inputs.target_images }} - - name: Determine Docker image tag id: determine_tag_name uses: ./.github/actions/determine-docker-image-tag - - name: Specify container versions id: specify_container_versions uses: ./.github/actions/detect-docker-image-tags with: tag_name: ${{ steps.determine_tag_name.outputs.PRIMARY_TAG }} images: ${{ inputs.target_images }} - - uses: ./.github/actions/setup-k3d if: ${{ inputs.require_k3d == 'true' }} with: agents: 3 ingress_port: ${{ inputs.ingress_port }} - - name: Setup Minikube environment if: ${{ inputs.require_minikube == 'true' }} shell: bash run: | make minikube/install make minikube/start - - name: Check Kubernetes cluster shell: bash run: | diff --git a/.github/actions/setup-go/action.yaml b/.github/actions/setup-go/action.yaml index 0d1d2e10026..ba3f7ec7e43 100644 --- a/.github/actions/setup-go/action.yaml +++ b/.github/actions/setup-go/action.yaml @@ -15,13 +15,11 @@ # name: "Setup Go environment" description: "A action to set up Go environment" - inputs: go_version: description: "The Go version to use. The default version is `versions/GO_VERSION`" required: false default: "" - runs: using: "composite" steps: @@ -34,11 +32,9 @@ runs: echo "version=${GO_VERSION}" >> $GITHUB_OUTPUT env: GO_VERSION: ${{ inputs.go_version }} - - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: go-version: ${{ steps.go_version.outputs.version }} - - name: Check Go version shell: bash run: | diff --git a/.github/actions/setup-k3d/action.yaml b/.github/actions/setup-k3d/action.yaml index c50b2cd6355..48f7556818e 100644 --- a/.github/actions/setup-k3d/action.yaml +++ b/.github/actions/setup-k3d/action.yaml @@ -15,7 +15,6 @@ # name: "Setup k3d environment" description: "A action to set up k3d (k3s in Docker)" - inputs: version: description: "k3d version" @@ -41,7 +40,6 @@ inputs: description: "Options for k3d cluster create command" required: false default: "" - runs: using: "composite" steps: @@ -55,7 +53,6 @@ runs: echo "tag=${TAG}" >> $GITHUB_OUTPUT env: K3D_VERSION: ${{ inputs.version }} - - name: Detect k3s version id: k3s_version shell: bash @@ -65,19 +62,16 @@ runs: echo "tag=${K3S_VERSION=$}" >> $GITHUB_OUTPUT env: K3S_VERSION: ${{ inputs.k3s_version }} - - name: Install k3d shell: bash run: | curl -s ${REPO_URL} | ${{ steps.k3d_version.outputs.tag }} bash env: REPO_URL: "https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh" - - name: Check k3d version shell: bash run: | k3d version - - name: Setup k3d options shell: bash id: k3d_options @@ -95,8 +89,13 @@ runs: INGRESS_PORT: ${{ inputs.ingress_port }} OPTIONS: ${{ inputs.options }} K3S_VERSION: ${{ steps.k3s_version.outputs.tag }} - - name: Create k8s cluster shell: bash + id: start_k3d run: | k3d cluster create ${{ inputs.name }} ${{ steps.k3d_options.outputs.options }} + - name: Ready k8s cluster + shell: bash + run: | + k3d cluster list + kubectl cluster-info dump diff --git a/.github/actions/wait-for-docker-image/action.yaml b/.github/actions/wait-for-docker-image/action.yaml index 5efca90cc63..8877419eae5 100644 --- a/.github/actions/wait-for-docker-image/action.yaml +++ b/.github/actions/wait-for-docker-image/action.yaml @@ -15,17 +15,12 @@ # name: "Wait for Docker Images" description: "A action to wait for Docker images to be published" - inputs: images: description: "image names" required: false - default: "vdaas/vald-agent-ngt \ - vdaas/vald-discoverer-k8s \ - vdaas/vald-lb-gateway \ - vdaas/vald-manager-index" + default: "vdaas/vald-agent-ngt vdaas/vald-agent-faiss vdaas/vald-agent-sidecar vdaas/vald-discoverer-k8s vdaas/vald-lb-gateway vdaas/vald-filter-gateway vdaas/vald-mirror-gateway vdaas/vald-manager-index" outputs: {} - runs: using: "composite" steps: diff --git a/.github/codeql/codeql-config.yaml b/.github/codeql/codeql-config.yaml index d171c95c0f1..9093ab35116 100644 --- a/.github/codeql/codeql-config.yaml +++ b/.github/codeql/codeql-config.yaml @@ -16,4 +16,3 @@ name: "Go CodeQL config" queries: - uses: security-and-quality - # - uses: github/codeql-go/ql/src@lgtm.com diff --git a/.github/labeler.yml b/.github/labeler.yml index 36f538b3e4e..77540bee304 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -13,76 +13,169 @@ # See the License for the specific language governing permissions and # limitations under the License. # -area/agent/core: - - apis/proto/v1/agent/core/**/* - - apis/grpc/v1/agent/core/**/* - - apis/proto/agent/core/**/* - - apis/grpc/agent/core/**/* - - cmd/agent/core/**/* - - pkg/agent/core/**/* - +area/agent/core/faiss: + - changed-files: + - any-glob-to-any-file: + - apis/grpc/v1/agent/core/**/* + - apis/proto/v1/agent/core/**/* + - cmd/agent/core/faiss/* + - pkg/agent/core/faiss/**/* + - pkg/agent/internal/**/* +area/agent/core/ngt: + - changed-files: + - any-glob-to-any-file: + - apis/grpc/v1/agent/core/**/* + - apis/proto/v1/agent/core/**/* + - cmd/agent/core/ngt/* + - pkg/agent/core/ngt/**/* + - pkg/agent/internal/**/* area/agent/sidecar: - - apis/proto/v1/agent/sidecar/**/* - - apis/grpc/v1/agent/sidecar/**/* - - apis/proto/agent/sidecar/**/* - - apis/grpc/agent/sidecar/**/* - - cmd/agent/sidecar/**/* - - pkg/agent/sidecar/**/* - + - changed-files: + - any-glob-to-any-file: + - apis/grpc/v1/agent/sidecar/**/* + - apis/proto/v1/agent/sidecar/**/* + - cmd/agent/sidecar/**/* + - pkg/agent/sidecar/**/* area/discoverer: - - apis/proto/v1/discoverer/**/* - - apis/grpc/v1/discoverer/**/* - - apis/proto/discoverer/**/* - - apis/grpc/discoverer/**/* - - cmd/discoverer/**/* - - pkg/discoverer/**/* - + - changed-files: + - any-glob-to-any-file: + - apis/grpc/v1/discoverer/**/* + - apis/proto/v1/discoverer/**/* + - cmd/discoverer/**/* + - pkg/discoverer/**/* area/gateway/lb: - - apis/proto/v1/payload/**/* - - apis/proto/v1/vald/**/* - - apis/grpc/v1/vald/**/* - - cmd/gateway/lb/**/* - - pkg/gateway/lb/**/* - + - changed-files: + - any-glob-to-any-file: + - apis/grpc/v1/discoverer/**/* + - apis/grpc/v1/payload/**/* + - apis/grpc/v1/vald/**/* + - apis/proto/v1/discoverer/**/* + - apis/proto/v1/payload/**/* + - apis/proto/v1/vald/**/* + - cmd/gateway/lb/**/* + - pkg/gateway/lb/**/* area/gateway/filter: - - apis/proto/v1/payload/**/* - - apis/proto/v1/vald/**/* - - apis/grpc/v1/vald/**/* - - cmd/gateway/filter/**/* - - pkg/gateway/filter/**/* - + - changed-files: + - any-glob-to-any-file: + - apis/grpc/v1/filter/egress/* + - apis/grpc/v1/filter/ingress/* + - apis/grpc/v1/payload/**/* + - apis/grpc/v1/vald/**/* + - apis/proto/v1/filter/egress/* + - apis/proto/v1/filter/ingress/* + - apis/proto/v1/payload/**/* + - apis/proto/v1/vald/**/* + - cmd/gateway/filter/**/* + - pkg/gateway/filter/**/* +area/gateway/mirror: + - changed-files: + - any-glob-to-any-file: + - apis/grpc/v1/payload/**/* + - apis/grpc/v1/vald/**/* + - apis/proto/v1/payload/**/* + - apis/proto/v1/vald/**/* + - cmd/gateway/mirror/**/* + - pkg/gateway/mirror/**/* area/manager/index: - - apis/proto/v1/payload/**/* - - apis/proto/v1/manager/index/**/* - - apis/grpc/v1/manager/index/**/* - - cmd/manager/index/**/* - - pkg/manager/index/**/* - + - changed-files: + - any-glob-to-any-file: + - apis/grpc/v1/discoverer/**/* + - apis/grpc/v1/manager/index/**/* + - apis/grpc/v1/payload/**/* + - apis/proto/v1/discoverer/**/* + - apis/proto/v1/manager/index/**/* + - apis/proto/v1/payload/**/* + - cmd/manager/index/**/* + - pkg/manager/index/**/* +area/index/job/correction: + - changed-files: + - any-glob-to-any-file: + - apis/grpc/v1/agent/core/**/* + - apis/grpc/v1/discoverer/**/* + - apis/grpc/v1/payload/**/* + - apis/grpc/v1/vald/**/* + - apis/proto/v1/agent/core/**/* + - apis/proto/v1/discoverer/**/* + - apis/proto/v1/payload/**/* + - apis/proto/v1/vald/**/* + - cmd/index/job/correction/* + - pkg/index/job/correction/**/* +area/index/job/creation: + - changed-files: + - any-glob-to-any-file: + - apis/grpc/v1/agent/core/**/* + - apis/grpc/v1/discoverer/**/* + - apis/grpc/v1/payload/**/* + - apis/grpc/v1/vald/**/* + - apis/proto/v1/agent/core/**/* + - apis/proto/v1/discoverer/**/* + - apis/proto/v1/payload/**/* + - apis/proto/v1/vald/**/* + - cmd/index/job/creation/* + - pkg/index/job/creation/**/* +area/index/job/save: + - changed-files: + - any-glob-to-any-file: + - apis/grpc/v1/agent/core/**/* + - apis/grpc/v1/discoverer/**/* + - apis/grpc/v1/payload/**/* + - apis/grpc/v1/vald/**/* + - apis/proto/v1/agent/core/**/* + - apis/proto/v1/discoverer/**/* + - apis/proto/v1/payload/**/* + - apis/proto/v1/vald/**/* + - cmd/index/job/save/* + - pkg/index/job/save/**/* +area/index/job/readreplica: + - changed-files: + - any-glob-to-any-file: + - apis/grpc/v1/agent/core/**/* + - apis/grpc/v1/discoverer/**/* + - apis/grpc/v1/payload/**/* + - apis/grpc/v1/vald/**/* + - apis/proto/v1/agent/core/**/* + - apis/proto/v1/discoverer/**/* + - apis/proto/v1/payload/**/* + - apis/proto/v1/vald/**/* + - cmd/index/job/readreplica/**/* + - pkg/index/job/readreplica/**/* +area/filter/egress: + - changed-files: + - any-glob-to-any-file: + - apis/grpc/v1/filter/egress/* + - apis/grpc/v1/payload/**/* + - apis/proto/v1/filter/egress/* + - apis/proto/v1/payload/**/* +area/filter/ingress: + - changed-files: + - any-glob-to-any-file: + - apis/grpc/v1/filter/ingress/* + - apis/grpc/v1/payload/**/* + - apis/proto/v1/filter/ingress/* + - apis/proto/v1/payload/**/* area/tools/cli/loadtest: - - apis/proto/agent/core/**/* - - apis/grpc/agent/core/**/* - - apis/proto/vald/**/* - - apis/grpc/vald/**/* - - cmd/tools/cli/loadtest/**/* - - pkg/tools/cli/loadtest/**/* - + - changed-files: + - any-glob-to-any-file: + - apis/proto/v1/agent/core/**/* + - apis/proto/v1/vald/**/* + - apis/grpc/v1/agent/core/**/* + - apis/grpc/v1/vald/**/* + - cmd/tools/cli/loadtest/**/* + - pkg/tools/cli/loadtest/**/* area/internal: - - internal/**/* - + - changed-files: + - any-glob-to-any-file: + - internal/**/* area/helm: - - charts/**/* - + - changed-files: + - any-glob-to-any-file: + - charts/**/* area/makefile: - - Makefile - - Makefile.d/**/* - -team/set: - - "**/*_test.go" - -team/sre: - - Makefile - - Makefile.d/**/* - - .github/**/* - + - changed-files: + - any-glob-to-any-file: + - Makefile + - Makefile.d/**/* type/ci: - - .github/**/* + - changed-files: + - any-glob-to-any-file: + - .github/**/* diff --git a/.github/workflows/_detect-ci-container.yml b/.github/workflows/_detect-ci-container.yml index 4b70527e174..5c666cc26f3 100644 --- a/.github/workflows/_detect-ci-container.yml +++ b/.github/workflows/_detect-ci-container.yml @@ -30,7 +30,7 @@ jobs: outputs: TAG_NAME: ${{ steps.merge_detection_results.outputs.TAG_NAME }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Determine Docker image tag id: determine_tag_name diff --git a/.github/workflows/_docker-image-scan.yaml b/.github/workflows/_docker-image-scan.yaml index 91fbfc6b17d..2317964ada0 100644 --- a/.github/workflows/_docker-image-scan.yaml +++ b/.github/workflows/_docker-image-scan.yaml @@ -26,11 +26,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set Git config run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: Build the Docker image id: build_image run: | @@ -48,7 +46,6 @@ jobs: TARGET: ${{ inputs.target }} LABEL_OPTS: "--label org.opencontainers.image.url=${{ github.event.repository.html_url }} --label org.opencontainers.image.source=${{ github.event.repository.html_url }} --label org.opencontainers.image.revision=${{ github.sha }}" PRIMARY_TAG: ${{ github.sha }} - - name: Scan the Docker image uses: ./.github/actions/scan-docker-image with: diff --git a/.github/workflows/_docker-image.yaml b/.github/workflows/_docker-image.yaml index db3db1019e1..171fad4453e 100644 --- a/.github/workflows/_docker-image.yaml +++ b/.github/workflows/_docker-image.yaml @@ -26,11 +26,9 @@ on: description: "If it is specified, specified platforms will be used." required: false default: "" - concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref != 'refs/heads/main' && github.ref || github.sha }}-${{ github.event_name }}-${{ inputs.target }} cancel-in-progress: true - jobs: dump-contexts-to-log: runs-on: ubuntu-latest @@ -41,6 +39,8 @@ jobs: runs-on: ubuntu-latest if: >- ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) || + + (github.event.pull_request.head.repo.fork == true && github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci/approved')) || (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'push' && startsWith( github.ref, 'refs/heads/release/v')) || @@ -55,21 +55,17 @@ jobs: else echo ref=${{ github.sha }} >> $GITHUB_OUTPUT fi - - uses: actions/checkout@v4 with: ref: ${{ steps.ref.outputs.ref }} - - name: Set Git config run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: Setup QEMU uses: docker/setup-qemu-action@v3 with: image: tonistiigi/binfmt:master platforms: linux/amd64,linux/arm64 - - name: Setup Docker Buildx id: buildx uses: docker/setup-buildx-action@v3 @@ -80,13 +76,11 @@ jobs: image=moby/buildkit:master network=host buildkitd-flags: "--debug --oci-worker-gc=false" - - name: Login to DockerHub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_PASS }} - - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: @@ -95,7 +89,6 @@ jobs: # password: ${{ secrets.GITHUB_TOKEN }} username: ${{ secrets.PACKAGE_USER }} password: ${{ secrets.PACKAGE_TOKEN }} - - name: Build and Publish id: build_and_publish uses: ./.github/actions/docker-build @@ -103,7 +96,6 @@ jobs: target: ${{ inputs.target }} platforms: ${{ inputs.platforms }} builder: ${{ steps.buildx.outputs.name }} - - name: Scan the Docker image if: startsWith( github.ref, 'refs/tags/') uses: ./.github/actions/scan-docker-image @@ -115,7 +107,6 @@ jobs: if: github.ref == 'refs/heads/main' || startsWith( github.ref, 'refs/tags/') steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/notify-slack with: author_name: ${{ inputs.target }} image build diff --git a/.github/workflows/_release-pr.yml b/.github/workflows/_release-pr.yml index 369813b220a..8c99bca87a0 100644 --- a/.github/workflows/_release-pr.yml +++ b/.github/workflows/_release-pr.yml @@ -30,7 +30,7 @@ jobs: dump-contexts-to-log: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context detect-ci-container: @@ -49,7 +49,7 @@ jobs: PREPARE_RELEASE_BRANCH_NAME: prepare/${{ inputs.release_branch_name }} RELEASE_TAG: ${{ inputs.release_tag }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 token: ${{ secrets.DISPATCH_TOKEN }} @@ -58,7 +58,7 @@ jobs: run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - uses: crazy-max/ghaction-import-gpg@v4 + - uses: crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} git_user_signingkey: true diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 5bad8d1dcde..714060383c2 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event.pull_request.merged == true }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context create: @@ -36,7 +36,7 @@ jobs: needs: [dump-contexts-to-log] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 token: ${{ secrets.DISPATCH_TOKEN }} @@ -45,7 +45,7 @@ jobs: run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - uses: crazy-max/ghaction-import-gpg@v4 + - uses: crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} git_user_signingkey: true diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 594b196beb9..0077a70b6b3 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -50,7 +50,7 @@ jobs: make binary/build/zip - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: artifacts-linux path: ./artifacts/ @@ -60,7 +60,7 @@ jobs: needs: - build-linux steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: artifacts-linux path: tmp/linux diff --git a/.github/workflows/chatops.yml b/.github/workflows/chatops.yml index 353f6a64d84..4e3896fccab 100644 --- a/.github/workflows/chatops.yml +++ b/.github/workflows/chatops.yml @@ -225,7 +225,7 @@ jobs: run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - uses: crazy-max/ghaction-import-gpg@v4 + - uses: crazy-max/ghaction-import-gpg@v6 if: steps.check_comments_gen_test.outputs.BOOL_TRIGGERED == 'true' && steps.check_permissions.outputs.EXECUTABLE == 'true' with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} @@ -350,7 +350,7 @@ jobs: run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - uses: crazy-max/ghaction-import-gpg@v4 + - uses: crazy-max/ghaction-import-gpg@v6 if: steps.check_comments_format.outputs.BOOL_TRIGGERED == 'true' && steps.check_permissions.outputs.EXECUTABLE == 'true' with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} diff --git a/.github/workflows/dockers-image-scan.yml b/.github/workflows/dockers-image-scan.yml index 682649ee88c..a2c6c2baf64 100644 --- a/.github/workflows/dockers-image-scan.yml +++ b/.github/workflows/dockers-image-scan.yml @@ -26,72 +26,66 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context - agent-ngt: uses: ./.github/workflows/_docker-image-scan.yaml with: target: agent-ngt - + agent-faiss: + uses: ./.github/workflows/_docker-image-scan.yaml + with: + target: agent-faiss agent-sidecar: uses: ./.github/workflows/_docker-image-scan.yaml with: target: agent-sidecar - ci-container: uses: ./.github/workflows/_docker-image-scan.yaml with: target: ci-container - dev-container: uses: ./.github/workflows/_docker-image-scan.yaml with: target: dev-container - discoverer-k8s: uses: ./.github/workflows/_docker-image-scan.yaml with: target: discoverer-k8s - gateway-lb: uses: ./.github/workflows/_docker-image-scan.yaml with: target: gateway-lb - + gateway-mirror: + uses: ./.github/workflows/_docker-image-scan.yaml + with: + target: gateway-mirror gateway-filter: uses: ./.github/workflows/_docker-image-scan.yaml with: target: gateway-filter - index-correction: uses: ./.github/workflows/_docker-image-scan.yaml with: target: index-correction - index-creation: uses: ./.github/workflows/_docker-image-scan.yaml with: target: index-creation - index-save: uses: ./.github/workflows/_docker-image-scan.yaml with: target: index-save - loadtest: uses: ./.github/workflows/_docker-image-scan.yaml with: target: loadtest - manager-index: uses: ./.github/workflows/_docker-image-scan.yaml with: target: manager-index - operator-helm: uses: ./.github/workflows/_docker-image-scan.yaml with: target: operator/helm - readreplica-rotate: uses: ./.github/workflows/_docker-image-scan.yaml with: diff --git a/.github/workflows/dockers-release-branch-image.yaml b/.github/workflows/dockers-release-branch-image.yaml index 37fd212189a..a7cf64ce15c 100644 --- a/.github/workflows/dockers-release-branch-image.yaml +++ b/.github/workflows/dockers-release-branch-image.yaml @@ -19,29 +19,31 @@ on: branches: - "release/v*.*" - "!release/v*.*.*" - jobs: dump-contexts-to-log: if: github.event.created runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context - agent-ngt: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml with: target: agent-ngt secrets: inherit - + agent-faiss: + needs: [dump-contexts-to-log] + uses: ./.github/workflows/_docker-image.yaml + with: + target: agent-faiss + secrets: inherit agent-sidecar: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml with: target: agent-sidecar secrets: inherit - ci-container: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml @@ -49,56 +51,48 @@ jobs: target: ci-container platforms: linux/amd64 secrets: inherit - discoverer-k8s: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml with: target: discoverer-k8s secrets: inherit - gateway-lb: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml with: target: gateway-lb secrets: inherit - gateway-filter: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml with: target: gateway-filter secrets: inherit - gateway-mirror: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml with: target: gateway-mirror secrets: inherit - index-correction: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml with: target: index-correction secrets: inherit - index-creation: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml with: target: index-creation secrets: inherit - index-save: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml with: target: index-save secrets: inherit - loadtest: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml @@ -106,35 +100,30 @@ jobs: target: loadtest platforms: linux/amd64 secrets: inherit - manager-index: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml with: target: manager-index secrets: inherit - operator-helm: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml with: target: operator/helm secrets: inherit - readreplica-rotate: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml with: target: readreplica-rotate secrets: inherit - benchmark-job: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml with: target: benchmark-job secrets: inherit - benchmark-operator: needs: [dump-contexts-to-log] uses: ./.github/workflows/_docker-image.yaml diff --git a/.github/workflows/e2e-chaos.yaml b/.github/workflows/e2e-chaos.yaml index 7ffd651dc70..6c859053764 100644 --- a/.github/workflows/e2e-chaos.yaml +++ b/.github/workflows/e2e-chaos.yaml @@ -24,12 +24,10 @@ on: pull_request: types: - "labeled" - env: VALUES: .github/helm/values/values-chaos.yaml DATASET: fashion-mnist-784-euclidean.hdf5 INGRESS_PORT: 8081 - jobs: dump-contexts-to-log: if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-chaos' @@ -37,7 +35,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context - agent-failure: name: "E2E chaos test (Agent failure: to test insert/search works even if one of the agents is failing)" needs: [dump-contexts-to-log] @@ -45,17 +42,14 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v4 - - name: Set Git config run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: Setup E2E environment id: setup_e2e uses: ./.github/actions/setup-e2e with: ingress_port: ${{ env.INGRESS_PORT }} - - name: Deploy Vald id: deploy_vald uses: ./.github/actions/e2e-deploy-vald @@ -64,12 +58,10 @@ jobs: helm_extra_options: ${{ steps.setup_e2e.outputs.HELM_EXTRA_OPTIONS }} values: ${{ env.VALUES }} wait_for_selector: app=vald-lb-gateway - - name: Deploy Chaos Mesh uses: ./.github/actions/deploy-chaos-mesh with: helm_extra_options: "--set podChaos.failure.enabled=true" - - name: Run Insert and Search operations run: | make hack/benchmark/assets/dataset/${{ env.DATASET }} @@ -82,7 +74,6 @@ jobs: E2E_SEARCH_COUNT=5000 \ E2E_WAIT_FOR_CREATE_INDEX_DURATION=5m \ e2e/insert/search - random-pod-failure: name: "E2E chaos test (random Pod failure: to test redundancy)" needs: [dump-contexts-to-log] @@ -90,17 +81,14 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v4 - - name: Set Git config run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: Setup E2E environment id: setup_e2e uses: ./.github/actions/setup-e2e with: ingress_port: ${{ env.INGRESS_PORT }} - - name: Deploy Vald id: deploy_vald uses: ./.github/actions/e2e-deploy-vald @@ -109,12 +97,10 @@ jobs: helm_extra_options: ${{ steps.setup_e2e.outputs.HELM_EXTRA_OPTIONS }} values: ${{ env.VALUES }} wait_for_selector: app=vald-lb-gateway - - name: Deploy Chaos Mesh uses: ./.github/actions/deploy-chaos-mesh with: helm_extra_options: "--set podChaos.kill.enabled=true" - - name: Run Insert and Search operations run: | make hack/benchmark/assets/dataset/${{ env.DATASET }} @@ -127,7 +113,6 @@ jobs: E2E_SEARCH_COUNT=5000 \ E2E_WAIT_FOR_CREATE_INDEX_DURATION=5m \ e2e/insert/search - agent-network-partition: name: "E2E chaos test (agent network partition: to test retries)" needs: [dump-contexts-to-log] @@ -135,17 +120,14 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v4 - - name: Set Git config run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: Setup E2E environment id: setup_e2e uses: ./.github/actions/setup-e2e with: ingress_port: ${{ env.INGRESS_PORT }} - - name: Deploy Vald id: deploy_vald uses: ./.github/actions/e2e-deploy-vald @@ -154,12 +136,10 @@ jobs: helm_extra_options: ${{ steps.setup_e2e.outputs.HELM_EXTRA_OPTIONS }} values: ${{ env.VALUES }} wait_for_selector: app=vald-lb-gateway - - name: Deploy Chaos Mesh uses: ./.github/actions/deploy-chaos-mesh with: helm_extra_options: "--set networkChaos.partition.enabled=true" - - name: Run Insert and Search operations run: | make hack/benchmark/assets/dataset/${{ env.DATASET }} @@ -172,7 +152,6 @@ jobs: E2E_SEARCH_COUNT=10000 \ E2E_WAIT_FOR_CREATE_INDEX_DURATION=2m \ e2e/insert/search - clusterwide-network-bandwidth: name: "E2E chaos test (network bandwidth: to test it works properly under bandwidth limitation)" needs: [dump-contexts-to-log] @@ -180,17 +159,14 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v4 - - name: Set Git config run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: Setup E2E environment id: setup_e2e uses: ./.github/actions/setup-e2e with: ingress_port: ${{ env.INGRESS_PORT }} - - name: Deploy Vald id: deploy_vald uses: ./.github/actions/e2e-deploy-vald @@ -199,12 +175,10 @@ jobs: helm_extra_options: ${{ steps.setup_e2e.outputs.HELM_EXTRA_OPTIONS }} values: ${{ env.VALUES }} wait_for_selector: app=vald-lb-gateway - - name: Deploy Chaos Mesh uses: ./.github/actions/deploy-chaos-mesh with: helm_extra_options: "--set networkChaos.bandwidth.enabled=true" - - name: Run Insert and Search operations run: | make hack/benchmark/assets/dataset/${{ env.DATASET }} @@ -216,7 +190,6 @@ jobs: E2E_INSERT_COUNT=5000 \ E2E_WAIT_FOR_CREATE_INDEX_DURATION=5m \ e2e/insert/search - slack-notification: name: "Slack notification" if: startsWith( github.ref, 'refs/tags/') @@ -228,7 +201,6 @@ jobs: - random-pod-failure steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/notify-slack with: author_name: E2E Chaos test diff --git a/.github/workflows/e2e-code-bench-agent.yaml b/.github/workflows/e2e-code-bench-agent.yaml index 659ef33ed3f..3cc73215e03 100644 --- a/.github/workflows/e2e-code-bench-agent.yaml +++ b/.github/workflows/e2e-code-bench-agent.yaml @@ -77,7 +77,7 @@ jobs: DATASET_ARGS=${{ env.DATASET_ARGS }} make bench/agent/sequential/grpc - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: agent-sequential-grpc path: | @@ -109,7 +109,7 @@ jobs: DATASET_ARGS=${{ env.DATASET_ARGS }} make bench/agent/stream - name: Upload artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: agent-stream path: | diff --git a/.github/workflows/e2e-max-dim.yml b/.github/workflows/e2e-max-dim.yml index ed913b80390..97cc0b6ea15 100644 --- a/.github/workflows/e2e-max-dim.yml +++ b/.github/workflows/e2e-max-dim.yml @@ -24,7 +24,6 @@ on: pull_request: types: - "labeled" - jobs: dump-contexts-to-log: if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-max-dim' @@ -32,24 +31,19 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context - e2e-max-dimension-insert: name: "E2E test (Max Dimension Insert: skip strict exist check)" needs: [dump-contexts-to-log] runs-on: ubuntu-latest timeout-minutes: 60 - steps: - uses: actions/checkout@v4 - - name: Set Git config run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: Setup E2E environment id: setup_e2e uses: ./.github/actions/setup-e2e - - name: Run E2E MaxDimension run: | go get github.com/vdaas/vald-client-go/v1/payload @@ -100,7 +94,7 @@ jobs: rm ${FILEPATH} echo "removing cluster" - make k8s/vald/delete VERSION="nightly" HELM_VALUES=${VALUES} HELM_EXTRA_OPTIONS="${HELM_EXTRA_OPTIOINS}" + make k8s/vald/delete VERSION=${DEFAULT_IMAGE_TAG} HELM_VALUES=${VALUES} HELM_EXTRA_OPTIONS="${HELM_EXTRA_OPTIOINS}" done echo "MAX_BIT=${BIT}" >> $GITHUB_OUTPUT echo "MAX_BIT=${BIT}" @@ -110,7 +104,6 @@ jobs: WAIT_FOR_TIMEOUT: 29m VALUES: .github/helm/values/values-max-dim.yaml timeout-minutes: 60 - slack-notification: name: "Slack notification" needs: [e2e-max-dimension-insert] @@ -118,7 +111,6 @@ jobs: if: startsWith( github.ref, 'refs/tags/') steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/notify-slack with: author_name: "E2E max dim test" diff --git a/.github/workflows/e2e-profiling.yml b/.github/workflows/e2e-profiling.yml index 2ca061611f0..851e9188313 100644 --- a/.github/workflows/e2e-profiling.yml +++ b/.github/workflows/e2e-profiling.yml @@ -24,10 +24,8 @@ on: pull_request: types: - "labeled" - env: DATASET: fashion-mnist-784-euclidean.hdf5 - jobs: dump-contexts-to-log: if: startsWith( github.ref, 'refs/tags/') || github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-profiling' @@ -35,7 +33,6 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context - e2e-profiling: name: "E2E profiling" needs: [dump-contexts-to-log] @@ -43,15 +40,12 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v4 - - name: Set Git config run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: Setup E2E environment id: setup_e2e uses: ./.github/actions/setup-e2e - - name: Deploy Vald id: deploy_vald uses: ./.github/actions/e2e-deploy-vald @@ -60,13 +54,11 @@ jobs: helm_extra_options: ${{ steps.setup_e2e.outputs.HELM_EXTRA_OPTIONS }} values: .github/helm/values/values-profile.yaml wait_for_selector: app=vald-lb-gateway - - name: Deploy profefe run: | make k8s/metrics/profefe/deploy kubectl patch cronjob kprofefe -p '{"spec": {"schedule": "*/1 * * * *"}}' kubectl wait --for=condition=ready pod -l app=profefe --timeout=300s - - name: Run E2E CRUD continue-on-error: true run: | @@ -86,7 +78,6 @@ jobs: e2e env: POD_NAME: ${{ steps.deploy_vald.outputs.POD_NAME }} - - name: Get profiles run: | mkdir -p profiles @@ -100,24 +91,20 @@ jobs: --output profiles/${svc}-${t}.pb done done - - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: profiles path: profiles/* - - - uses: actions/cache@v2 + - uses: actions/cache@v4 id: cache with: path: ./profiles-main key: ${{ runner.os }}-profiles-main-${{ github.sha }} restore-keys: ${{ runner.os }}-profiles-main- - - name: Install dependencies run: | sudo apt update sudo apt install -y graphviz - - name: Generate graphs run: | tag=$(cat profiles-main/VALD_VERSION || echo "unknown") @@ -140,19 +127,16 @@ jobs: fi done done - - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: graphs path: graphs/* - - name: Update cache if: startsWith( github.ref, 'refs/tags/') run: | mkdir -p profiles-main cp -f profiles/* profiles-main/ cp -f versions/VALD_VERSION profiles-main/ - - name: Upload to vald-ci-images repository if: github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-profiling' run: | @@ -168,7 +152,6 @@ jobs: env: GITHUB_USER: ${{ secrets.DISPATCH_USER }} GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }} - - name: Comment if: github.event.action == 'labeled' && github.event.label.name == 'actions/e2e-profiling' run: | diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index ab0005f4b32..591a4e99ba8 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -46,7 +46,7 @@ jobs: run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - uses: crazy-max/ghaction-import-gpg@v4 + - uses: crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} git_user_signingkey: true diff --git a/.github/workflows/helm-lint.yml b/.github/workflows/helm-lint.yml index 87cac5be5dd..023671c53ee 100644 --- a/.github/workflows/helm-lint.yml +++ b/.github/workflows/helm-lint.yml @@ -18,17 +18,14 @@ on: pull_request: paths: - "charts/**" - jobs: dump-contexts-to-log: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context - detect-ci-container: uses: ./.github/workflows/_detect-ci-container.yml - lint-vald-chart: name: lint for vald chart runs-on: ubuntu-latest @@ -38,23 +35,17 @@ jobs: steps: - name: Check out code. uses: actions/checkout@v4 - - name: set git config run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - uses: ./.github/actions/setup-go - - uses: ./.github/actions/setup-helm - - name: Generate schema for charts/vald run: | make helm/schema/vald - - name: Run lint for charts/vald run: | helm lint charts/vald - lint-vald-helm-operator-chart: name: lint for vald-helm-operator chart runs-on: ubuntu-latest @@ -64,23 +55,17 @@ jobs: steps: - name: Check out code. uses: actions/checkout@v4 - - name: set git config run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - uses: ./.github/actions/setup-go - - uses: ./.github/actions/setup-helm - - name: Generate schema for charts/vald-helm-operator run: | make helm/schema/vald-helm-operator - - name: Run lint for charts/vald-helm-operator run: | helm lint charts/vald-helm-operator - lint-values-schema: name: lint for values schema runs-on: ubuntu-latest @@ -90,23 +75,20 @@ jobs: steps: - name: Check out code. uses: actions/checkout@v4 - - name: set git config run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - uses: ./.github/actions/setup-yq - - uses: ./.github/actions/setup-go - - uses: ./.github/actions/setup-helm - - uses: ./.github/actions/setup-k3d - + with: + agents: 3 + ingress_port: 8081 + options: --kubeconfig-update-default --kubeconfig-switch-context - name: Generate ValdRelease schema run: | make helm/schema/crd/vald - - name: Test to apply run: | kubectl create -f charts/vald-helm-operator/crds/valdrelease.yaml diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index 9e8421a5983..65b5afc4500 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -48,7 +48,7 @@ jobs: run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - uses: crazy-max/ghaction-import-gpg@v4 + - uses: crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} git_user_signingkey: true diff --git a/.github/workflows/issue-metrics.yaml b/.github/workflows/issue-metrics.yaml index 6c40415a2f1..78b5ccfd448 100644 --- a/.github/workflows/issue-metrics.yaml +++ b/.github/workflows/issue-metrics.yaml @@ -19,10 +19,10 @@ on: inputs: time_window: required: false - description: 'Time window for the issue metrics report. e.g. 2021-01-01..2021-01-31. If not set, the previous month will be calculated.' + description: "Time window for the issue metrics report. e.g. 2021-01-01..2021-01-31. If not set, the previous month will be calculated." type: string schedule: - - cron: '3 2 1 * *' + - cron: "3 2 1 * *" permissions: issues: write pull-requests: read @@ -53,10 +53,10 @@ jobs: uses: github/issue-metrics@v2 env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SEARCH_QUERY: 'repo:vdaas/vald is:pr created:${{ env.last_month }}' + SEARCH_QUERY: "repo:vdaas/vald is:pr created:${{ env.last_month }}" HIDE_TIME_TO_ANSWER: true - name: Create issue - uses: peter-evans/create-issue-from-file@v4 + uses: peter-evans/create-issue-from-file@v5 with: title: "Monthly review time metrics report: ${{ env.last_month }}" token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 8e3da0ae8c8..d18aedf1a45 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -16,32 +16,27 @@ name: "Pull Request Labeler" on: - pull_request - jobs: dump-contexts-to-log: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context - triage: name: Triage runs-on: ubuntu-latest if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) }} steps: - - uses: actions/labeler@v4 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} fetch-depth: 0 - - name: Set Git config run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - + - uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" - name: Add labels run: | pr_num=`cat $GITHUB_EVENT_PATH | jq -r ".number"` @@ -95,7 +90,6 @@ jobs: env: REPOSITORY: ${{ github.repository }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - remove-duplication: name: Remove duplication needs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e6129f6fa30..c48b118e00a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: ${{ github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, ':bookmark: :robot: Release') }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context release: @@ -36,7 +36,7 @@ jobs: - dump-contexts-to-log runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 token: ${{ secrets.DISPATCH_TOKEN }} @@ -45,7 +45,7 @@ jobs: run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - uses: crazy-max/ghaction-import-gpg@v4 + - uses: crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} git_user_signingkey: true diff --git a/.github/workflows/reviewdog-markdown.yml b/.github/workflows/reviewdog-markdown.yml index ae4aba63d89..a8c3cda5174 100644 --- a/.github/workflows/reviewdog-markdown.yml +++ b/.github/workflows/reviewdog-markdown.yml @@ -20,24 +20,20 @@ on: paths-ignore: - "apis/docs/v1/docs.md" - "CHANGELOG.md" - jobs: dump-contexts-to-log: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context - languagetool-apis-charts: name: runner / LanguageTool / apis & charts runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set Git config run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: LanguageTool uses: reviewdog/action-languagetool@v1 with: @@ -48,17 +44,14 @@ jobs: language: en-US disabled_rules: "DOUBLE_PUNCTUATION,WORD_CONTAINS_UNDERSCORE,ARROWS,CURRENCY,DASH_RULE,EN_QUOTES" disabled_categories: "TYPOS,TYPOGRAPHY,STYLE,CASING" - languagetool-docs: name: runner / LanguageTool / Docs runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set Git config run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: LanguageTool uses: reviewdog/action-languagetool@v1 with: @@ -69,26 +62,21 @@ jobs: language: en-US disabled_rules: "DOUBLE_PUNCTUATION,WORD_CONTAINS_UNDERSCORE,ARROWS,CURRENCY,DASH_RULE,EN_QUOTES" disabled_categories: "TYPOS,TYPOGRAPHY,STYLE" - textlint: name: runner / textlint runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set Git config run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - name: Setup node/npm - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: "16" - - name: Install textlint run: | make textlint/ci/install - - name: textlint-github-pr-review uses: tsuyoshicho/action-textlint@v3 with: diff --git a/.github/workflows/semver-major-minor.yaml b/.github/workflows/semver-major-minor.yaml index 70791df5fd0..d4a36baaf2a 100644 --- a/.github/workflows/semver-major-minor.yaml +++ b/.github/workflows/semver-major-minor.yaml @@ -25,7 +25,7 @@ jobs: dump-contexts-to-log: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context semver-auto: @@ -36,7 +36,7 @@ jobs: RELEASE_TAG: ${{ steps.upgrade_semver.outputs.RELEASE_TAG }} RELEASE: ${{ steps.setup_for_release.outputs.RELEASE }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 token: ${{ secrets.DISPATCH_TOKEN }} diff --git a/.github/workflows/semver-patch.yaml b/.github/workflows/semver-patch.yaml index 9164d0dbde9..f42c3c99490 100644 --- a/.github/workflows/semver-patch.yaml +++ b/.github/workflows/semver-patch.yaml @@ -24,7 +24,7 @@ jobs: dump-contexts-to-log: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/dump-context semver-auto: @@ -34,7 +34,7 @@ jobs: RELEASE_TAG: ${{ steps.upgrade_semver.outputs.RELEASE_TAG }} RELEASE: ${{ steps.upgrade_semver.outputs.RELEASE }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/update-pull-request-and-issue-template.yml b/.github/workflows/update-pull-request-and-issue-template.yml index 872c7abbd16..cd182f97a54 100644 --- a/.github/workflows/update-pull-request-and-issue-template.yml +++ b/.github/workflows/update-pull-request-and-issue-template.yml @@ -42,7 +42,7 @@ jobs: run: | git config --global --add safe.directory ${GITHUB_WORKSPACE} - - uses: crazy-max/ghaction-import-gpg@v4 + - uses: crazy-max/ghaction-import-gpg@v6 with: gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} git_user_signingkey: true diff --git a/.gitignore b/.gitignore index 5bff670ff2f..ea7be3983c7 100755 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,7 @@ hack/go.mod.default3 # for mac .DS_Store +.nvimlog # for nvim .nvimlog diff --git a/.golangci.yml b/.golangci.yml index e386305c02d..1c34cc92026 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -122,7 +122,6 @@ linters: # - whitespace # - wrapcheck # - wslissues: - # - zerologlint exclude-use-default: false exclude-rules: - path: _test\.go diff --git a/Makefile b/Makefile index 103b2b8508a..90343f8f981 100644 --- a/Makefile +++ b/Makefile @@ -59,8 +59,10 @@ TEST_NOT_IMPL_PLACEHOLDER = NOT IMPLEMENTED BELOW TEMP_DIR := $(eval TEMP_DIR := $(shell mktemp -d))$(TEMP_DIR) -OPERATOR_SDK_VERSION := $(eval OPERATOR_SDK_VERSION := $(shell cat versions/OPERATOR_SDK_VERSION))$(OPERATOR_SDK_VERSION) +NGT_REPO = github.com/yahoojapan/NGT +BUF_VERSION := $(eval BUF_VERSION := $(shell cat versions/BUF_VERSION))$(BUF_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) 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) @@ -68,6 +70,8 @@ JAEGER_OPERATOR_VERSION := $(eval JAEGER_OPERATOR_VERSION := $(shell cat versi KIND_VERSION := $(eval KIND_VERSION := $(shell cat versions/KIND_VERSION))$(KIND_VERSION) KUBECTL_VERSION := $(eval KUBECTL_VERSION := $(shell cat versions/KUBECTL_VERSION))$(KUBECTL_VERSION) KUBELINTER_VERSION := $(eval KUBELINTER_VERSION := $(shell cat versions/KUBELINTER_VERSION))$(KUBELINTER_VERSION) +NGT_VERSION := $(eval NGT_VERSION := $(shell cat versions/NGT_VERSION))$(NGT_VERSION) +OPERATOR_SDK_VERSION := $(eval OPERATOR_SDK_VERSION := $(shell cat versions/OPERATOR_SDK_VERSION))$(OPERATOR_SDK_VERSION) OTEL_OPERATOR_VERSION := $(eval OTEL_OPERATOR_VERSION := $(shell cat versions/OTEL_OPERATOR_VERSION))$(OTEL_OPERATOR_VERSION) PROMETHEUS_STACK_VERSION := $(eval PROMETHEUS_STACK_VERSION := $(shell cat versions/PROMETHEUS_STACK_VERSION))$(PROMETHEUS_STACK_VERSION) PROTOBUF_VERSION := $(eval PROTOBUF_VERSION := $(shell cat versions/PROTOBUF_VERSION))$(PROTOBUF_VERSION) @@ -197,29 +201,30 @@ PROTO_PATHS = \ # - internal/test/comparator # - internal/test/mock GO_SOURCES = $(eval GO_SOURCES := $(shell find \ - ./cmd \ - ./hack \ - ./internal \ - ./pkg \ - -not -path './cmd/cli/*' \ - -not -path './internal/core/algorithm/ngt/*' \ - -not -path './internal/compress/gob/*' \ - -not -path './internal/compress/gzip/*' \ - -not -path './internal/compress/lz4/*' \ - -not -path './internal/compress/zstd/*' \ - -not -path './internal/db/storage/blob/s3/sdk/s3/*' \ - -not -path './internal/db/rdb/mysql/dbr/*' \ - -not -path './internal/test/comparator/*' \ - -not -path './internal/test/mock/*' \ - -not -path './hack/benchmark/internal/client/ngtd/*' \ - -not -path './hack/benchmark/internal/starter/agent/*' \ - -not -path './hack/benchmark/internal/starter/external/*' \ - -not -path './hack/benchmark/internal/starter/gateway/*' \ - -not -path './hack/gorules/*' \ - -not -path './hack/license/*' \ - -not -path './hack/swagger/*' \ - -not -path './hack/tools/*' \ - -not -path './tests/*' \ + $(ROOTDIR)/cmd \ + $(ROOTDIR)/hack \ + $(ROOTDIR)/internal \ + $(ROOTDIR)/pkg \ + -not -path '$(ROOTDIR)/cmd/cli/*' \ + -not -path '$(ROOTDIR)/internal/core/algorithm/ngt/*' \ + -not -path '$(ROOTDIR)/internal/core/algorithm/faiss/*' \ + -not -path '$(ROOTDIR)/internal/compress/gob/*' \ + -not -path '$(ROOTDIR)/internal/compress/gzip/*' \ + -not -path '$(ROOTDIR)/internal/compress/lz4/*' \ + -not -path '$(ROOTDIR)/internal/compress/zstd/*' \ + -not -path '$(ROOTDIR)/internal/db/storage/blob/s3/sdk/s3/*' \ + -not -path '$(ROOTDIR)/internal/db/rdb/mysql/dbr/*' \ + -not -path '$(ROOTDIR)/internal/test/comparator/*' \ + -not -path '$(ROOTDIR)/internal/test/mock/*' \ + -not -path '$(ROOTDIR)/hack/benchmark/internal/client/ngtd/*' \ + -not -path '$(ROOTDIR)/hack/benchmark/internal/starter/agent/*' \ + -not -path '$(ROOTDIR)/hack/benchmark/internal/starter/external/*' \ + -not -path '$(ROOTDIR)/hack/benchmark/internal/starter/gateway/*' \ + -not -path '$(ROOTDIR)/hack/gorules/*' \ + -not -path '$(ROOTDIR)/hack/license/*' \ + -not -path '$(ROOTDIR)/hack/swagger/*' \ + -not -path '$(ROOTDIR)/hack/tools/*' \ + -not -path '$(ROOTDIR)/tests/*' \ -type f \ -name '*.go' \ -not -regex '.*options?\.go' \ @@ -227,29 +232,30 @@ GO_SOURCES = $(eval GO_SOURCES := $(shell find \ -not -name '*_mock.go' \ -not -name 'doc.go'))$(GO_SOURCES) GO_OPTION_SOURCES = $(eval GO_OPTION_SOURCES := $(shell find \ - ./cmd \ - ./hack \ - ./internal \ - ./pkg \ - -not -path './cmd/cli/*' \ - -not -path './internal/core/algorithm/ngt/*' \ - -not -path './internal/compress/gob/*' \ - -not -path './internal/compress/gzip/*' \ - -not -path './internal/compress/lz4/*' \ - -not -path './internal/compress/zstd/*' \ - -not -path './internal/db/storage/blob/s3/sdk/s3/*' \ - -not -path './internal/db/rdb/mysql/dbr/*' \ - -not -path './internal/test/comparator/*' \ - -not -path './internal/test/mock/*' \ - -not -path './hack/benchmark/internal/client/ngtd/*' \ - -not -path './hack/benchmark/internal/starter/agent/*' \ - -not -path './hack/benchmark/internal/starter/external/*' \ - -not -path './hack/benchmark/internal/starter/gateway/*' \ - -not -path './hack/gorules/*' \ - -not -path './hack/license/*' \ - -not -path './hack/swagger/*' \ - -not -path './hack/tools/*' \ - -not -path './tests/*' \ + $(ROOTDIR)/cmd \ + $(ROOTDIR)/hack \ + $(ROOTDIR)/internal \ + $(ROOTDIR)/pkg \ + -not -path '$(ROOTDIR)/cmd/cli/*' \ + -not -path '$(ROOTDIR)/internal/core/algorithm/ngt/*' \ + -not -path '$(ROOTDIR)/internal/core/algorithm/faiss/*' \ + -not -path '$(ROOTDIR)/internal/compress/gob/*' \ + -not -path '$(ROOTDIR)/internal/compress/gzip/*' \ + -not -path '$(ROOTDIR)/internal/compress/lz4/*' \ + -not -path '$(ROOTDIR)/internal/compress/zstd/*' \ + -not -path '$(ROOTDIR)/internal/db/storage/blob/s3/sdk/s3/*' \ + -not -path '$(ROOTDIR)/internal/db/rdb/mysql/dbr/*' \ + -not -path '$(ROOTDIR)/internal/test/comparator/*' \ + -not -path '$(ROOTDIR)/internal/test/mock/*' \ + -not -path '$(ROOTDIR)/hack/benchmark/internal/client/ngtd/*' \ + -not -path '$(ROOTDIR)/hack/benchmark/internal/starter/agent/*' \ + -not -path '$(ROOTDIR)/hack/benchmark/internal/starter/external/*' \ + -not -path '$(ROOTDIR)/hack/benchmark/internal/starter/gateway/*' \ + -not -path '$(ROOTDIR)/hack/gorules/*' \ + -not -path '$(ROOTDIR)/hack/license/*' \ + -not -path '$(ROOTDIR)/hack/swagger/*' \ + -not -path '$(ROOTDIR)/hack/tools/*' \ + -not -path '$(ROOTDIR)/tests/*' \ -type f \ -regex '.*options?\.go' \ -not -name '*_test.go' \ @@ -257,7 +263,7 @@ GO_OPTION_SOURCES = $(eval GO_OPTION_SOURCES := $(shell find \ -not -name 'doc.go'))$(GO_OPTION_SOURCES) GO_SOURCES_INTERNAL = $(eval GO_SOURCES_INTERNAL := $(shell find \ - ./internal \ + $(ROOTDIR)/internal \ -type f \ -name '*.go' \ -not -name '*_test.go' \ @@ -343,32 +349,33 @@ all: clean deps .PHONY: clean ## clean -clean: - rm -rf vendor - go clean -cache -modcache -testcache -i -r - mv ./apis/grpc/v1/vald/vald.go $(TEMP_DIR)/vald.go - mv ./apis/grpc/v1/agent/core/agent.go $(TEMP_DIR)/agent.go - mv ./apis/grpc/v1/payload/interface.go $(TEMP_DIR)/interface.go +clean: \ + clean-generated \ + proto/all \ + deps \ + format + +.PHONY: clean-generated +## clean generated files +clean-generated: + mv $(ROOTDIR)/apis/grpc/v1/vald/vald.go $(TEMP_DIR)/vald.go + mv $(ROOTDIR)/apis/grpc/v1/agent/core/agent.go $(TEMP_DIR)/agent.go + mv $(ROOTDIR)/apis/grpc/v1/payload/interface.go $(TEMP_DIR)/interface.go rm -rf \ - /go/pkg \ - ./*.log \ - ./*.svg \ - ./apis/docs \ - ./apis/swagger \ - ./apis/grpc \ - ./bench \ - ./pprof \ - ./libs \ - $(GOCACHE) \ - ./go.sum \ - ./go.mod - mkdir -p ./apis/grpc/v1/vald - mv $(TEMP_DIR)/vald.go ./apis/grpc/v1/vald/vald.go - mkdir -p ./apis/grpc/v1/agent/core - mv $(TEMP_DIR)/agent.go ./apis/grpc/v1/agent/core/agent.go - mkdir -p ./apis/grpc/v1/payload - mv $(TEMP_DIR)/interface.go ./apis/grpc/v1/payload/interface.go - cp ./hack/go.mod.default ./go.mod + $(ROOTDIR)/*.log \ + $(ROOTDIR)/*.svg \ + $(ROOTDIR)/apis/docs \ + $(ROOTDIR)/apis/swagger \ + $(ROOTDIR)/apis/grpc \ + $(ROOTDIR)/bench \ + $(ROOTDIR)/pprof \ + $(ROOTDIR)/libs + mkdir -p $(ROOTDIR)/apis/grpc/v1/vald + mv $(TEMP_DIR)/vald.go $(ROOTDIR)/apis/grpc/v1/vald/vald.go + mkdir -p $(ROOTDIR)/apis/grpc/v1/agent/core + mv $(TEMP_DIR)/agent.go $(ROOTDIR)/apis/grpc/v1/agent/core/agent.go + mkdir -p $(ROOTDIR)/apis/grpc/v1/payload + mv $(TEMP_DIR)/interface.go $(ROOTDIR)/apis/grpc/v1/payload/interface.go .PHONY: license ## add license to files @@ -397,13 +404,15 @@ tools/install: \ .PHONY: update ## update deps, license, and run golines, gofumpt, goimports update: \ - clean \ + clean-generated \ update/libs \ + update/actions \ proto/all \ deps \ update/template \ format \ - go/deps + go/deps \ + rust/deps .PHONY: format ## format go codes @@ -422,10 +431,10 @@ format/go: \ gofumpt/install \ strictgoimports/install \ goimports/install - find ./ -type d -name .git -prune -o -type f -regex '.*[^\.pb]\.go' -print | xargs $(GOBIN)/golines -w -m $(GOLINES_MAX_WIDTH) - find ./ -type d -name .git -prune -o -type f -regex '.*[^\.pb]\.go' -print | xargs $(GOBIN)/gofumpt -w - find ./ -type d -name .git -prune -o -type f -regex '.*[^\.pb]\.go' -print | xargs $(GOBIN)/strictgoimports -w - find ./ -type d -name .git -prune -o -type f -regex '.*\.go' -print | xargs $(GOBIN)/goimports -w + find $(ROOTDIR)/ -type d -name .git -prune -o -type f -regex '.*[^\.pb]\.go' -print | xargs $(GOBIN)/golines -w -m $(GOLINES_MAX_WIDTH) + find $(ROOTDIR)/ -type d -name .git -prune -o -type f -regex '.*[^\.pb]\.go' -print | xargs $(GOBIN)/gofumpt -w + find $(ROOTDIR)/ -type d -name .git -prune -o -type f -regex '.*[^\.pb]\.go' -print | xargs $(GOBIN)/strictgoimports -w + find $(ROOTDIR)/ -type d -name .git -prune -o -type f -regex '.*\.go' -print | xargs $(GOBIN)/goimports -w .PHONY: format/go/test ## run golines, gofumpt, goimports for go test files @@ -484,7 +493,9 @@ deps/install: \ strictgoimports/install \ goimports/install \ prettier/install \ - go/deps + go/deps \ + go/example/deps \ + rust/deps .PHONY: version ## print vald version @@ -545,6 +556,20 @@ ngt/install: /usr/local/include/NGT/Capi.h rm -rf $(TEMP_DIR)/NGT-$(NGT_VERSION) ldconfig +.PHONY: faiss/install +## install Faiss +faiss/install: /usr/local/lib/libfaiss.so +/usr/local/lib/libfaiss.so: + curl -LO https://github.com/facebookresearch/faiss/archive/v$(FAISS_VERSION).tar.gz + tar zxf v$(FAISS_VERSION).tar.gz -C $(TEMP_DIR)/ + cd $(TEMP_DIR)/faiss-$(FAISS_VERSION) && \ + cmake -DFAISS_ENABLE_GPU=OFF -DFAISS_ENABLE_PYTHON=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON -B build . && \ + make -C build -j faiss && \ + make -C build install + rm -rf v$(FAISS_VERSION).tar.gz + rm -rf $(TEMP_DIR)/faiss-$(FAISS_VERSION) + ldconfig + .PHONY: lint ## run lints lint: vet @@ -577,6 +602,7 @@ changelog/next/print: sed -e 's/{{ version }}/$(VERSION)/g' @echo "$$BODY" +include Makefile.d/actions.mk include Makefile.d/bench.mk include Makefile.d/build.mk include Makefile.d/client.mk diff --git a/Makefile.d/actions.mk b/Makefile.d/actions.mk new file mode 100644 index 00000000000..dbec6376240 --- /dev/null +++ b/Makefile.d/actions.mk @@ -0,0 +1,27 @@ +# +# Copyright (C) 2019-2024 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +ACTIONS_LIST := $(eval ACTIONS_LIST := $(shell grep -r -h -o -P "(?<=- uses: ).*?(?=@)" $(ROOTDIR)/.github/ | sort | uniq))$(ACTIONS_LIST) + +.PHONY: list/actions +## show variation of external actions +list/actions: + @echo $(ACTIONS_LIST) + +.PHONY: update/actions +# update github actions version +update/actions: + @$(call update-github-actions, $(ACTIONS_LIST)) diff --git a/Makefile.d/build.mk b/Makefile.d/build.mk index e12219a9430..1776f41df9d 100644 --- a/Makefile.d/build.mk +++ b/Makefile.d/build.mk @@ -18,6 +18,7 @@ ## build all binaries binary/build: \ cmd/agent/core/ngt/ngt \ + cmd/agent/core/faiss/faiss \ cmd/agent/sidecar/sidecar \ cmd/discoverer/k8s/discoverer \ cmd/gateway/lb/lb \ @@ -51,7 +52,43 @@ cmd/agent/core/ngt/ngt: \ -X '$(GOPKG)/internal/info.GoOS=$(GOOS)' \ -X '$(GOPKG)/internal/info.GoArch=$(GOARCH)' \ -X '$(GOPKG)/internal/info.CGOEnabled=$(CGO_ENABLED)' \ - -X '$(GOPKG)/internal/info.NGTVersion=$(NGT_VERSION)' \ + -X '$(GOPKG)/internal/info.AlgorithmInfo=NGT-$(NGT_VERSION)' \ + -X '$(GOPKG)/internal/info.BuildCPUInfoFlags=$(CPU_INFO_FLAGS)' \ + -buildid=" \ + -mod=readonly \ + -modcacherw \ + -a \ + -tags "cgo osusergo netgo static_build" \ + -trimpath \ + -o $@ \ + $(dir $@)main.go + $@ -version + +cmd/agent/core/faiss/faiss: \ + faiss/install \ + $(GO_SOURCES_INTERNAL) \ + $(PBGOS) \ + $(shell find $(ROOTDIR)/cmd/agent/core/faiss -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') \ + $(shell find $(ROOTDIR)/pkg/agent/core/faiss $(ROOTDIR)/pkg/agent/internal -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') + CFLAGS="$(CFLAGS)" \ + CXXFLAGS="$(CXXFLAGS)" \ + CGO_ENABLED=1 \ + CGO_CXXFLAGS="-g -Ofast -march=native" \ + CGO_FFLAGS="-g -Ofast -march=native" \ + CGO_LDFLAGS="-g -Ofast -march=native" \ + GO111MODULE=on \ + GOPRIVATE=$(GOPRIVATE) \ + go build \ + --ldflags "-w -linkmode 'external' \ + -extldflags '-fPIC -pthread -fopenmp -std=gnu++20 -lstdc++ -lm -z relro -z now $(EXTLDFLAGS)' \ + -X '$(GOPKG)/internal/info.Version=$(VERSION)' \ + -X '$(GOPKG)/internal/info.GitCommit=$(GIT_COMMIT)' \ + -X '$(GOPKG)/internal/info.BuildTime=$(DATETIME)' \ + -X '$(GOPKG)/internal/info.GoVersion=$(GO_VERSION)' \ + -X '$(GOPKG)/internal/info.GoOS=$(GOOS)' \ + -X '$(GOPKG)/internal/info.GoArch=$(GOARCH)' \ + -X '$(GOPKG)/internal/info.CGOEnabled=$${CGO_ENABLED}' \ + -X '$(GOPKG)/internal/info.FaissVersion=$(FAISS_VERSION)' \ -X '$(GOPKG)/internal/info.BuildCPUInfoFlags=$(CPU_INFO_FLAGS)' \ -buildid=" \ -mod=readonly \ @@ -182,8 +219,8 @@ cmd/gateway/filter/filter: \ cmd/gateway/mirror/mirror: \ $(GO_SOURCES_INTERNAL) \ $(PBGOS) \ - $(shell find ./cmd/gateway/mirror -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') \ - $(shell find ./pkg/gateway/mirror -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') + $(shell find $(ROOTDIR)/cmd/gateway/mirror -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') \ + $(shell find $(ROOTDIR)/pkg/gateway/mirror -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') CGO_ENABLED=0 \ GO111MODULE=on \ GOPRIVATE=$(GOPRIVATE) \ @@ -355,8 +392,8 @@ cmd/index/job/readreplica/rotate/readreplica-rotate: \ cmd/tools/benchmark/job/job: \ $(GO_SOURCES_INTERNAL) \ $(PBGOS) \ - $(shell find ./cmd/tools/benchmark/job -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') \ - $(shell find ./pkg/tools/benchmark/job -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') + $(shell find $(ROOTDIR)/cmd/tools/benchmark/job -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') \ + $(shell find $(ROOTDIR)/pkg/tools/benchmark/job -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') CGO_ENABLED=$(CGO_ENABLED) \ GO111MODULE=on \ GOPRIVATE=$(GOPRIVATE) \ @@ -385,8 +422,8 @@ cmd/tools/benchmark/job/job: \ cmd/tools/benchmark/operator/operator: \ $(GO_SOURCES_INTERNAL) \ $(PBGOS) \ - $(shell find ./cmd/tools/benchmark/operator -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') \ - $(shell find ./pkg/tools/benchmark/operator -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') + $(shell find $(ROOTDIR)/cmd/tools/benchmark/operator -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') \ + $(shell find $(ROOTDIR)/pkg/tools/benchmark/operator -type f -name '*.go' -not -name '*_test.go' -not -name 'doc.go') CFLAGS="$(CFLAGS)" \ CXXFLAGS="$(CXXFLAGS)" \ CGO_ENABLED=1 \ @@ -414,6 +451,7 @@ cmd/tools/benchmark/operator/operator: \ ## build all binaries and zip them binary/build/zip: \ artifacts/vald-agent-ngt-$(GOOS)-$(GOARCH).zip \ + artifacts/vald-agent-faiss-$(GOOS)-$(GOARCH).zip \ artifacts/vald-agent-sidecar-$(GOOS)-$(GOARCH).zip \ artifacts/vald-discoverer-k8s-$(GOOS)-$(GOARCH).zip \ artifacts/vald-lb-gateway-$(GOOS)-$(GOARCH).zip \ @@ -424,6 +462,10 @@ artifacts/vald-agent-ngt-$(GOOS)-$(GOARCH).zip: cmd/agent/core/ngt/ngt $(call mkdir, $(dir $@)) zip --junk-paths $@ $< +artifacts/vald-agent-faiss-$(GOOS)-$(GOARCH).zip: cmd/agent/core/faiss/faiss + $(call mkdir, $(dir $@)) + zip --junk-paths $@ $< + artifacts/vald-agent-sidecar-$(GOOS)-$(GOARCH).zip: cmd/agent/sidecar/sidecar $(call mkdir, $(dir $@)) zip --junk-paths $@ $< diff --git a/Makefile.d/dependencies.mk b/Makefile.d/dependencies.mk index 1969ff2756f..748156b97d0 100644 --- a/Makefile.d/dependencies.mk +++ b/Makefile.d/dependencies.mk @@ -18,6 +18,7 @@ ## update vald libraries including tools update/libs: \ update/chaos-mesh \ + update/faiss \ update/go \ update/golangci-lint \ update/helm \ @@ -78,6 +79,11 @@ go/example/deps: cp $(ROOTDIR)/example/client/go.mod.default $(ROOTDIR)/example/client/go.mod cd $(ROOTDIR)/example/client && GOPRIVATE=$(GOPRIVATE) go mod tidy && cd - +.PHONY: rust/deps +## install Rust package dependencies +rust/deps: + cd $(ROOTDIR)/rust && cargo update && cd - + .PHONY: update/chaos-mesh ## update chaos-mesh version update/chaos-mesh: @@ -86,7 +92,14 @@ update/chaos-mesh: .PHONY: update/k3s ## update k3s version update/k3s: - curl --silent https://hub.docker.com/v2/repositories/rancher/k3s/tags | jq -r '.results[].name' | grep -E '.*-k3s.$$' | grep -v rc | sort -V | tail -n 1 > $(ROOTDIR)/versions/K3S_VERSION + @{ \ + RESULT=$$(curl --silent https://hub.docker.com/v2/repositories/rancher/k3s/tags | jq -r '.results[].name' | grep -E '.*-k3s($$|.)' | grep -v rc | sort -V | tail -n 1); \ + if [ -n "$$RESULT" ]; then \ + echo $$RESULT > $(ROOTDIR)/versions/K3S_VERSION; \ + else \ + echo "No version found" >&2; \ + fi \ + } .PHONY: update/go ## update go version @@ -106,7 +119,7 @@ update/helm: .PHONY: update/helm-operator ## update helm-operator version update/helm-operator: - curl --silent https://quay.io/api/v1/repository/operator-framework/helm-operator | jq -r '.tags'|rg name | grep -v master |grep -v latest | grep -v rc | head -1 | sed -e 's/.*\"name\":\ \"\(.*\)\",/\1/g' > $(ROOTDIR)/versions/OPERATOR_SDK_VERSION + curl --silent https://quay.io/api/v1/repository/operator-framework/helm-operator | jq -r '.tags'| grep name | grep -v master |grep -v latest | grep -v rc | head -1 | sed -e 's/.*\"name\":\ \"\(.*\)\",/\1/g' > $(ROOTDIR)/versions/OPERATOR_SDK_VERSION .PHONY: update/helm-docs ## update helm-docs version @@ -153,6 +166,11 @@ update/kube-linter: update/ngt: curl --silent https://api.github.com/repos/yahoojapan/NGT/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' | sed 's/v//g' > $(ROOTDIR)/versions/NGT_VERSION +.PHONY: update/faiss +## update facebookresearch/faiss version +update/faiss: + curl --silent https://api.github.com/repos/facebookresearch/faiss/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' | sed 's/v//g' > $(ROOTDIR)/versions/FAISS_VERSION + .PHONY: update/reviewdog ## update reviewdog version update/reviewdog: diff --git a/Makefile.d/docker.mk b/Makefile.d/docker.mk index 922275438f5..4f9dcc6af72 100644 --- a/Makefile.d/docker.mk +++ b/Makefile.d/docker.mk @@ -17,6 +17,7 @@ ## build all docker images docker/build: \ docker/build/agent-ngt \ + docker/build/agent-faiss \ docker/build/agent-sidecar \ docker/build/discoverer-k8s \ docker/build/gateway-lb \ @@ -85,6 +86,22 @@ docker/build/agent-ngt: IMAGE=$(AGENT_IMAGE) \ docker/build/image +.PHONY: docker/name/agent-faiss +docker/name/agent-faiss: + @echo "$(ORG)/$(AGENT_IMAGE)" + +.PHONY: docker/build/agent-faiss +## build agent-faiss image +docker/build/agent-faiss: + $(DOCKER) build \ + $(DOCKER_OPTS) \ + -f dockers/agent/core/faiss/Dockerfile \ + -t $(ORG)/vald-agent-faiss:$(TAG) . \ + --build-arg GO_VERSION=$(GO_VERSION) \ + --build-arg DISTROLESS_IMAGE=$(DISTROLESS_IMAGE) \ + --build-arg DISTROLESS_IMAGE_TAG=$(DISTROLESS_IMAGE_TAG) \ + --build-arg MAINTAINER=$(MAINTAINER) + .PHONY: docker/name/agent-sidecar docker/name/agent-sidecar: @echo "$(ORG)/$(AGENT_SIDECAR_IMAGE)" diff --git a/Makefile.d/e2e.mk b/Makefile.d/e2e.mk index 544ad5d9f0b..f2745f84a4a 100644 --- a/Makefile.d/e2e.mk +++ b/Makefile.d/e2e.mk @@ -19,6 +19,16 @@ e2e: $(call run-e2e-crud-test,-run TestE2EStandardCRUD) +.PHONY: e2e/faiss +## run e2e/faiss +e2e/faiss: + #$(call run-e2e-crud-faiss-test,-run TestE2EInsertOnly) + #$(call run-e2e-crud-faiss-test,-run TestE2ESearchOnly) + #$(call run-e2e-crud-faiss-test,-run TestE2EUpdateOnly) + #$(call run-e2e-crud-faiss-test,-run TestE2ERemoveOnly) + #$(call run-e2e-crud-faiss-test,-run TestE2EInsertAndSearch) + $(call run-e2e-crud-faiss-test,-run TestE2EStandardCRUD) + .PHONY: e2e/skip ## run e2e with skip exists operation e2e/skip: diff --git a/Makefile.d/functions.mk b/Makefile.d/functions.mk index 2306dc04be7..cd15298e0f7 100644 --- a/Makefile.d/functions.mk +++ b/Makefile.d/functions.mk @@ -49,7 +49,7 @@ define go-vet cat <(GOARCH=amd64 go vet $(ROOTDIR)/...) \ <(GOARCH=386 go vet $(ROOTDIR)/...) \ <(GOARCH=arm go vet $(ROOTDIR)/...) \ - | rg -v "Mutex" | sort | uniq + | grep -v "Mutex" | sort | uniq endef @@ -91,6 +91,28 @@ define run-e2e-crud-test -kubeconfig=$(KUBECONFIG) endef +define run-e2e-crud-faiss-test + go test \ + -race \ + -mod=readonly \ + $1 \ + -v $(ROOTDIR)/tests/e2e/crud/crud_faiss_test.go \ + -tags "e2e" \ + -timeout $(E2E_TIMEOUT) \ + -host=$(E2E_BIND_HOST) \ + -port=$(E2E_BIND_PORT) \ + -dataset=$(ROOTDIR)/hack/benchmark/assets/dataset/$(E2E_DATASET_NAME).hdf5 \ + -insert-num=$(E2E_INSERT_COUNT) \ + -search-num=$(E2E_SEARCH_COUNT) \ + -update-num=$(E2E_UPDATE_COUNT) \ + -remove-num=$(E2E_REMOVE_COUNT) \ + -wait-after-insert=$(E2E_WAIT_FOR_CREATE_INDEX_DURATION) \ + -portforward=$(E2E_PORTFORWARD_ENABLED) \ + -portforward-pod-name=$(E2E_TARGET_POD_NAME) \ + -portforward-pod-port=$(E2E_TARGET_PORT) \ + -namespace=$(E2E_TARGET_NAMESPACE) +endef + define run-e2e-multi-crud-test GOPRIVATE=$(GOPRIVATE) \ go test \ @@ -208,10 +230,36 @@ define gen-go-option-test-sources endef define gen-vald-crd - mv charts/$1/crds/$2.yaml $(TEMP_DIR)/$2.yaml + if [[ -f $(ROOTDIR)/charts/$1/crds/$2.yaml ]]; then \ + mv $(ROOTDIR)/charts/$1/crds/$2.yaml $(TEMP_DIR)/$2.yaml; \ + fi; GOPRIVATE=$(GOPRIVATE) \ - go run -mod=readonly hack/helm/schema/crd/main.go \ - charts/$1/$3.yaml > $(TEMP_DIR)/$2-spec.yaml + go run -mod=readonly $(ROOTDIR)/hack/helm/schema/crd/main.go \ + $(ROOTDIR)/charts/$3.yaml > $(TEMP_DIR)/$2-spec.yaml $(BINDIR)/yq eval-all 'select(fileIndex==0).spec.versions[0].schema.openAPIV3Schema.properties.spec = select(fileIndex==1).spec | select(fileIndex==0)' \ - $(TEMP_DIR)/$2.yaml $(TEMP_DIR)/$2-spec.yaml > charts/$1/crds/$2.yaml + $(TEMP_DIR)/$2.yaml $(TEMP_DIR)/$2-spec.yaml > $(ROOTDIR)/charts/$1/crds/$2.yaml +endef + +define update-github-actions + @for ACTION_NAME in $1; do \ + if [ -n "$$ACTION_NAME" ]; then \ + FILE_NAME=`echo $$ACTION_NAME | tr '/' '_' | tr '-' '_' | tr '[:lower:]' '[:upper:]'`; \ + if [ -n "$$FILE_NAME" ]; then \ + VERSION=`curl --silent https://api.github.com/repos/$$ACTION_NAME/releases/latest | grep -Po '"tag_name": "\K.*?(?=")' | sed 's/v//g'`;\ + if [ -n "$$VERSION" ]; then \ + echo "updating $$ACTION_NAME version file $$FILE_NAME to $$VERSION"; \ + echo $$VERSION > $(ROOTDIR)/versions/actions/$$FILE_NAME; \ + else \ + VERSION=`cat $(ROOTDIR)/versions/actions/$$FILE_NAME`; \ + echo "No version found for $$ACTION_NAME version file $$FILE_NAME=$$VERSION"; \ + fi; \ + VERSION_PREFIX=`echo $$VERSION | cut -c 1`; \ + find $(ROOTDIR)/.github -type f -exec sed -i "s%$$ACTION_NAME@.*%$$ACTION_NAME@v$$VERSION_PREFIX%g" {} +; \ + else \ + echo "No action version file found for $$ACTION_NAME version file $$FILE_NAME" >&2; \ + fi \ + else \ + echo "No action found for $$ACTION_NAME" >&2; \ + fi \ + done endef diff --git a/Makefile.d/helm.mk b/Makefile.d/helm.mk index 29159bcdc95..0ebb7c78a6b 100644 --- a/Makefile.d/helm.mk +++ b/Makefile.d/helm.mk @@ -80,6 +80,14 @@ charts/vald-readreplica/README.md: \ charts/vald-readreplica/values.yaml helm-docs +.PHONY: helm/schema/all +helm/schema/all: \ + helm/schema/vald \ + helm/schema/vald-helm-operator \ + helm/schema/vald-benchmark-job \ + helm/schema/vald-benchmark-scenario \ + helm/schema/vald-benchmark-operator + .PHONY: helm/schema/vald ## generate json schema for Vald Helm Chart helm/schema/vald: charts/vald/values.schema.json @@ -110,7 +118,7 @@ charts/vald-benchmark-operator/job-values.schema.json: \ GOPRIVATE=$(GOPRIVATE) \ go run -mod=readonly hack/helm/schema/gen/main.go charts/vald-benchmark-operator/schemas/job-values.yaml > charts/vald-benchmark-operator/job-values.schema.json -.PHONY: helm/schema/vald-benchmark-job +.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 @@ -141,53 +149,46 @@ $(BINDIR)/yq: && curl -L https://github.com/mikefarah/yq/releases/download/$(YQ_VERSION)/yq_$(shell echo $(UNAME) | tr '[:upper:]' '[:lower:]')_$(subst x86_64,amd64,$(shell echo $(ARCH) | tr '[:upper:]' '[:lower:]')) -o $(BINDIR)/yq \ && chmod a+x $(BINDIR)/yq +.PHONY: helm/schema/crd/all +helm/schema/crd/all: \ + helm/schema/crd/vald \ + helm/schema/crd/vald-helm-operator \ + helm/schema/crd/vald-benchmark-job \ + helm/schema/crd/vald-benchmark-scenario \ + helm/schema/crd/vald-benchmark-operator + .PHONY: helm/schema/crd/vald ## generate OpenAPI v3 schema for ValdRelease helm/schema/crd/vald: \ yq/install - mv charts/vald-helm-operator/crds/valdrelease.yaml $(TEMP_DIR)/valdrelease.yaml - GOPRIVATE=$(GOPRIVATE) \ - go run -mod=readonly hack/helm/schema/crd/main.go \ - charts/vald/values.yaml > $(TEMP_DIR)/valdrelease-spec.yaml - $(BINDIR)/yq eval-all 'select(fileIndex==0).spec.versions[0].schema.openAPIV3Schema.properties.spec = select(fileIndex==1).spec | select(fileIndex==0)' \ - $(TEMP_DIR)/valdrelease.yaml $(TEMP_DIR)/valdrelease-spec.yaml > charts/vald-helm-operator/crds/valdrelease.yaml + @$(call gen-vald-crd,vald-helm-operator,valdrelease,vald/values) .PHONY: helm/schema/crd/vald-helm-operator ## generate OpenAPI v3 schema for ValdHelmOperatorRelease helm/schema/crd/vald-helm-operator: \ yq/install - mv charts/vald-helm-operator/crds/valdhelmoperatorrelease.yaml $(TEMP_DIR)/valdhelmoperatorrelease.yaml - GOPRIVATE=$(GOPRIVATE) \ - go run -mod=readonly hack/helm/schema/crd/main.go \ - charts/vald-helm-operator/values.yaml > $(TEMP_DIR)/valdhelmoperatorrelease-spec.yaml - $(BINDIR)/yq eval-all 'select(fileIndex==0).spec.versions[0].schema.openAPIV3Schema.properties.spec = select(fileIndex==1).spec | select(fileIndex==0)' \ - $(TEMP_DIR)/valdhelmoperatorrelease.yaml $(TEMP_DIR)/valdhelmoperatorrelease-spec.yaml > charts/vald-helm-operator/crds/valdhelmoperatorrelease.yaml + @$(call gen-vald-crd,vald-helm-operator,valdhelmoperatorrelease,vald-helm-operator/values) .PHONY: helm/schema/crd/vald/mirror-target ## generate OpenAPI v3 schema for ValdMirrorTarget helm/schema/crd/vald/mirror-target: \ yq/install - mv charts/vald/crds/valdmirrortarget.yaml $(TEMP_DIR)/valdmirrortarget.yaml - GOPRIVATE=$(GOPRIVATE) \ - go run -mod=readonly hack/helm/schema/crd/main.go \ - charts/vald/schemas/mirror-target-values.yaml > $(TEMP_DIR)/valdmirrortarget-spec.yaml - $(BINDIR)/yq eval-all 'select(fileIndex==0).spec.versions[0].schema.openAPIV3Schema.properties.spec = select(fileIndex==1).spec | select(fileIndex==0)' \ - $(TEMP_DIR)/valdmirrortarget.yaml $(TEMP_DIR)/valdmirrortarget-spec.yaml > charts/vald/crds/valdmirrortarget.yaml + @$(call gen-vald-crd,vald,valdmirrortarget,vald/schemas/mirror-target-values) .PHONY: helm/schema/crd/vald-benchmark-job ## generate OpenAPI v3 schema for ValdBenchmarkJobRelease helm/schema/crd/vald-benchmark-job: \ yq/install - @$(call gen-vald-crd,vald-benchmark-operator,valdbenchmarkjob,schemas/job-values) + @$(call gen-vald-crd,vald-benchmark-operator,valdbenchmarkjob,vald-benchmark-operator/schemas/job-values) .PHONY: helm/schema/crd/vald-benchmark-scenario ## generate OpenAPI v3 schema for ValdBenchmarkScenarioRelease helm/schema/crd/vald-benchmark-scenario: \ yq/install - @$(call gen-vald-crd,vald-benchmark-operator,valdbenchmarkscenario,schemas/scenario-values) + @$(call gen-vald-crd,vald-benchmark-operator,valdbenchmarkscenario,vald-benchmark-operator/schemas/scenario-values) .PHONY: helm/schema/crd/vald-benchmark-operator ## generate OpenAPI v3 schema for ValdBenchmarkOperatorRelease helm/schema/crd/vald-benchmark-operator: \ yq/install - @$(call gen-vald-crd,vald-benchmark-operator,valdbenchmarkoperatorrelease,values) + @$(call gen-vald-crd,vald-benchmark-operator,valdbenchmarkoperatorrelease,vald-benchmark-operator/values) diff --git a/Makefile.d/k3d.mk b/Makefile.d/k3d.mk index 924e657c0d5..0fa5a675761 100644 --- a/Makefile.d/k3d.mk +++ b/Makefile.d/k3d.mk @@ -30,8 +30,14 @@ $(BINDIR)/k3d: .PHONY: k3d/start ## start k3d (kubernetes in docker) cluster k3d/start: - $(K3D_COMMAND) cluster create $(K3D_CLUSTER_NAME) --agents $(K3D_NODES) --image docker.io/rancher/k3s:latest -v "/lib/modules:/lib/modules" - # $(K3D_COMMAND) cluster create $(K3D_CLUSTER_NAME) --agents $(K3D_NODES) -v "/lib/modules:/lib/modules" --host-pid-mode=true + $(K3D_COMMAND) cluster create $(K3D_CLUSTER_NAME) \ + --agents $(K3D_NODES) \ + --image docker.io/rancher/k3s:latest \ + --host-pid-mode=true \ + --port 8081:80@loadbalancer \ + --k3s-arg "--disable=traefik@server:*" \ + -v "/lib/modules:/lib/modules" + # $(K3D_COMMAND) cluster create $(K3D_CLUSTER_NAME) --agents $(K3D_NODES) -v "/lib/modules:/lib/modules" # $(K3D_COMMAND) cluster create $(K3D_CLUSTER_NAME) -p "8081:80@loadbalancer" --agents $(K3D_NODES) --k3s-arg '--disable=traefik@all' export KUBECONFIG="$(shell sudo $(K3D_COMMAND) kubeconfig merge -o $(TEMP_DIR)/k3d_$(K3D_CLUSTER_NAME)_kubeconfig.yaml $(K3D_CLUSTER_NAME))" diff --git a/Makefile.d/k8s.mk b/Makefile.d/k8s.mk index f7ca5d4a6da..ba6b023be41 100644 --- a/Makefile.d/k8s.mk +++ b/Makefile.d/k8s.mk @@ -163,21 +163,21 @@ k8s/multi/vald/deploy: -@kubectl create ns $(MIRROR02_NAMESPACE) -@kubectl create ns $(MIRROR03_NAMESPACE) helm install vald-cluster-01 charts/vald \ - -f ./charts/vald/values/multi-vald/dev-vald-with-mirror.yaml \ - -f ./charts/vald/values/multi-vald/dev-vald-01.yaml \ + -f $(ROOTDIR)/charts/vald/values/multi-vald/dev-vald-with-mirror.yaml \ + -f $(ROOTDIR)/charts/vald/values/multi-vald/dev-vald-01.yaml \ -n $(MIRROR01_NAMESPACE) helm install vald-cluster-02 charts/vald \ - -f ./charts/vald/values/multi-vald/dev-vald-with-mirror.yaml \ - -f ./charts/vald/values/multi-vald/dev-vald-02.yaml \ + -f $(ROOTDIR)/charts/vald/values/multi-vald/dev-vald-with-mirror.yaml \ + -f $(ROOTDIR)/charts/vald/values/multi-vald/dev-vald-02.yaml \ -n $(MIRROR02_NAMESPACE) helm install vald-cluster-03 charts/vald \ - -f ./charts/vald/values/multi-vald/dev-vald-with-mirror.yaml \ - -f ./charts/vald/values/multi-vald/dev-vald-03.yaml \ + -f $(ROOTDIR)/charts/vald/values/multi-vald/dev-vald-with-mirror.yaml \ + -f $(ROOTDIR)/charts/vald/values/multi-vald/dev-vald-03.yaml \ -n $(MIRROR03_NAMESPACE) kubectl wait --for=condition=ready pod -l app=$(MIRROR_APP_NAME) --timeout=120s -n $(MIRROR01_NAMESPACE) kubectl wait --for=condition=ready pod -l app=$(MIRROR_APP_NAME) --timeout=120s -n $(MIRROR02_NAMESPACE) kubectl wait --for=condition=ready pod -l app=$(MIRROR_APP_NAME) --timeout=120s -n $(MIRROR03_NAMESPACE) - kubectl apply -f ./charts/vald/values/multi-vald/mirror-target.yaml \ + kubectl apply -f $(ROOTDIR)/charts/vald/values/multi-vald/mirror-target.yaml \ -n $(MIRROR03_NAMESPACE) .PHONY: k8s/multi/vald/delete @@ -516,6 +516,11 @@ $(BINDIR)/telepresence: telepresence/swap/agent-ngt: @$(call telepresence,vald-agent-ngt,vdaas/vald-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) + .PHONY: telepresence/swap/discoverer ## swap discoverer deployment using telepresence telepresence/swap/discoverer: diff --git a/apis/grpc/v1/payload/payload_vtproto.pb.go b/apis/grpc/v1/payload/payload_vtproto.pb.go index 97c00f6a488..1927bfab2a5 100644 --- a/apis/grpc/v1/payload/payload_vtproto.pb.go +++ b/apis/grpc/v1/payload/payload_vtproto.pb.go @@ -20,8 +20,8 @@ import ( binary "encoding/binary" fmt "fmt" math "math" - bits "math/bits" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" io "github.com/vdaas/vald/internal/io" status "google.golang.org/genproto/googleapis/rpc/status" proto "google.golang.org/protobuf/proto" @@ -39,9 +39,8 @@ func (m *Search_Request) CloneVT() *Search_Request { if m == nil { return (*Search_Request)(nil) } - r := &Search_Request{ - Config: m.Config.CloneVT(), - } + r := new(Search_Request) + r.Config = m.Config.CloneVT() if rhs := m.Vector; rhs != nil { tmpContainer := make([]float32, len(rhs)) copy(tmpContainer, rhs) @@ -62,7 +61,7 @@ func (m *Search_MultiRequest) CloneVT() *Search_MultiRequest { if m == nil { return (*Search_MultiRequest)(nil) } - r := &Search_MultiRequest{} + r := new(Search_MultiRequest) if rhs := m.Requests; rhs != nil { tmpContainer := make([]*Search_Request, len(rhs)) for k, v := range rhs { @@ -85,10 +84,9 @@ func (m *Search_IDRequest) CloneVT() *Search_IDRequest { if m == nil { return (*Search_IDRequest)(nil) } - r := &Search_IDRequest{ - Id: m.Id, - Config: m.Config.CloneVT(), - } + r := new(Search_IDRequest) + r.Id = m.Id + r.Config = m.Config.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -104,7 +102,7 @@ func (m *Search_MultiIDRequest) CloneVT() *Search_MultiIDRequest { if m == nil { return (*Search_MultiIDRequest)(nil) } - r := &Search_MultiIDRequest{} + r := new(Search_MultiIDRequest) if rhs := m.Requests; rhs != nil { tmpContainer := make([]*Search_IDRequest, len(rhs)) for k, v := range rhs { @@ -127,10 +125,9 @@ func (m *Search_ObjectRequest) CloneVT() *Search_ObjectRequest { if m == nil { return (*Search_ObjectRequest)(nil) } - r := &Search_ObjectRequest{ - Config: m.Config.CloneVT(), - Vectorizer: m.Vectorizer.CloneVT(), - } + r := new(Search_ObjectRequest) + r.Config = m.Config.CloneVT() + r.Vectorizer = m.Vectorizer.CloneVT() if rhs := m.Object; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) @@ -151,7 +148,7 @@ func (m *Search_MultiObjectRequest) CloneVT() *Search_MultiObjectRequest { if m == nil { return (*Search_MultiObjectRequest)(nil) } - r := &Search_MultiObjectRequest{} + r := new(Search_MultiObjectRequest) if rhs := m.Requests; rhs != nil { tmpContainer := make([]*Search_ObjectRequest, len(rhs)) for k, v := range rhs { @@ -174,17 +171,16 @@ func (m *Search_Config) CloneVT() *Search_Config { if m == nil { return (*Search_Config)(nil) } - r := &Search_Config{ - RequestId: m.RequestId, - Num: m.Num, - Radius: m.Radius, - Epsilon: m.Epsilon, - Timeout: m.Timeout, - IngressFilters: m.IngressFilters.CloneVT(), - EgressFilters: m.EgressFilters.CloneVT(), - MinNum: m.MinNum, - AggregationAlgorithm: m.AggregationAlgorithm, - } + r := new(Search_Config) + r.RequestId = m.RequestId + r.Num = m.Num + r.Radius = m.Radius + r.Epsilon = m.Epsilon + r.Timeout = m.Timeout + r.IngressFilters = m.IngressFilters.CloneVT() + r.EgressFilters = m.EgressFilters.CloneVT() + r.MinNum = m.MinNum + r.AggregationAlgorithm = m.AggregationAlgorithm if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -200,9 +196,8 @@ func (m *Search_Response) CloneVT() *Search_Response { if m == nil { return (*Search_Response)(nil) } - r := &Search_Response{ - RequestId: m.RequestId, - } + r := new(Search_Response) + r.RequestId = m.RequestId if rhs := m.Results; rhs != nil { tmpContainer := make([]*Object_Distance, len(rhs)) for k, v := range rhs { @@ -225,7 +220,7 @@ func (m *Search_Responses) CloneVT() *Search_Responses { if m == nil { return (*Search_Responses)(nil) } - r := &Search_Responses{} + r := new(Search_Responses) if rhs := m.Responses; rhs != nil { tmpContainer := make([]*Search_Response, len(rhs)) for k, v := range rhs { @@ -248,7 +243,7 @@ func (m *Search_StreamResponse) CloneVT() *Search_StreamResponse { if m == nil { return (*Search_StreamResponse)(nil) } - r := &Search_StreamResponse{} + r := new(Search_StreamResponse) if m.Payload != nil { r.Payload = m.Payload.(interface { CloneVT() isSearch_StreamResponse_Payload @@ -269,9 +264,8 @@ func (m *Search_StreamResponse_Response) CloneVT() isSearch_StreamResponse_Paylo if m == nil { return (*Search_StreamResponse_Response)(nil) } - r := &Search_StreamResponse_Response{ - Response: m.Response.CloneVT(), - } + r := new(Search_StreamResponse_Response) + r.Response = m.Response.CloneVT() return r } @@ -279,7 +273,7 @@ func (m *Search_StreamResponse_Status) CloneVT() isSearch_StreamResponse_Payload if m == nil { return (*Search_StreamResponse_Status)(nil) } - r := &Search_StreamResponse_Status{} + r := new(Search_StreamResponse_Status) if rhs := m.Status; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *status.Status }); ok { r.Status = vtpb.CloneVT() @@ -294,7 +288,7 @@ func (m *Search) CloneVT() *Search { if m == nil { return (*Search)(nil) } - r := &Search{} + r := new(Search) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -310,10 +304,9 @@ func (m *Filter_Target) CloneVT() *Filter_Target { if m == nil { return (*Filter_Target)(nil) } - r := &Filter_Target{ - Host: m.Host, - Port: m.Port, - } + r := new(Filter_Target) + r.Host = m.Host + r.Port = m.Port if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -329,7 +322,7 @@ func (m *Filter_Config) CloneVT() *Filter_Config { if m == nil { return (*Filter_Config)(nil) } - r := &Filter_Config{} + r := new(Filter_Config) if rhs := m.Targets; rhs != nil { tmpContainer := make([]*Filter_Target, len(rhs)) for k, v := range rhs { @@ -352,7 +345,7 @@ func (m *Filter) CloneVT() *Filter { if m == nil { return (*Filter)(nil) } - r := &Filter{} + r := new(Filter) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -368,10 +361,9 @@ func (m *Insert_Request) CloneVT() *Insert_Request { if m == nil { return (*Insert_Request)(nil) } - r := &Insert_Request{ - Vector: m.Vector.CloneVT(), - Config: m.Config.CloneVT(), - } + r := new(Insert_Request) + r.Vector = m.Vector.CloneVT() + r.Config = m.Config.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -387,7 +379,7 @@ func (m *Insert_MultiRequest) CloneVT() *Insert_MultiRequest { if m == nil { return (*Insert_MultiRequest)(nil) } - r := &Insert_MultiRequest{} + r := new(Insert_MultiRequest) if rhs := m.Requests; rhs != nil { tmpContainer := make([]*Insert_Request, len(rhs)) for k, v := range rhs { @@ -410,11 +402,10 @@ func (m *Insert_ObjectRequest) CloneVT() *Insert_ObjectRequest { if m == nil { return (*Insert_ObjectRequest)(nil) } - r := &Insert_ObjectRequest{ - Object: m.Object.CloneVT(), - Config: m.Config.CloneVT(), - Vectorizer: m.Vectorizer.CloneVT(), - } + r := new(Insert_ObjectRequest) + r.Object = m.Object.CloneVT() + r.Config = m.Config.CloneVT() + r.Vectorizer = m.Vectorizer.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -430,7 +421,7 @@ func (m *Insert_MultiObjectRequest) CloneVT() *Insert_MultiObjectRequest { if m == nil { return (*Insert_MultiObjectRequest)(nil) } - r := &Insert_MultiObjectRequest{} + r := new(Insert_MultiObjectRequest) if rhs := m.Requests; rhs != nil { tmpContainer := make([]*Insert_ObjectRequest, len(rhs)) for k, v := range rhs { @@ -453,11 +444,10 @@ func (m *Insert_Config) CloneVT() *Insert_Config { if m == nil { return (*Insert_Config)(nil) } - r := &Insert_Config{ - SkipStrictExistCheck: m.SkipStrictExistCheck, - Filters: m.Filters.CloneVT(), - Timestamp: m.Timestamp, - } + r := new(Insert_Config) + r.SkipStrictExistCheck = m.SkipStrictExistCheck + r.Filters = m.Filters.CloneVT() + r.Timestamp = m.Timestamp if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -473,7 +463,7 @@ func (m *Insert) CloneVT() *Insert { if m == nil { return (*Insert)(nil) } - r := &Insert{} + r := new(Insert) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -489,10 +479,9 @@ func (m *Update_Request) CloneVT() *Update_Request { if m == nil { return (*Update_Request)(nil) } - r := &Update_Request{ - Vector: m.Vector.CloneVT(), - Config: m.Config.CloneVT(), - } + r := new(Update_Request) + r.Vector = m.Vector.CloneVT() + r.Config = m.Config.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -508,7 +497,7 @@ func (m *Update_MultiRequest) CloneVT() *Update_MultiRequest { if m == nil { return (*Update_MultiRequest)(nil) } - r := &Update_MultiRequest{} + r := new(Update_MultiRequest) if rhs := m.Requests; rhs != nil { tmpContainer := make([]*Update_Request, len(rhs)) for k, v := range rhs { @@ -531,11 +520,10 @@ func (m *Update_ObjectRequest) CloneVT() *Update_ObjectRequest { if m == nil { return (*Update_ObjectRequest)(nil) } - r := &Update_ObjectRequest{ - Object: m.Object.CloneVT(), - Config: m.Config.CloneVT(), - Vectorizer: m.Vectorizer.CloneVT(), - } + r := new(Update_ObjectRequest) + r.Object = m.Object.CloneVT() + r.Config = m.Config.CloneVT() + r.Vectorizer = m.Vectorizer.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -551,7 +539,7 @@ func (m *Update_MultiObjectRequest) CloneVT() *Update_MultiObjectRequest { if m == nil { return (*Update_MultiObjectRequest)(nil) } - r := &Update_MultiObjectRequest{} + r := new(Update_MultiObjectRequest) if rhs := m.Requests; rhs != nil { tmpContainer := make([]*Update_ObjectRequest, len(rhs)) for k, v := range rhs { @@ -574,12 +562,11 @@ func (m *Update_Config) CloneVT() *Update_Config { if m == nil { return (*Update_Config)(nil) } - r := &Update_Config{ - SkipStrictExistCheck: m.SkipStrictExistCheck, - Filters: m.Filters.CloneVT(), - Timestamp: m.Timestamp, - DisableBalancedUpdate: m.DisableBalancedUpdate, - } + r := new(Update_Config) + r.SkipStrictExistCheck = m.SkipStrictExistCheck + r.Filters = m.Filters.CloneVT() + r.Timestamp = m.Timestamp + r.DisableBalancedUpdate = m.DisableBalancedUpdate if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -595,7 +582,7 @@ func (m *Update) CloneVT() *Update { if m == nil { return (*Update)(nil) } - r := &Update{} + r := new(Update) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -611,10 +598,9 @@ func (m *Upsert_Request) CloneVT() *Upsert_Request { if m == nil { return (*Upsert_Request)(nil) } - r := &Upsert_Request{ - Vector: m.Vector.CloneVT(), - Config: m.Config.CloneVT(), - } + r := new(Upsert_Request) + r.Vector = m.Vector.CloneVT() + r.Config = m.Config.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -630,7 +616,7 @@ func (m *Upsert_MultiRequest) CloneVT() *Upsert_MultiRequest { if m == nil { return (*Upsert_MultiRequest)(nil) } - r := &Upsert_MultiRequest{} + r := new(Upsert_MultiRequest) if rhs := m.Requests; rhs != nil { tmpContainer := make([]*Upsert_Request, len(rhs)) for k, v := range rhs { @@ -653,11 +639,10 @@ func (m *Upsert_ObjectRequest) CloneVT() *Upsert_ObjectRequest { if m == nil { return (*Upsert_ObjectRequest)(nil) } - r := &Upsert_ObjectRequest{ - Object: m.Object.CloneVT(), - Config: m.Config.CloneVT(), - Vectorizer: m.Vectorizer.CloneVT(), - } + r := new(Upsert_ObjectRequest) + r.Object = m.Object.CloneVT() + r.Config = m.Config.CloneVT() + r.Vectorizer = m.Vectorizer.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -673,7 +658,7 @@ func (m *Upsert_MultiObjectRequest) CloneVT() *Upsert_MultiObjectRequest { if m == nil { return (*Upsert_MultiObjectRequest)(nil) } - r := &Upsert_MultiObjectRequest{} + r := new(Upsert_MultiObjectRequest) if rhs := m.Requests; rhs != nil { tmpContainer := make([]*Upsert_ObjectRequest, len(rhs)) for k, v := range rhs { @@ -696,12 +681,11 @@ func (m *Upsert_Config) CloneVT() *Upsert_Config { if m == nil { return (*Upsert_Config)(nil) } - r := &Upsert_Config{ - SkipStrictExistCheck: m.SkipStrictExistCheck, - Filters: m.Filters.CloneVT(), - Timestamp: m.Timestamp, - DisableBalancedUpdate: m.DisableBalancedUpdate, - } + r := new(Upsert_Config) + r.SkipStrictExistCheck = m.SkipStrictExistCheck + r.Filters = m.Filters.CloneVT() + r.Timestamp = m.Timestamp + r.DisableBalancedUpdate = m.DisableBalancedUpdate if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -717,7 +701,7 @@ func (m *Upsert) CloneVT() *Upsert { if m == nil { return (*Upsert)(nil) } - r := &Upsert{} + r := new(Upsert) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -733,10 +717,9 @@ func (m *Remove_Request) CloneVT() *Remove_Request { if m == nil { return (*Remove_Request)(nil) } - r := &Remove_Request{ - Id: m.Id.CloneVT(), - Config: m.Config.CloneVT(), - } + r := new(Remove_Request) + r.Id = m.Id.CloneVT() + r.Config = m.Config.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -752,7 +735,7 @@ func (m *Remove_MultiRequest) CloneVT() *Remove_MultiRequest { if m == nil { return (*Remove_MultiRequest)(nil) } - r := &Remove_MultiRequest{} + r := new(Remove_MultiRequest) if rhs := m.Requests; rhs != nil { tmpContainer := make([]*Remove_Request, len(rhs)) for k, v := range rhs { @@ -775,7 +758,7 @@ func (m *Remove_TimestampRequest) CloneVT() *Remove_TimestampRequest { if m == nil { return (*Remove_TimestampRequest)(nil) } - r := &Remove_TimestampRequest{} + r := new(Remove_TimestampRequest) if rhs := m.Timestamps; rhs != nil { tmpContainer := make([]*Remove_Timestamp, len(rhs)) for k, v := range rhs { @@ -798,10 +781,9 @@ func (m *Remove_Timestamp) CloneVT() *Remove_Timestamp { if m == nil { return (*Remove_Timestamp)(nil) } - r := &Remove_Timestamp{ - Timestamp: m.Timestamp, - Operator: m.Operator, - } + r := new(Remove_Timestamp) + r.Timestamp = m.Timestamp + r.Operator = m.Operator if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -817,10 +799,9 @@ func (m *Remove_Config) CloneVT() *Remove_Config { if m == nil { return (*Remove_Config)(nil) } - r := &Remove_Config{ - SkipStrictExistCheck: m.SkipStrictExistCheck, - Timestamp: m.Timestamp, - } + r := new(Remove_Config) + r.SkipStrictExistCheck = m.SkipStrictExistCheck + r.Timestamp = m.Timestamp if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -836,7 +817,7 @@ func (m *Remove) CloneVT() *Remove { if m == nil { return (*Remove)(nil) } - r := &Remove{} + r := new(Remove) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -852,10 +833,9 @@ func (m *Object_VectorRequest) CloneVT() *Object_VectorRequest { if m == nil { return (*Object_VectorRequest)(nil) } - r := &Object_VectorRequest{ - Id: m.Id.CloneVT(), - Filters: m.Filters.CloneVT(), - } + r := new(Object_VectorRequest) + r.Id = m.Id.CloneVT() + r.Filters = m.Filters.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -871,10 +851,9 @@ func (m *Object_Distance) CloneVT() *Object_Distance { if m == nil { return (*Object_Distance)(nil) } - r := &Object_Distance{ - Id: m.Id, - Distance: m.Distance, - } + r := new(Object_Distance) + r.Id = m.Id + r.Distance = m.Distance if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -890,7 +869,7 @@ func (m *Object_StreamDistance) CloneVT() *Object_StreamDistance { if m == nil { return (*Object_StreamDistance)(nil) } - r := &Object_StreamDistance{} + r := new(Object_StreamDistance) if m.Payload != nil { r.Payload = m.Payload.(interface { CloneVT() isObject_StreamDistance_Payload @@ -911,9 +890,8 @@ func (m *Object_StreamDistance_Distance) CloneVT() isObject_StreamDistance_Paylo if m == nil { return (*Object_StreamDistance_Distance)(nil) } - r := &Object_StreamDistance_Distance{ - Distance: m.Distance.CloneVT(), - } + r := new(Object_StreamDistance_Distance) + r.Distance = m.Distance.CloneVT() return r } @@ -921,7 +899,7 @@ func (m *Object_StreamDistance_Status) CloneVT() isObject_StreamDistance_Payload if m == nil { return (*Object_StreamDistance_Status)(nil) } - r := &Object_StreamDistance_Status{} + r := new(Object_StreamDistance_Status) if rhs := m.Status; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *status.Status }); ok { r.Status = vtpb.CloneVT() @@ -936,9 +914,8 @@ func (m *Object_ID) CloneVT() *Object_ID { if m == nil { return (*Object_ID)(nil) } - r := &Object_ID{ - Id: m.Id, - } + r := new(Object_ID) + r.Id = m.Id if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -954,7 +931,7 @@ func (m *Object_IDs) CloneVT() *Object_IDs { if m == nil { return (*Object_IDs)(nil) } - r := &Object_IDs{} + r := new(Object_IDs) if rhs := m.Ids; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) @@ -975,10 +952,9 @@ func (m *Object_Vector) CloneVT() *Object_Vector { if m == nil { return (*Object_Vector)(nil) } - r := &Object_Vector{ - Id: m.Id, - Timestamp: m.Timestamp, - } + r := new(Object_Vector) + r.Id = m.Id + r.Timestamp = m.Timestamp if rhs := m.Vector; rhs != nil { tmpContainer := make([]float32, len(rhs)) copy(tmpContainer, rhs) @@ -999,9 +975,8 @@ func (m *Object_GetTimestampRequest) CloneVT() *Object_GetTimestampRequest { if m == nil { return (*Object_GetTimestampRequest)(nil) } - r := &Object_GetTimestampRequest{ - Id: m.Id.CloneVT(), - } + r := new(Object_GetTimestampRequest) + r.Id = m.Id.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1017,10 +992,9 @@ func (m *Object_Timestamp) CloneVT() *Object_Timestamp { if m == nil { return (*Object_Timestamp)(nil) } - r := &Object_Timestamp{ - Id: m.Id, - Timestamp: m.Timestamp, - } + r := new(Object_Timestamp) + r.Id = m.Id + r.Timestamp = m.Timestamp if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1036,7 +1010,7 @@ func (m *Object_Vectors) CloneVT() *Object_Vectors { if m == nil { return (*Object_Vectors)(nil) } - r := &Object_Vectors{} + r := new(Object_Vectors) if rhs := m.Vectors; rhs != nil { tmpContainer := make([]*Object_Vector, len(rhs)) for k, v := range rhs { @@ -1059,7 +1033,7 @@ func (m *Object_StreamVector) CloneVT() *Object_StreamVector { if m == nil { return (*Object_StreamVector)(nil) } - r := &Object_StreamVector{} + r := new(Object_StreamVector) if m.Payload != nil { r.Payload = m.Payload.(interface { CloneVT() isObject_StreamVector_Payload @@ -1080,9 +1054,8 @@ func (m *Object_StreamVector_Vector) CloneVT() isObject_StreamVector_Payload { if m == nil { return (*Object_StreamVector_Vector)(nil) } - r := &Object_StreamVector_Vector{ - Vector: m.Vector.CloneVT(), - } + r := new(Object_StreamVector_Vector) + r.Vector = m.Vector.CloneVT() return r } @@ -1090,7 +1063,7 @@ func (m *Object_StreamVector_Status) CloneVT() isObject_StreamVector_Payload { if m == nil { return (*Object_StreamVector_Status)(nil) } - r := &Object_StreamVector_Status{} + r := new(Object_StreamVector_Status) if rhs := m.Status; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *status.Status }); ok { r.Status = vtpb.CloneVT() @@ -1105,7 +1078,7 @@ func (m *Object_ReshapeVector) CloneVT() *Object_ReshapeVector { if m == nil { return (*Object_ReshapeVector)(nil) } - r := &Object_ReshapeVector{} + r := new(Object_ReshapeVector) if rhs := m.Object; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) @@ -1131,9 +1104,8 @@ func (m *Object_Blob) CloneVT() *Object_Blob { if m == nil { return (*Object_Blob)(nil) } - r := &Object_Blob{ - Id: m.Id, - } + r := new(Object_Blob) + r.Id = m.Id if rhs := m.Object; rhs != nil { tmpBytes := make([]byte, len(rhs)) copy(tmpBytes, rhs) @@ -1154,7 +1126,7 @@ func (m *Object_StreamBlob) CloneVT() *Object_StreamBlob { if m == nil { return (*Object_StreamBlob)(nil) } - r := &Object_StreamBlob{} + r := new(Object_StreamBlob) if m.Payload != nil { r.Payload = m.Payload.(interface { CloneVT() isObject_StreamBlob_Payload @@ -1175,9 +1147,8 @@ func (m *Object_StreamBlob_Blob) CloneVT() isObject_StreamBlob_Payload { if m == nil { return (*Object_StreamBlob_Blob)(nil) } - r := &Object_StreamBlob_Blob{ - Blob: m.Blob.CloneVT(), - } + r := new(Object_StreamBlob_Blob) + r.Blob = m.Blob.CloneVT() return r } @@ -1185,7 +1156,7 @@ func (m *Object_StreamBlob_Status) CloneVT() isObject_StreamBlob_Payload { if m == nil { return (*Object_StreamBlob_Status)(nil) } - r := &Object_StreamBlob_Status{} + r := new(Object_StreamBlob_Status) if rhs := m.Status; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *status.Status }); ok { r.Status = vtpb.CloneVT() @@ -1200,10 +1171,9 @@ func (m *Object_Location) CloneVT() *Object_Location { if m == nil { return (*Object_Location)(nil) } - r := &Object_Location{ - Name: m.Name, - Uuid: m.Uuid, - } + r := new(Object_Location) + r.Name = m.Name + r.Uuid = m.Uuid if rhs := m.Ips; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) @@ -1224,7 +1194,7 @@ func (m *Object_StreamLocation) CloneVT() *Object_StreamLocation { if m == nil { return (*Object_StreamLocation)(nil) } - r := &Object_StreamLocation{} + r := new(Object_StreamLocation) if m.Payload != nil { r.Payload = m.Payload.(interface { CloneVT() isObject_StreamLocation_Payload @@ -1245,9 +1215,8 @@ func (m *Object_StreamLocation_Location) CloneVT() isObject_StreamLocation_Paylo if m == nil { return (*Object_StreamLocation_Location)(nil) } - r := &Object_StreamLocation_Location{ - Location: m.Location.CloneVT(), - } + r := new(Object_StreamLocation_Location) + r.Location = m.Location.CloneVT() return r } @@ -1255,7 +1224,7 @@ func (m *Object_StreamLocation_Status) CloneVT() isObject_StreamLocation_Payload if m == nil { return (*Object_StreamLocation_Status)(nil) } - r := &Object_StreamLocation_Status{} + r := new(Object_StreamLocation_Status) if rhs := m.Status; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *status.Status }); ok { r.Status = vtpb.CloneVT() @@ -1270,7 +1239,7 @@ func (m *Object_Locations) CloneVT() *Object_Locations { if m == nil { return (*Object_Locations)(nil) } - r := &Object_Locations{} + r := new(Object_Locations) if rhs := m.Locations; rhs != nil { tmpContainer := make([]*Object_Location, len(rhs)) for k, v := range rhs { @@ -1293,7 +1262,7 @@ func (m *Object_List_Request) CloneVT() *Object_List_Request { if m == nil { return (*Object_List_Request)(nil) } - r := &Object_List_Request{} + r := new(Object_List_Request) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1309,7 +1278,7 @@ func (m *Object_List_Response) CloneVT() *Object_List_Response { if m == nil { return (*Object_List_Response)(nil) } - r := &Object_List_Response{} + r := new(Object_List_Response) if m.Payload != nil { r.Payload = m.Payload.(interface { CloneVT() isObject_List_Response_Payload @@ -1330,9 +1299,8 @@ func (m *Object_List_Response_Vector) CloneVT() isObject_List_Response_Payload { if m == nil { return (*Object_List_Response_Vector)(nil) } - r := &Object_List_Response_Vector{ - Vector: m.Vector.CloneVT(), - } + r := new(Object_List_Response_Vector) + r.Vector = m.Vector.CloneVT() return r } @@ -1340,7 +1308,7 @@ func (m *Object_List_Response_Status) CloneVT() isObject_List_Response_Payload { if m == nil { return (*Object_List_Response_Status)(nil) } - r := &Object_List_Response_Status{} + r := new(Object_List_Response_Status) if rhs := m.Status; rhs != nil { if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *status.Status }); ok { r.Status = vtpb.CloneVT() @@ -1355,7 +1323,7 @@ func (m *Object_List) CloneVT() *Object_List { if m == nil { return (*Object_List)(nil) } - r := &Object_List{} + r := new(Object_List) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1371,7 +1339,7 @@ func (m *Object) CloneVT() *Object { if m == nil { return (*Object)(nil) } - r := &Object{} + r := new(Object) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1387,9 +1355,8 @@ func (m *Control_CreateIndexRequest) CloneVT() *Control_CreateIndexRequest { if m == nil { return (*Control_CreateIndexRequest)(nil) } - r := &Control_CreateIndexRequest{ - PoolSize: m.PoolSize, - } + r := new(Control_CreateIndexRequest) + r.PoolSize = m.PoolSize if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1405,7 +1372,7 @@ func (m *Control) CloneVT() *Control { if m == nil { return (*Control)(nil) } - r := &Control{} + r := new(Control) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1421,11 +1388,10 @@ func (m *Discoverer_Request) CloneVT() *Discoverer_Request { if m == nil { return (*Discoverer_Request)(nil) } - r := &Discoverer_Request{ - Name: m.Name, - Namespace: m.Namespace, - Node: m.Node, - } + r := new(Discoverer_Request) + r.Name = m.Name + r.Namespace = m.Namespace + r.Node = m.Node if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1441,7 +1407,7 @@ func (m *Discoverer) CloneVT() *Discoverer { if m == nil { return (*Discoverer)(nil) } - r := &Discoverer{} + r := new(Discoverer) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1457,12 +1423,11 @@ func (m *Info_Index_Count) CloneVT() *Info_Index_Count { if m == nil { return (*Info_Index_Count)(nil) } - r := &Info_Index_Count{ - Stored: m.Stored, - Uncommitted: m.Uncommitted, - Indexing: m.Indexing, - Saving: m.Saving, - } + r := new(Info_Index_Count) + r.Stored = m.Stored + r.Uncommitted = m.Uncommitted + r.Indexing = m.Indexing + r.Saving = m.Saving if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1478,9 +1443,8 @@ func (m *Info_Index_UUID_Committed) CloneVT() *Info_Index_UUID_Committed { if m == nil { return (*Info_Index_UUID_Committed)(nil) } - r := &Info_Index_UUID_Committed{ - Uuid: m.Uuid, - } + r := new(Info_Index_UUID_Committed) + r.Uuid = m.Uuid if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1496,9 +1460,8 @@ func (m *Info_Index_UUID_Uncommitted) CloneVT() *Info_Index_UUID_Uncommitted { if m == nil { return (*Info_Index_UUID_Uncommitted)(nil) } - r := &Info_Index_UUID_Uncommitted{ - Uuid: m.Uuid, - } + r := new(Info_Index_UUID_Uncommitted) + r.Uuid = m.Uuid if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1514,7 +1477,7 @@ func (m *Info_Index_UUID) CloneVT() *Info_Index_UUID { if m == nil { return (*Info_Index_UUID)(nil) } - r := &Info_Index_UUID{} + r := new(Info_Index_UUID) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1530,7 +1493,7 @@ func (m *Info_Index) CloneVT() *Info_Index { if m == nil { return (*Info_Index)(nil) } - r := &Info_Index{} + r := new(Info_Index) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1546,15 +1509,14 @@ func (m *Info_Pod) CloneVT() *Info_Pod { if m == nil { return (*Info_Pod)(nil) } - r := &Info_Pod{ - AppName: m.AppName, - Name: m.Name, - Namespace: m.Namespace, - Ip: m.Ip, - Cpu: m.Cpu.CloneVT(), - Memory: m.Memory.CloneVT(), - Node: m.Node.CloneVT(), - } + r := new(Info_Pod) + r.AppName = m.AppName + r.Name = m.Name + r.Namespace = m.Namespace + r.Ip = m.Ip + r.Cpu = m.Cpu.CloneVT() + r.Memory = m.Memory.CloneVT() + r.Node = m.Node.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1570,14 +1532,13 @@ func (m *Info_Node) CloneVT() *Info_Node { if m == nil { return (*Info_Node)(nil) } - r := &Info_Node{ - Name: m.Name, - InternalAddr: m.InternalAddr, - ExternalAddr: m.ExternalAddr, - Cpu: m.Cpu.CloneVT(), - Memory: m.Memory.CloneVT(), - Pods: m.Pods.CloneVT(), - } + r := new(Info_Node) + r.Name = m.Name + r.InternalAddr = m.InternalAddr + r.ExternalAddr = m.ExternalAddr + r.Cpu = m.Cpu.CloneVT() + r.Memory = m.Memory.CloneVT() + r.Pods = m.Pods.CloneVT() if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1593,12 +1554,11 @@ func (m *Info_Service) CloneVT() *Info_Service { if m == nil { return (*Info_Service)(nil) } - r := &Info_Service{ - Name: m.Name, - ClusterIp: m.ClusterIp, - Labels: m.Labels.CloneVT(), - Annotations: m.Annotations.CloneVT(), - } + r := new(Info_Service) + r.Name = m.Name + r.ClusterIp = m.ClusterIp + r.Labels = m.Labels.CloneVT() + r.Annotations = m.Annotations.CloneVT() if rhs := m.ClusterIps; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) @@ -1626,10 +1586,9 @@ func (m *Info_ServicePort) CloneVT() *Info_ServicePort { if m == nil { return (*Info_ServicePort)(nil) } - r := &Info_ServicePort{ - Name: m.Name, - Port: m.Port, - } + r := new(Info_ServicePort) + r.Name = m.Name + r.Port = m.Port if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1645,7 +1604,7 @@ func (m *Info_Labels) CloneVT() *Info_Labels { if m == nil { return (*Info_Labels)(nil) } - r := &Info_Labels{} + r := new(Info_Labels) if rhs := m.Labels; rhs != nil { tmpContainer := make(map[string]string, len(rhs)) for k, v := range rhs { @@ -1668,7 +1627,7 @@ func (m *Info_Annotations) CloneVT() *Info_Annotations { if m == nil { return (*Info_Annotations)(nil) } - r := &Info_Annotations{} + r := new(Info_Annotations) if rhs := m.Annotations; rhs != nil { tmpContainer := make(map[string]string, len(rhs)) for k, v := range rhs { @@ -1691,11 +1650,10 @@ func (m *Info_CPU) CloneVT() *Info_CPU { if m == nil { return (*Info_CPU)(nil) } - r := &Info_CPU{ - Limit: m.Limit, - Request: m.Request, - Usage: m.Usage, - } + r := new(Info_CPU) + r.Limit = m.Limit + r.Request = m.Request + r.Usage = m.Usage if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1711,11 +1669,10 @@ func (m *Info_Memory) CloneVT() *Info_Memory { if m == nil { return (*Info_Memory)(nil) } - r := &Info_Memory{ - Limit: m.Limit, - Request: m.Request, - Usage: m.Usage, - } + r := new(Info_Memory) + r.Limit = m.Limit + r.Request = m.Request + r.Usage = m.Usage if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1731,7 +1688,7 @@ func (m *Info_Pods) CloneVT() *Info_Pods { if m == nil { return (*Info_Pods)(nil) } - r := &Info_Pods{} + r := new(Info_Pods) if rhs := m.Pods; rhs != nil { tmpContainer := make([]*Info_Pod, len(rhs)) for k, v := range rhs { @@ -1754,7 +1711,7 @@ func (m *Info_Nodes) CloneVT() *Info_Nodes { if m == nil { return (*Info_Nodes)(nil) } - r := &Info_Nodes{} + r := new(Info_Nodes) if rhs := m.Nodes; rhs != nil { tmpContainer := make([]*Info_Node, len(rhs)) for k, v := range rhs { @@ -1777,7 +1734,7 @@ func (m *Info_Services) CloneVT() *Info_Services { if m == nil { return (*Info_Services)(nil) } - r := &Info_Services{} + r := new(Info_Services) if rhs := m.Services; rhs != nil { tmpContainer := make([]*Info_Service, len(rhs)) for k, v := range rhs { @@ -1800,7 +1757,7 @@ func (m *Info_IPs) CloneVT() *Info_IPs { if m == nil { return (*Info_IPs)(nil) } - r := &Info_IPs{} + r := new(Info_IPs) if rhs := m.Ip; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) @@ -1821,7 +1778,7 @@ func (m *Info) CloneVT() *Info { if m == nil { return (*Info)(nil) } - r := &Info{} + r := new(Info) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1837,10 +1794,9 @@ func (m *Mirror_Target) CloneVT() *Mirror_Target { if m == nil { return (*Mirror_Target)(nil) } - r := &Mirror_Target{ - Host: m.Host, - Port: m.Port, - } + r := new(Mirror_Target) + r.Host = m.Host + r.Port = m.Port if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1856,7 +1812,7 @@ func (m *Mirror_Targets) CloneVT() *Mirror_Targets { if m == nil { return (*Mirror_Targets)(nil) } - r := &Mirror_Targets{} + r := new(Mirror_Targets) if rhs := m.Targets; rhs != nil { tmpContainer := make([]*Mirror_Target, len(rhs)) for k, v := range rhs { @@ -1879,7 +1835,7 @@ func (m *Mirror) CloneVT() *Mirror { if m == nil { return (*Mirror)(nil) } - r := &Mirror{} + r := new(Mirror) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -1895,7 +1851,7 @@ func (m *Empty) CloneVT() *Empty { if m == nil { return (*Empty)(nil) } - r := &Empty{} + r := new(Empty) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -4433,7 +4389,7 @@ func (m *Search_Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -4443,7 +4399,7 @@ func (m *Search_Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f1)) } - i = encodeVarint(dAtA, i, uint64(len(m.Vector)*4)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Vector)*4)) i-- dAtA[i] = 0xa } @@ -4487,7 +4443,7 @@ func (m *Search_MultiRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -4531,14 +4487,14 @@ func (m *Search_IDRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } @@ -4582,7 +4538,7 @@ func (m *Search_MultiIDRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -4626,7 +4582,7 @@ func (m *Search_ObjectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -4636,14 +4592,14 @@ func (m *Search_ObjectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } if len(m.Object) > 0 { i -= len(m.Object) copy(dAtA[i:], m.Object) - i = encodeVarint(dAtA, i, uint64(len(m.Object))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Object))) i-- dAtA[i] = 0xa } @@ -4687,7 +4643,7 @@ func (m *Search_MultiObjectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, er return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -4726,12 +4682,12 @@ func (m *Search_Config) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.AggregationAlgorithm != 0 { - i = encodeVarint(dAtA, i, uint64(m.AggregationAlgorithm)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.AggregationAlgorithm)) i-- dAtA[i] = 0x48 } if m.MinNum != 0 { - i = encodeVarint(dAtA, i, uint64(m.MinNum)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MinNum)) i-- dAtA[i] = 0x40 } @@ -4741,7 +4697,7 @@ func (m *Search_Config) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3a } @@ -4751,12 +4707,12 @@ func (m *Search_Config) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } if m.Timeout != 0 { - i = encodeVarint(dAtA, i, uint64(m.Timeout)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timeout)) i-- dAtA[i] = 0x28 } @@ -4773,14 +4729,14 @@ func (m *Search_Config) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x1d } if m.Num != 0 { - i = encodeVarint(dAtA, i, uint64(m.Num)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Num)) i-- dAtA[i] = 0x10 } if len(m.RequestId) > 0 { i -= len(m.RequestId) copy(dAtA[i:], m.RequestId) - i = encodeVarint(dAtA, i, uint64(len(m.RequestId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequestId))) i-- dAtA[i] = 0xa } @@ -4824,7 +4780,7 @@ func (m *Search_Response) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -4832,7 +4788,7 @@ func (m *Search_Response) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.RequestId) > 0 { i -= len(m.RequestId) copy(dAtA[i:], m.RequestId) - i = encodeVarint(dAtA, i, uint64(len(m.RequestId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequestId))) i-- dAtA[i] = 0xa } @@ -4876,7 +4832,7 @@ func (m *Search_Responses) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -4939,7 +4895,7 @@ func (m *Search_StreamResponse_Response) MarshalToSizedBufferVT(dAtA []byte) (in return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -4961,7 +4917,7 @@ func (m *Search_StreamResponse_Status) MarshalToSizedBufferVT(dAtA []byte) (int, return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.Status) if err != nil { @@ -4969,7 +4925,7 @@ func (m *Search_StreamResponse_Status) MarshalToSizedBufferVT(dAtA []byte) (int, } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 @@ -5040,14 +4996,14 @@ func (m *Filter_Target) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Port != 0 { - i = encodeVarint(dAtA, i, uint64(m.Port)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Port)) i-- dAtA[i] = 0x10 } if len(m.Host) > 0 { i -= len(m.Host) copy(dAtA[i:], m.Host) - i = encodeVarint(dAtA, i, uint64(len(m.Host))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Host))) i-- dAtA[i] = 0xa } @@ -5091,7 +5047,7 @@ func (m *Filter_Config) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -5168,7 +5124,7 @@ func (m *Insert_Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -5178,7 +5134,7 @@ func (m *Insert_Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -5222,7 +5178,7 @@ func (m *Insert_MultiRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -5266,7 +5222,7 @@ func (m *Insert_ObjectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -5276,7 +5232,7 @@ func (m *Insert_ObjectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -5286,7 +5242,7 @@ func (m *Insert_ObjectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -5330,7 +5286,7 @@ func (m *Insert_MultiObjectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, er return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -5369,7 +5325,7 @@ func (m *Insert_Config) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Timestamp != 0 { - i = encodeVarint(dAtA, i, uint64(m.Timestamp)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) i-- dAtA[i] = 0x18 } @@ -5379,7 +5335,7 @@ func (m *Insert_Config) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -5465,7 +5421,7 @@ func (m *Update_Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -5475,7 +5431,7 @@ func (m *Update_Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -5519,7 +5475,7 @@ func (m *Update_MultiRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -5563,7 +5519,7 @@ func (m *Update_ObjectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -5573,7 +5529,7 @@ func (m *Update_ObjectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -5583,7 +5539,7 @@ func (m *Update_ObjectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -5627,7 +5583,7 @@ func (m *Update_MultiObjectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, er return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -5676,7 +5632,7 @@ func (m *Update_Config) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x20 } if m.Timestamp != 0 { - i = encodeVarint(dAtA, i, uint64(m.Timestamp)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) i-- dAtA[i] = 0x18 } @@ -5686,7 +5642,7 @@ func (m *Update_Config) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -5772,7 +5728,7 @@ func (m *Upsert_Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -5782,7 +5738,7 @@ func (m *Upsert_Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -5826,7 +5782,7 @@ func (m *Upsert_MultiRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -5870,7 +5826,7 @@ func (m *Upsert_ObjectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x1a } @@ -5880,7 +5836,7 @@ func (m *Upsert_ObjectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -5890,7 +5846,7 @@ func (m *Upsert_ObjectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -5934,7 +5890,7 @@ func (m *Upsert_MultiObjectRequest) MarshalToSizedBufferVT(dAtA []byte) (int, er return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -5983,7 +5939,7 @@ func (m *Upsert_Config) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x20 } if m.Timestamp != 0 { - i = encodeVarint(dAtA, i, uint64(m.Timestamp)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) i-- dAtA[i] = 0x18 } @@ -5993,7 +5949,7 @@ func (m *Upsert_Config) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -6079,7 +6035,7 @@ func (m *Remove_Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -6089,7 +6045,7 @@ func (m *Remove_Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -6133,7 +6089,7 @@ func (m *Remove_MultiRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -6178,7 +6134,7 @@ func (m *Remove_TimestampRequest) MarshalToSizedBufferVT(dAtA []byte) (int, erro return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -6217,12 +6173,12 @@ func (m *Remove_Timestamp) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Operator != 0 { - i = encodeVarint(dAtA, i, uint64(m.Operator)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Operator)) i-- dAtA[i] = 0x10 } if m.Timestamp != 0 { - i = encodeVarint(dAtA, i, uint64(m.Timestamp)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) i-- dAtA[i] = 0x8 } @@ -6260,7 +6216,7 @@ func (m *Remove_Config) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Timestamp != 0 { - i = encodeVarint(dAtA, i, uint64(m.Timestamp)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) i-- dAtA[i] = 0x18 } @@ -6346,7 +6302,7 @@ func (m *Object_VectorRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x12 } @@ -6356,7 +6312,7 @@ func (m *Object_VectorRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -6402,7 +6358,7 @@ func (m *Object_Distance) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } @@ -6464,7 +6420,7 @@ func (m *Object_StreamDistance_Distance) MarshalToSizedBufferVT(dAtA []byte) (in return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -6486,7 +6442,7 @@ func (m *Object_StreamDistance_Status) MarshalToSizedBufferVT(dAtA []byte) (int, return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.Status) if err != nil { @@ -6494,7 +6450,7 @@ func (m *Object_StreamDistance_Status) MarshalToSizedBufferVT(dAtA []byte) (int, } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 @@ -6534,7 +6490,7 @@ func (m *Object_ID) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } @@ -6575,7 +6531,7 @@ func (m *Object_IDs) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Ids[iNdEx]) copy(dAtA[i:], m.Ids[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Ids[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Ids[iNdEx]))) i-- dAtA[i] = 0xa } @@ -6614,7 +6570,7 @@ func (m *Object_Vector) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Timestamp != 0 { - i = encodeVarint(dAtA, i, uint64(m.Timestamp)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) i-- dAtA[i] = 0x18 } @@ -6624,14 +6580,14 @@ func (m *Object_Vector) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i -= 4 binary.LittleEndian.PutUint32(dAtA[i:], uint32(f1)) } - i = encodeVarint(dAtA, i, uint64(len(m.Vector)*4)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Vector)*4)) i-- dAtA[i] = 0x12 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } @@ -6674,7 +6630,7 @@ func (m *Object_GetTimestampRequest) MarshalToSizedBufferVT(dAtA []byte) (int, e return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -6712,14 +6668,14 @@ func (m *Object_Timestamp) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Timestamp != 0 { - i = encodeVarint(dAtA, i, uint64(m.Timestamp)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Timestamp)) i-- dAtA[i] = 0x10 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } @@ -6763,7 +6719,7 @@ func (m *Object_Vectors) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -6826,7 +6782,7 @@ func (m *Object_StreamVector_Vector) MarshalToSizedBufferVT(dAtA []byte) (int, e return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -6848,7 +6804,7 @@ func (m *Object_StreamVector_Status) MarshalToSizedBufferVT(dAtA []byte) (int, e return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.Status) if err != nil { @@ -6856,7 +6812,7 @@ func (m *Object_StreamVector_Status) MarshalToSizedBufferVT(dAtA []byte) (int, e } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 @@ -6896,7 +6852,7 @@ func (m *Object_ReshapeVector) MarshalToSizedBufferVT(dAtA []byte) (int, error) if len(m.Shape) > 0 { var pksize2 int for _, num := range m.Shape { - pksize2 += sov(uint64(num)) + pksize2 += protohelpers.SizeOfVarint(uint64(num)) } i -= pksize2 j1 := i @@ -6910,14 +6866,14 @@ func (m *Object_ReshapeVector) MarshalToSizedBufferVT(dAtA []byte) (int, error) dAtA[j1] = uint8(num) j1++ } - i = encodeVarint(dAtA, i, uint64(pksize2)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(pksize2)) i-- dAtA[i] = 0x12 } if len(m.Object) > 0 { i -= len(m.Object) copy(dAtA[i:], m.Object) - i = encodeVarint(dAtA, i, uint64(len(m.Object))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Object))) i-- dAtA[i] = 0xa } @@ -6957,14 +6913,14 @@ func (m *Object_Blob) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Object) > 0 { i -= len(m.Object) copy(dAtA[i:], m.Object) - i = encodeVarint(dAtA, i, uint64(len(m.Object))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Object))) i-- dAtA[i] = 0x12 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarint(dAtA, i, uint64(len(m.Id))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } @@ -7026,7 +6982,7 @@ func (m *Object_StreamBlob_Blob) MarshalToSizedBufferVT(dAtA []byte) (int, error return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -7048,7 +7004,7 @@ func (m *Object_StreamBlob_Status) MarshalToSizedBufferVT(dAtA []byte) (int, err return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.Status) if err != nil { @@ -7056,7 +7012,7 @@ func (m *Object_StreamBlob_Status) MarshalToSizedBufferVT(dAtA []byte) (int, err } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 @@ -7097,7 +7053,7 @@ func (m *Object_Location) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.Ips) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Ips[iNdEx]) copy(dAtA[i:], m.Ips[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Ips[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Ips[iNdEx]))) i-- dAtA[i] = 0x1a } @@ -7105,14 +7061,14 @@ func (m *Object_Location) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Uuid) > 0 { i -= len(m.Uuid) copy(dAtA[i:], m.Uuid) - i = encodeVarint(dAtA, i, uint64(len(m.Uuid))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Uuid))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -7174,7 +7130,7 @@ func (m *Object_StreamLocation_Location) MarshalToSizedBufferVT(dAtA []byte) (in return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -7196,7 +7152,7 @@ func (m *Object_StreamLocation_Status) MarshalToSizedBufferVT(dAtA []byte) (int, return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.Status) if err != nil { @@ -7204,7 +7160,7 @@ func (m *Object_StreamLocation_Status) MarshalToSizedBufferVT(dAtA []byte) (int, } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 @@ -7248,7 +7204,7 @@ func (m *Object_Locations) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -7344,7 +7300,7 @@ func (m *Object_List_Response_Vector) MarshalToSizedBufferVT(dAtA []byte) (int, return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -7366,7 +7322,7 @@ func (m *Object_List_Response_Status) MarshalToSizedBufferVT(dAtA []byte) (int, return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { encoded, err := proto.Marshal(m.Status) if err != nil { @@ -7374,7 +7330,7 @@ func (m *Object_List_Response_Status) MarshalToSizedBufferVT(dAtA []byte) (int, } i -= len(encoded) copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } i-- dAtA[i] = 0x12 @@ -7478,7 +7434,7 @@ func (m *Control_CreateIndexRequest) MarshalToSizedBufferVT(dAtA []byte) (int, e copy(dAtA[i:], m.unknownFields) } if m.PoolSize != 0 { - i = encodeVarint(dAtA, i, uint64(m.PoolSize)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PoolSize)) i-- dAtA[i] = 0x8 } @@ -7551,21 +7507,21 @@ func (m *Discoverer_Request) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Node) > 0 { i -= len(m.Node) copy(dAtA[i:], m.Node) - i = encodeVarint(dAtA, i, uint64(len(m.Node))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Node))) i-- dAtA[i] = 0x1a } if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) - i = encodeVarint(dAtA, i, uint64(len(m.Namespace))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Namespace))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -7656,12 +7612,12 @@ func (m *Info_Index_Count) MarshalToSizedBufferVT(dAtA []byte) (int, error) { dAtA[i] = 0x18 } if m.Uncommitted != 0 { - i = encodeVarint(dAtA, i, uint64(m.Uncommitted)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Uncommitted)) i-- dAtA[i] = 0x10 } if m.Stored != 0 { - i = encodeVarint(dAtA, i, uint64(m.Stored)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Stored)) i-- dAtA[i] = 0x8 } @@ -7701,7 +7657,7 @@ func (m *Info_Index_UUID_Committed) MarshalToSizedBufferVT(dAtA []byte) (int, er if len(m.Uuid) > 0 { i -= len(m.Uuid) copy(dAtA[i:], m.Uuid) - i = encodeVarint(dAtA, i, uint64(len(m.Uuid))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Uuid))) i-- dAtA[i] = 0xa } @@ -7741,7 +7697,7 @@ func (m *Info_Index_UUID_Uncommitted) MarshalToSizedBufferVT(dAtA []byte) (int, if len(m.Uuid) > 0 { i -= len(m.Uuid) copy(dAtA[i:], m.Uuid) - i = encodeVarint(dAtA, i, uint64(len(m.Uuid))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Uuid))) i-- dAtA[i] = 0xa } @@ -7850,7 +7806,7 @@ func (m *Info_Pod) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x3a } @@ -7860,7 +7816,7 @@ func (m *Info_Pod) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } @@ -7870,35 +7826,35 @@ func (m *Info_Pod) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } if len(m.Ip) > 0 { i -= len(m.Ip) copy(dAtA[i:], m.Ip) - i = encodeVarint(dAtA, i, uint64(len(m.Ip))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Ip))) i-- dAtA[i] = 0x22 } if len(m.Namespace) > 0 { i -= len(m.Namespace) copy(dAtA[i:], m.Namespace) - i = encodeVarint(dAtA, i, uint64(len(m.Namespace))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Namespace))) i-- dAtA[i] = 0x1a } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x12 } if len(m.AppName) > 0 { i -= len(m.AppName) copy(dAtA[i:], m.AppName) - i = encodeVarint(dAtA, i, uint64(len(m.AppName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AppName))) i-- dAtA[i] = 0xa } @@ -7941,7 +7897,7 @@ func (m *Info_Node) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } @@ -7951,7 +7907,7 @@ func (m *Info_Node) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } @@ -7961,28 +7917,28 @@ func (m *Info_Node) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } if len(m.ExternalAddr) > 0 { i -= len(m.ExternalAddr) copy(dAtA[i:], m.ExternalAddr) - i = encodeVarint(dAtA, i, uint64(len(m.ExternalAddr))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ExternalAddr))) i-- dAtA[i] = 0x1a } if len(m.InternalAddr) > 0 { i -= len(m.InternalAddr) copy(dAtA[i:], m.InternalAddr) - i = encodeVarint(dAtA, i, uint64(len(m.InternalAddr))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.InternalAddr))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -8025,7 +7981,7 @@ func (m *Info_Service) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x32 } @@ -8035,7 +7991,7 @@ func (m *Info_Service) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x2a } @@ -8046,7 +8002,7 @@ func (m *Info_Service) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0x22 } @@ -8055,7 +8011,7 @@ func (m *Info_Service) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.ClusterIps) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.ClusterIps[iNdEx]) copy(dAtA[i:], m.ClusterIps[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.ClusterIps[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClusterIps[iNdEx]))) i-- dAtA[i] = 0x1a } @@ -8063,14 +8019,14 @@ func (m *Info_Service) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.ClusterIp) > 0 { i -= len(m.ClusterIp) copy(dAtA[i:], m.ClusterIp) - i = encodeVarint(dAtA, i, uint64(len(m.ClusterIp))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClusterIp))) i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -8108,14 +8064,14 @@ func (m *Info_ServicePort) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Port != 0 { - i = encodeVarint(dAtA, i, uint64(m.Port)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Port)) i-- dAtA[i] = 0x10 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) - i = encodeVarint(dAtA, i, uint64(len(m.Name))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } @@ -8158,15 +8114,15 @@ func (m *Info_Labels) MarshalToSizedBufferVT(dAtA []byte) (int, error) { baseI := i i -= len(v) copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } @@ -8210,15 +8166,15 @@ func (m *Info_Annotations) MarshalToSizedBufferVT(dAtA []byte) (int, error) { baseI := i i -= len(v) copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0xa } @@ -8365,7 +8321,7 @@ func (m *Info_Pods) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -8410,7 +8366,7 @@ func (m *Info_Nodes) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -8455,7 +8411,7 @@ func (m *Info_Services) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -8497,7 +8453,7 @@ func (m *Info_IPs) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.Ip) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Ip[iNdEx]) copy(dAtA[i:], m.Ip[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.Ip[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Ip[iNdEx]))) i-- dAtA[i] = 0xa } @@ -8569,14 +8525,14 @@ func (m *Mirror_Target) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.Port != 0 { - i = encodeVarint(dAtA, i, uint64(m.Port)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Port)) i-- dAtA[i] = 0x10 } if len(m.Host) > 0 { i -= len(m.Host) copy(dAtA[i:], m.Host) - i = encodeVarint(dAtA, i, uint64(len(m.Host))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Host))) i-- dAtA[i] = 0xa } @@ -8620,7 +8576,7 @@ func (m *Mirror_Targets) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -8694,17 +8650,6 @@ func (m *Empty) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarint(dAtA []byte, offset int, v uint64) int { - offset -= sov(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} func (m *Search_Request) SizeVT() (n int) { if m == nil { return 0 @@ -8712,11 +8657,11 @@ func (m *Search_Request) SizeVT() (n int) { var l int _ = l if len(m.Vector) > 0 { - n += 1 + sov(uint64(len(m.Vector)*4)) + len(m.Vector)*4 + n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Vector)*4)) + len(m.Vector)*4 } if m.Config != nil { l = m.Config.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -8731,7 +8676,7 @@ func (m *Search_MultiRequest) SizeVT() (n int) { if len(m.Requests) > 0 { for _, e := range m.Requests { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -8746,11 +8691,11 @@ func (m *Search_IDRequest) SizeVT() (n int) { _ = l l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Config != nil { l = m.Config.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -8765,7 +8710,7 @@ func (m *Search_MultiIDRequest) SizeVT() (n int) { if len(m.Requests) > 0 { for _, e := range m.Requests { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -8780,15 +8725,15 @@ func (m *Search_ObjectRequest) SizeVT() (n int) { _ = l l = len(m.Object) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Config != nil { l = m.Config.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Vectorizer != nil { l = m.Vectorizer.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -8803,7 +8748,7 @@ func (m *Search_MultiObjectRequest) SizeVT() (n int) { if len(m.Requests) > 0 { for _, e := range m.Requests { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -8818,10 +8763,10 @@ func (m *Search_Config) SizeVT() (n int) { _ = l l = len(m.RequestId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Num != 0 { - n += 1 + sov(uint64(m.Num)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Num)) } if m.Radius != 0 { n += 5 @@ -8830,21 +8775,21 @@ func (m *Search_Config) SizeVT() (n int) { n += 5 } if m.Timeout != 0 { - n += 1 + sov(uint64(m.Timeout)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timeout)) } if m.IngressFilters != nil { l = m.IngressFilters.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.EgressFilters != nil { l = m.EgressFilters.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.MinNum != 0 { - n += 1 + sov(uint64(m.MinNum)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.MinNum)) } if m.AggregationAlgorithm != 0 { - n += 1 + sov(uint64(m.AggregationAlgorithm)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.AggregationAlgorithm)) } n += len(m.unknownFields) return n @@ -8858,12 +8803,12 @@ func (m *Search_Response) SizeVT() (n int) { _ = l l = len(m.RequestId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Results) > 0 { for _, e := range m.Results { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -8879,7 +8824,7 @@ func (m *Search_Responses) SizeVT() (n int) { if len(m.Responses) > 0 { for _, e := range m.Responses { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -8907,7 +8852,7 @@ func (m *Search_StreamResponse_Response) SizeVT() (n int) { _ = l if m.Response != nil { l = m.Response.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -8925,7 +8870,7 @@ func (m *Search_StreamResponse_Status) SizeVT() (n int) { } else { l = proto.Size(m.Status) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -8947,10 +8892,10 @@ func (m *Filter_Target) SizeVT() (n int) { _ = l l = len(m.Host) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Port != 0 { - n += 1 + sov(uint64(m.Port)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Port)) } n += len(m.unknownFields) return n @@ -8965,7 +8910,7 @@ func (m *Filter_Config) SizeVT() (n int) { if len(m.Targets) > 0 { for _, e := range m.Targets { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -8990,11 +8935,11 @@ func (m *Insert_Request) SizeVT() (n int) { _ = l if m.Vector != nil { l = m.Vector.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Config != nil { l = m.Config.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -9009,7 +8954,7 @@ func (m *Insert_MultiRequest) SizeVT() (n int) { if len(m.Requests) > 0 { for _, e := range m.Requests { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -9024,15 +8969,15 @@ func (m *Insert_ObjectRequest) SizeVT() (n int) { _ = l if m.Object != nil { l = m.Object.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Config != nil { l = m.Config.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Vectorizer != nil { l = m.Vectorizer.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -9047,7 +8992,7 @@ func (m *Insert_MultiObjectRequest) SizeVT() (n int) { if len(m.Requests) > 0 { for _, e := range m.Requests { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -9065,10 +9010,10 @@ func (m *Insert_Config) SizeVT() (n int) { } if m.Filters != nil { l = m.Filters.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Timestamp != 0 { - n += 1 + sov(uint64(m.Timestamp)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) } n += len(m.unknownFields) return n @@ -9092,11 +9037,11 @@ func (m *Update_Request) SizeVT() (n int) { _ = l if m.Vector != nil { l = m.Vector.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Config != nil { l = m.Config.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -9111,7 +9056,7 @@ func (m *Update_MultiRequest) SizeVT() (n int) { if len(m.Requests) > 0 { for _, e := range m.Requests { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -9126,15 +9071,15 @@ func (m *Update_ObjectRequest) SizeVT() (n int) { _ = l if m.Object != nil { l = m.Object.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Config != nil { l = m.Config.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Vectorizer != nil { l = m.Vectorizer.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -9149,7 +9094,7 @@ func (m *Update_MultiObjectRequest) SizeVT() (n int) { if len(m.Requests) > 0 { for _, e := range m.Requests { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -9167,10 +9112,10 @@ func (m *Update_Config) SizeVT() (n int) { } if m.Filters != nil { l = m.Filters.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Timestamp != 0 { - n += 1 + sov(uint64(m.Timestamp)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) } if m.DisableBalancedUpdate { n += 2 @@ -9197,11 +9142,11 @@ func (m *Upsert_Request) SizeVT() (n int) { _ = l if m.Vector != nil { l = m.Vector.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Config != nil { l = m.Config.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -9216,7 +9161,7 @@ func (m *Upsert_MultiRequest) SizeVT() (n int) { if len(m.Requests) > 0 { for _, e := range m.Requests { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -9231,15 +9176,15 @@ func (m *Upsert_ObjectRequest) SizeVT() (n int) { _ = l if m.Object != nil { l = m.Object.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Config != nil { l = m.Config.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Vectorizer != nil { l = m.Vectorizer.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -9254,7 +9199,7 @@ func (m *Upsert_MultiObjectRequest) SizeVT() (n int) { if len(m.Requests) > 0 { for _, e := range m.Requests { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -9272,10 +9217,10 @@ func (m *Upsert_Config) SizeVT() (n int) { } if m.Filters != nil { l = m.Filters.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Timestamp != 0 { - n += 1 + sov(uint64(m.Timestamp)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) } if m.DisableBalancedUpdate { n += 2 @@ -9302,11 +9247,11 @@ func (m *Remove_Request) SizeVT() (n int) { _ = l if m.Id != nil { l = m.Id.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Config != nil { l = m.Config.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -9321,7 +9266,7 @@ func (m *Remove_MultiRequest) SizeVT() (n int) { if len(m.Requests) > 0 { for _, e := range m.Requests { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -9337,7 +9282,7 @@ func (m *Remove_TimestampRequest) SizeVT() (n int) { if len(m.Timestamps) > 0 { for _, e := range m.Timestamps { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -9351,10 +9296,10 @@ func (m *Remove_Timestamp) SizeVT() (n int) { var l int _ = l if m.Timestamp != 0 { - n += 1 + sov(uint64(m.Timestamp)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) } if m.Operator != 0 { - n += 1 + sov(uint64(m.Operator)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Operator)) } n += len(m.unknownFields) return n @@ -9370,7 +9315,7 @@ func (m *Remove_Config) SizeVT() (n int) { n += 2 } if m.Timestamp != 0 { - n += 1 + sov(uint64(m.Timestamp)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) } n += len(m.unknownFields) return n @@ -9394,11 +9339,11 @@ func (m *Object_VectorRequest) SizeVT() (n int) { _ = l if m.Id != nil { l = m.Id.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Filters != nil { l = m.Filters.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -9412,7 +9357,7 @@ func (m *Object_Distance) SizeVT() (n int) { _ = l l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Distance != 0 { n += 5 @@ -9442,7 +9387,7 @@ func (m *Object_StreamDistance_Distance) SizeVT() (n int) { _ = l if m.Distance != nil { l = m.Distance.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -9460,7 +9405,7 @@ func (m *Object_StreamDistance_Status) SizeVT() (n int) { } else { l = proto.Size(m.Status) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -9472,7 +9417,7 @@ func (m *Object_ID) SizeVT() (n int) { _ = l l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -9487,7 +9432,7 @@ func (m *Object_IDs) SizeVT() (n int) { if len(m.Ids) > 0 { for _, s := range m.Ids { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -9502,13 +9447,13 @@ func (m *Object_Vector) SizeVT() (n int) { _ = l l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Vector) > 0 { - n += 1 + sov(uint64(len(m.Vector)*4)) + len(m.Vector)*4 + n += 1 + protohelpers.SizeOfVarint(uint64(len(m.Vector)*4)) + len(m.Vector)*4 } if m.Timestamp != 0 { - n += 1 + sov(uint64(m.Timestamp)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) } n += len(m.unknownFields) return n @@ -9522,7 +9467,7 @@ func (m *Object_GetTimestampRequest) SizeVT() (n int) { _ = l if m.Id != nil { l = m.Id.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -9536,10 +9481,10 @@ func (m *Object_Timestamp) SizeVT() (n int) { _ = l l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Timestamp != 0 { - n += 1 + sov(uint64(m.Timestamp)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Timestamp)) } n += len(m.unknownFields) return n @@ -9554,7 +9499,7 @@ func (m *Object_Vectors) SizeVT() (n int) { if len(m.Vectors) > 0 { for _, e := range m.Vectors { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -9582,7 +9527,7 @@ func (m *Object_StreamVector_Vector) SizeVT() (n int) { _ = l if m.Vector != nil { l = m.Vector.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -9600,7 +9545,7 @@ func (m *Object_StreamVector_Status) SizeVT() (n int) { } else { l = proto.Size(m.Status) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -9612,14 +9557,14 @@ func (m *Object_ReshapeVector) SizeVT() (n int) { _ = l l = len(m.Object) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Shape) > 0 { l = 0 for _, e := range m.Shape { - l += sov(uint64(e)) + l += protohelpers.SizeOfVarint(uint64(e)) } - n += 1 + sov(uint64(l)) + l + n += 1 + protohelpers.SizeOfVarint(uint64(l)) + l } n += len(m.unknownFields) return n @@ -9633,11 +9578,11 @@ func (m *Object_Blob) SizeVT() (n int) { _ = l l = len(m.Id) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Object) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -9664,7 +9609,7 @@ func (m *Object_StreamBlob_Blob) SizeVT() (n int) { _ = l if m.Blob != nil { l = m.Blob.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -9682,7 +9627,7 @@ func (m *Object_StreamBlob_Status) SizeVT() (n int) { } else { l = proto.Size(m.Status) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -9694,16 +9639,16 @@ func (m *Object_Location) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Uuid) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Ips) > 0 { for _, s := range m.Ips { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -9731,7 +9676,7 @@ func (m *Object_StreamLocation_Location) SizeVT() (n int) { _ = l if m.Location != nil { l = m.Location.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -9749,7 +9694,7 @@ func (m *Object_StreamLocation_Status) SizeVT() (n int) { } else { l = proto.Size(m.Status) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -9762,7 +9707,7 @@ func (m *Object_Locations) SizeVT() (n int) { if len(m.Locations) > 0 { for _, e := range m.Locations { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -9800,7 +9745,7 @@ func (m *Object_List_Response_Vector) SizeVT() (n int) { _ = l if m.Vector != nil { l = m.Vector.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -9818,7 +9763,7 @@ func (m *Object_List_Response_Status) SizeVT() (n int) { } else { l = proto.Size(m.Status) } - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } return n } @@ -9849,7 +9794,7 @@ func (m *Control_CreateIndexRequest) SizeVT() (n int) { var l int _ = l if m.PoolSize != 0 { - n += 1 + sov(uint64(m.PoolSize)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.PoolSize)) } n += len(m.unknownFields) return n @@ -9873,15 +9818,15 @@ func (m *Discoverer_Request) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Namespace) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Node) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -9904,10 +9849,10 @@ func (m *Info_Index_Count) SizeVT() (n int) { var l int _ = l if m.Stored != 0 { - n += 1 + sov(uint64(m.Stored)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Stored)) } if m.Uncommitted != 0 { - n += 1 + sov(uint64(m.Uncommitted)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Uncommitted)) } if m.Indexing { n += 2 @@ -9927,7 +9872,7 @@ func (m *Info_Index_UUID_Committed) SizeVT() (n int) { _ = l l = len(m.Uuid) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -9941,7 +9886,7 @@ func (m *Info_Index_UUID_Uncommitted) SizeVT() (n int) { _ = l l = len(m.Uuid) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -9975,31 +9920,31 @@ func (m *Info_Pod) SizeVT() (n int) { _ = l l = len(m.AppName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Namespace) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Ip) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Cpu != nil { l = m.Cpu.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Memory != nil { l = m.Memory.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Node != nil { l = m.Node.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -10013,27 +9958,27 @@ func (m *Info_Node) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.InternalAddr) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ExternalAddr) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Cpu != nil { l = m.Cpu.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Memory != nil { l = m.Memory.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Pods != nil { l = m.Pods.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -10047,31 +9992,31 @@ func (m *Info_Service) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ClusterIp) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.ClusterIps) > 0 { for _, s := range m.ClusterIps { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if len(m.Ports) > 0 { for _, e := range m.Ports { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } if m.Labels != nil { l = m.Labels.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Annotations != nil { l = m.Annotations.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -10085,10 +10030,10 @@ func (m *Info_ServicePort) SizeVT() (n int) { _ = l l = len(m.Name) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Port != 0 { - n += 1 + sov(uint64(m.Port)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Port)) } n += len(m.unknownFields) return n @@ -10104,8 +10049,8 @@ func (m *Info_Labels) SizeVT() (n int) { for k, v := range m.Labels { _ = k _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } n += len(m.unknownFields) @@ -10122,8 +10067,8 @@ func (m *Info_Annotations) SizeVT() (n int) { for k, v := range m.Annotations { _ = k _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } n += len(m.unknownFields) @@ -10177,7 +10122,7 @@ func (m *Info_Pods) SizeVT() (n int) { if len(m.Pods) > 0 { for _, e := range m.Pods { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -10193,7 +10138,7 @@ func (m *Info_Nodes) SizeVT() (n int) { if len(m.Nodes) > 0 { for _, e := range m.Nodes { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -10209,7 +10154,7 @@ func (m *Info_Services) SizeVT() (n int) { if len(m.Services) > 0 { for _, e := range m.Services { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -10225,7 +10170,7 @@ func (m *Info_IPs) SizeVT() (n int) { if len(m.Ip) > 0 { for _, s := range m.Ip { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -10250,10 +10195,10 @@ func (m *Mirror_Target) SizeVT() (n int) { _ = l l = len(m.Host) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if m.Port != 0 { - n += 1 + sov(uint64(m.Port)) + n += 1 + protohelpers.SizeOfVarint(uint64(m.Port)) } n += len(m.unknownFields) return n @@ -10268,7 +10213,7 @@ func (m *Mirror_Targets) SizeVT() (n int) { if len(m.Targets) > 0 { for _, e := range m.Targets { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -10295,12 +10240,6 @@ func (m *Empty) SizeVT() (n int) { return n } -func sov(x uint64) (n int) { - return (bits.Len64(x|1) + 6) / 7 -} -func soz(x uint64) (n int) { - return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} func (m *Search_Request) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -10309,7 +10248,7 @@ func (m *Search_Request) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10344,7 +10283,7 @@ func (m *Search_Request) UnmarshalVT(dAtA []byte) error { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10357,11 +10296,11 @@ func (m *Search_Request) UnmarshalVT(dAtA []byte) error { } } if packedLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -10391,7 +10330,7 @@ func (m *Search_Request) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10404,11 +10343,11 @@ func (m *Search_Request) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -10422,12 +10361,12 @@ func (m *Search_Request) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -10450,7 +10389,7 @@ func (m *Search_MultiRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10478,7 +10417,7 @@ func (m *Search_MultiRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10491,11 +10430,11 @@ func (m *Search_MultiRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -10507,12 +10446,12 @@ func (m *Search_MultiRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -10535,7 +10474,7 @@ func (m *Search_IDRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10563,7 +10502,7 @@ func (m *Search_IDRequest) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10577,11 +10516,11 @@ func (m *Search_IDRequest) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -10595,7 +10534,7 @@ func (m *Search_IDRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10608,11 +10547,11 @@ func (m *Search_IDRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -10626,12 +10565,12 @@ func (m *Search_IDRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -10654,7 +10593,7 @@ func (m *Search_MultiIDRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10682,7 +10621,7 @@ func (m *Search_MultiIDRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10695,11 +10634,11 @@ func (m *Search_MultiIDRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -10711,12 +10650,12 @@ func (m *Search_MultiIDRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -10739,7 +10678,7 @@ func (m *Search_ObjectRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10767,7 +10706,7 @@ func (m *Search_ObjectRequest) UnmarshalVT(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10780,11 +10719,11 @@ func (m *Search_ObjectRequest) UnmarshalVT(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -10801,7 +10740,7 @@ func (m *Search_ObjectRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10814,11 +10753,11 @@ func (m *Search_ObjectRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -10837,7 +10776,7 @@ func (m *Search_ObjectRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10850,11 +10789,11 @@ func (m *Search_ObjectRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -10868,12 +10807,12 @@ func (m *Search_ObjectRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -10896,7 +10835,7 @@ func (m *Search_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10924,7 +10863,7 @@ func (m *Search_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10937,11 +10876,11 @@ func (m *Search_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -10953,12 +10892,12 @@ func (m *Search_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -10981,7 +10920,7 @@ func (m *Search_Config) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11009,7 +10948,7 @@ func (m *Search_Config) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11023,11 +10962,11 @@ func (m *Search_Config) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -11041,7 +10980,7 @@ func (m *Search_Config) UnmarshalVT(dAtA []byte) error { m.Num = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11082,7 +11021,7 @@ func (m *Search_Config) UnmarshalVT(dAtA []byte) error { m.Timeout = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11101,7 +11040,7 @@ func (m *Search_Config) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11114,11 +11053,11 @@ func (m *Search_Config) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -11137,7 +11076,7 @@ func (m *Search_Config) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11150,11 +11089,11 @@ func (m *Search_Config) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -11173,7 +11112,7 @@ func (m *Search_Config) UnmarshalVT(dAtA []byte) error { m.MinNum = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11192,7 +11131,7 @@ func (m *Search_Config) UnmarshalVT(dAtA []byte) error { m.AggregationAlgorithm = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11206,12 +11145,12 @@ func (m *Search_Config) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -11234,7 +11173,7 @@ func (m *Search_Response) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11262,7 +11201,7 @@ func (m *Search_Response) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11276,11 +11215,11 @@ func (m *Search_Response) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -11294,7 +11233,7 @@ func (m *Search_Response) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11307,11 +11246,11 @@ func (m *Search_Response) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -11323,12 +11262,12 @@ func (m *Search_Response) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -11351,7 +11290,7 @@ func (m *Search_Responses) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11379,7 +11318,7 @@ func (m *Search_Responses) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11392,11 +11331,11 @@ func (m *Search_Responses) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -11408,12 +11347,12 @@ func (m *Search_Responses) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -11436,7 +11375,7 @@ func (m *Search_StreamResponse) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11464,7 +11403,7 @@ func (m *Search_StreamResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11477,11 +11416,11 @@ func (m *Search_StreamResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -11505,7 +11444,7 @@ func (m *Search_StreamResponse) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11518,11 +11457,11 @@ func (m *Search_StreamResponse) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -11557,12 +11496,12 @@ func (m *Search_StreamResponse) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -11585,7 +11524,7 @@ func (m *Search) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11608,12 +11547,12 @@ func (m *Search) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -11636,7 +11575,7 @@ func (m *Filter_Target) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11664,7 +11603,7 @@ func (m *Filter_Target) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11678,11 +11617,11 @@ func (m *Filter_Target) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -11696,7 +11635,7 @@ func (m *Filter_Target) UnmarshalVT(dAtA []byte) error { m.Port = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11710,12 +11649,12 @@ func (m *Filter_Target) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -11738,7 +11677,7 @@ func (m *Filter_Config) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11766,7 +11705,7 @@ func (m *Filter_Config) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11779,11 +11718,11 @@ func (m *Filter_Config) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -11795,12 +11734,12 @@ func (m *Filter_Config) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -11823,7 +11762,7 @@ func (m *Filter) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11846,12 +11785,12 @@ func (m *Filter) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -11874,7 +11813,7 @@ func (m *Insert_Request) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11902,7 +11841,7 @@ func (m *Insert_Request) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11915,11 +11854,11 @@ func (m *Insert_Request) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -11938,7 +11877,7 @@ func (m *Insert_Request) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11951,11 +11890,11 @@ func (m *Insert_Request) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -11969,12 +11908,12 @@ func (m *Insert_Request) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -11997,7 +11936,7 @@ func (m *Insert_MultiRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12025,7 +11964,7 @@ func (m *Insert_MultiRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12038,11 +11977,11 @@ func (m *Insert_MultiRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -12054,12 +11993,12 @@ func (m *Insert_MultiRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -12082,7 +12021,7 @@ func (m *Insert_ObjectRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12110,7 +12049,7 @@ func (m *Insert_ObjectRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12123,11 +12062,11 @@ func (m *Insert_ObjectRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -12146,7 +12085,7 @@ func (m *Insert_ObjectRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12159,11 +12098,11 @@ func (m *Insert_ObjectRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -12182,7 +12121,7 @@ func (m *Insert_ObjectRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12195,11 +12134,11 @@ func (m *Insert_ObjectRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -12213,12 +12152,12 @@ func (m *Insert_ObjectRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -12241,7 +12180,7 @@ func (m *Insert_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12269,7 +12208,7 @@ func (m *Insert_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12282,11 +12221,11 @@ func (m *Insert_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -12298,12 +12237,12 @@ func (m *Insert_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -12326,7 +12265,7 @@ func (m *Insert_Config) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12354,7 +12293,7 @@ func (m *Insert_Config) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12374,7 +12313,7 @@ func (m *Insert_Config) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12387,11 +12326,11 @@ func (m *Insert_Config) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -12410,7 +12349,7 @@ func (m *Insert_Config) UnmarshalVT(dAtA []byte) error { m.Timestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12424,12 +12363,12 @@ func (m *Insert_Config) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -12452,7 +12391,7 @@ func (m *Insert) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12475,12 +12414,12 @@ func (m *Insert) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -12503,7 +12442,7 @@ func (m *Update_Request) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12531,7 +12470,7 @@ func (m *Update_Request) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12544,11 +12483,11 @@ func (m *Update_Request) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -12567,7 +12506,7 @@ func (m *Update_Request) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12580,11 +12519,11 @@ func (m *Update_Request) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -12598,12 +12537,12 @@ func (m *Update_Request) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -12626,7 +12565,7 @@ func (m *Update_MultiRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12654,7 +12593,7 @@ func (m *Update_MultiRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12667,11 +12606,11 @@ func (m *Update_MultiRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -12683,12 +12622,12 @@ func (m *Update_MultiRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -12711,7 +12650,7 @@ func (m *Update_ObjectRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12739,7 +12678,7 @@ func (m *Update_ObjectRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12752,11 +12691,11 @@ func (m *Update_ObjectRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -12775,7 +12714,7 @@ func (m *Update_ObjectRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12788,11 +12727,11 @@ func (m *Update_ObjectRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -12811,7 +12750,7 @@ func (m *Update_ObjectRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12824,11 +12763,11 @@ func (m *Update_ObjectRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -12842,12 +12781,12 @@ func (m *Update_ObjectRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -12870,7 +12809,7 @@ func (m *Update_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12898,7 +12837,7 @@ func (m *Update_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12911,11 +12850,11 @@ func (m *Update_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -12927,12 +12866,12 @@ func (m *Update_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -12955,7 +12894,7 @@ func (m *Update_Config) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12983,7 +12922,7 @@ func (m *Update_Config) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13003,7 +12942,7 @@ func (m *Update_Config) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13016,11 +12955,11 @@ func (m *Update_Config) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -13039,7 +12978,7 @@ func (m *Update_Config) UnmarshalVT(dAtA []byte) error { m.Timestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13058,7 +12997,7 @@ func (m *Update_Config) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13073,12 +13012,12 @@ func (m *Update_Config) UnmarshalVT(dAtA []byte) error { m.DisableBalancedUpdate = bool(v != 0) default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -13101,7 +13040,7 @@ func (m *Update) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13124,12 +13063,12 @@ func (m *Update) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -13152,7 +13091,7 @@ func (m *Upsert_Request) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13180,7 +13119,7 @@ func (m *Upsert_Request) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13193,11 +13132,11 @@ func (m *Upsert_Request) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -13216,7 +13155,7 @@ func (m *Upsert_Request) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13229,11 +13168,11 @@ func (m *Upsert_Request) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -13247,12 +13186,12 @@ func (m *Upsert_Request) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -13275,7 +13214,7 @@ func (m *Upsert_MultiRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13303,7 +13242,7 @@ func (m *Upsert_MultiRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13316,11 +13255,11 @@ func (m *Upsert_MultiRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -13332,12 +13271,12 @@ func (m *Upsert_MultiRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -13360,7 +13299,7 @@ func (m *Upsert_ObjectRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13388,7 +13327,7 @@ func (m *Upsert_ObjectRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13401,11 +13340,11 @@ func (m *Upsert_ObjectRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -13424,7 +13363,7 @@ func (m *Upsert_ObjectRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13437,11 +13376,11 @@ func (m *Upsert_ObjectRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -13460,7 +13399,7 @@ func (m *Upsert_ObjectRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13473,11 +13412,11 @@ func (m *Upsert_ObjectRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -13491,12 +13430,12 @@ func (m *Upsert_ObjectRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -13519,7 +13458,7 @@ func (m *Upsert_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13547,7 +13486,7 @@ func (m *Upsert_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13560,11 +13499,11 @@ func (m *Upsert_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -13576,12 +13515,12 @@ func (m *Upsert_MultiObjectRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -13604,7 +13543,7 @@ func (m *Upsert_Config) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13632,7 +13571,7 @@ func (m *Upsert_Config) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13652,7 +13591,7 @@ func (m *Upsert_Config) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13665,11 +13604,11 @@ func (m *Upsert_Config) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -13688,7 +13627,7 @@ func (m *Upsert_Config) UnmarshalVT(dAtA []byte) error { m.Timestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13707,7 +13646,7 @@ func (m *Upsert_Config) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13722,12 +13661,12 @@ func (m *Upsert_Config) UnmarshalVT(dAtA []byte) error { m.DisableBalancedUpdate = bool(v != 0) default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -13750,7 +13689,7 @@ func (m *Upsert) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13773,12 +13712,12 @@ func (m *Upsert) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -13801,7 +13740,7 @@ func (m *Remove_Request) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13829,7 +13768,7 @@ func (m *Remove_Request) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13842,11 +13781,11 @@ func (m *Remove_Request) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -13865,7 +13804,7 @@ func (m *Remove_Request) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13878,11 +13817,11 @@ func (m *Remove_Request) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -13896,12 +13835,12 @@ func (m *Remove_Request) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -13924,7 +13863,7 @@ func (m *Remove_MultiRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13952,7 +13891,7 @@ func (m *Remove_MultiRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13965,11 +13904,11 @@ func (m *Remove_MultiRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -13981,12 +13920,12 @@ func (m *Remove_MultiRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14009,7 +13948,7 @@ func (m *Remove_TimestampRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14037,7 +13976,7 @@ func (m *Remove_TimestampRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14050,11 +13989,11 @@ func (m *Remove_TimestampRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -14066,12 +14005,12 @@ func (m *Remove_TimestampRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14094,7 +14033,7 @@ func (m *Remove_Timestamp) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14122,7 +14061,7 @@ func (m *Remove_Timestamp) UnmarshalVT(dAtA []byte) error { m.Timestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14141,7 +14080,7 @@ func (m *Remove_Timestamp) UnmarshalVT(dAtA []byte) error { m.Operator = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14155,12 +14094,12 @@ func (m *Remove_Timestamp) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14183,7 +14122,7 @@ func (m *Remove_Config) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14211,7 +14150,7 @@ func (m *Remove_Config) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14231,7 +14170,7 @@ func (m *Remove_Config) UnmarshalVT(dAtA []byte) error { m.Timestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14245,12 +14184,12 @@ func (m *Remove_Config) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14273,7 +14212,7 @@ func (m *Remove) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14296,12 +14235,12 @@ func (m *Remove) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14324,7 +14263,7 @@ func (m *Object_VectorRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14352,7 +14291,7 @@ func (m *Object_VectorRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14365,11 +14304,11 @@ func (m *Object_VectorRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -14388,7 +14327,7 @@ func (m *Object_VectorRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14401,11 +14340,11 @@ func (m *Object_VectorRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -14419,12 +14358,12 @@ func (m *Object_VectorRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14447,7 +14386,7 @@ func (m *Object_Distance) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14475,7 +14414,7 @@ func (m *Object_Distance) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14489,11 +14428,11 @@ func (m *Object_Distance) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -14513,12 +14452,12 @@ func (m *Object_Distance) UnmarshalVT(dAtA []byte) error { m.Distance = float32(math.Float32frombits(v)) default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14541,7 +14480,7 @@ func (m *Object_StreamDistance) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14569,7 +14508,7 @@ func (m *Object_StreamDistance) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14582,11 +14521,11 @@ func (m *Object_StreamDistance) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -14610,7 +14549,7 @@ func (m *Object_StreamDistance) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14623,11 +14562,11 @@ func (m *Object_StreamDistance) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -14662,12 +14601,12 @@ func (m *Object_StreamDistance) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14690,7 +14629,7 @@ func (m *Object_ID) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14718,7 +14657,7 @@ func (m *Object_ID) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14732,11 +14671,11 @@ func (m *Object_ID) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -14745,12 +14684,12 @@ func (m *Object_ID) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14773,7 +14712,7 @@ func (m *Object_IDs) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14801,7 +14740,7 @@ func (m *Object_IDs) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14815,11 +14754,11 @@ func (m *Object_IDs) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -14828,12 +14767,12 @@ func (m *Object_IDs) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14856,7 +14795,7 @@ func (m *Object_Vector) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14884,7 +14823,7 @@ func (m *Object_Vector) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14898,11 +14837,11 @@ func (m *Object_Vector) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -14923,7 +14862,7 @@ func (m *Object_Vector) UnmarshalVT(dAtA []byte) error { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14936,11 +14875,11 @@ func (m *Object_Vector) UnmarshalVT(dAtA []byte) error { } } if packedLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -14970,7 +14909,7 @@ func (m *Object_Vector) UnmarshalVT(dAtA []byte) error { m.Timestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14984,12 +14923,12 @@ func (m *Object_Vector) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -15012,7 +14951,7 @@ func (m *Object_GetTimestampRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15040,7 +14979,7 @@ func (m *Object_GetTimestampRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15053,11 +14992,11 @@ func (m *Object_GetTimestampRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -15071,12 +15010,12 @@ func (m *Object_GetTimestampRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -15099,7 +15038,7 @@ func (m *Object_Timestamp) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15127,7 +15066,7 @@ func (m *Object_Timestamp) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15141,11 +15080,11 @@ func (m *Object_Timestamp) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -15159,7 +15098,7 @@ func (m *Object_Timestamp) UnmarshalVT(dAtA []byte) error { m.Timestamp = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15173,12 +15112,12 @@ func (m *Object_Timestamp) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -15201,7 +15140,7 @@ func (m *Object_Vectors) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15229,7 +15168,7 @@ func (m *Object_Vectors) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15242,11 +15181,11 @@ func (m *Object_Vectors) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -15258,12 +15197,12 @@ func (m *Object_Vectors) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -15286,7 +15225,7 @@ func (m *Object_StreamVector) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15314,7 +15253,7 @@ func (m *Object_StreamVector) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15327,11 +15266,11 @@ func (m *Object_StreamVector) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -15355,7 +15294,7 @@ func (m *Object_StreamVector) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15368,11 +15307,11 @@ func (m *Object_StreamVector) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -15407,12 +15346,12 @@ func (m *Object_StreamVector) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -15435,7 +15374,7 @@ func (m *Object_ReshapeVector) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15463,7 +15402,7 @@ func (m *Object_ReshapeVector) UnmarshalVT(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15476,11 +15415,11 @@ func (m *Object_ReshapeVector) UnmarshalVT(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -15495,7 +15434,7 @@ func (m *Object_ReshapeVector) UnmarshalVT(dAtA []byte) error { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15512,7 +15451,7 @@ func (m *Object_ReshapeVector) UnmarshalVT(dAtA []byte) error { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15525,11 +15464,11 @@ func (m *Object_ReshapeVector) UnmarshalVT(dAtA []byte) error { } } if packedLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + packedLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -15549,7 +15488,7 @@ func (m *Object_ReshapeVector) UnmarshalVT(dAtA []byte) error { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15568,12 +15507,12 @@ func (m *Object_ReshapeVector) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -15596,7 +15535,7 @@ func (m *Object_Blob) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15624,7 +15563,7 @@ func (m *Object_Blob) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15638,11 +15577,11 @@ func (m *Object_Blob) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -15656,7 +15595,7 @@ func (m *Object_Blob) UnmarshalVT(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15669,11 +15608,11 @@ func (m *Object_Blob) UnmarshalVT(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -15685,12 +15624,12 @@ func (m *Object_Blob) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -15713,7 +15652,7 @@ func (m *Object_StreamBlob) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15741,7 +15680,7 @@ func (m *Object_StreamBlob) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15754,11 +15693,11 @@ func (m *Object_StreamBlob) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -15782,7 +15721,7 @@ func (m *Object_StreamBlob) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15795,11 +15734,11 @@ func (m *Object_StreamBlob) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -15834,12 +15773,12 @@ func (m *Object_StreamBlob) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -15862,7 +15801,7 @@ func (m *Object_Location) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15890,7 +15829,7 @@ func (m *Object_Location) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15904,11 +15843,11 @@ func (m *Object_Location) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -15922,7 +15861,7 @@ func (m *Object_Location) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15936,11 +15875,11 @@ func (m *Object_Location) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -15954,7 +15893,7 @@ func (m *Object_Location) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15968,11 +15907,11 @@ func (m *Object_Location) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -15981,12 +15920,12 @@ func (m *Object_Location) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -16009,7 +15948,7 @@ func (m *Object_StreamLocation) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16037,7 +15976,7 @@ func (m *Object_StreamLocation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16050,11 +15989,11 @@ func (m *Object_StreamLocation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -16078,7 +16017,7 @@ func (m *Object_StreamLocation) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16091,11 +16030,11 @@ func (m *Object_StreamLocation) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -16130,12 +16069,12 @@ func (m *Object_StreamLocation) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -16158,7 +16097,7 @@ func (m *Object_Locations) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16186,7 +16125,7 @@ func (m *Object_Locations) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16199,11 +16138,11 @@ func (m *Object_Locations) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -16215,12 +16154,12 @@ func (m *Object_Locations) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -16243,7 +16182,7 @@ func (m *Object_List_Request) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16266,12 +16205,12 @@ func (m *Object_List_Request) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -16294,7 +16233,7 @@ func (m *Object_List_Response) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16322,7 +16261,7 @@ func (m *Object_List_Response) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16335,11 +16274,11 @@ func (m *Object_List_Response) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -16363,7 +16302,7 @@ func (m *Object_List_Response) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16376,11 +16315,11 @@ func (m *Object_List_Response) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -16415,12 +16354,12 @@ func (m *Object_List_Response) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -16443,7 +16382,7 @@ func (m *Object_List) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16466,12 +16405,12 @@ func (m *Object_List) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -16494,7 +16433,7 @@ func (m *Object) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16517,12 +16456,12 @@ func (m *Object) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -16545,7 +16484,7 @@ func (m *Control_CreateIndexRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16573,7 +16512,7 @@ func (m *Control_CreateIndexRequest) UnmarshalVT(dAtA []byte) error { m.PoolSize = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16587,12 +16526,12 @@ func (m *Control_CreateIndexRequest) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -16615,7 +16554,7 @@ func (m *Control) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16638,12 +16577,12 @@ func (m *Control) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -16666,7 +16605,7 @@ func (m *Discoverer_Request) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16694,7 +16633,7 @@ func (m *Discoverer_Request) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16708,11 +16647,11 @@ func (m *Discoverer_Request) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -16726,7 +16665,7 @@ func (m *Discoverer_Request) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16740,11 +16679,11 @@ func (m *Discoverer_Request) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -16758,7 +16697,7 @@ func (m *Discoverer_Request) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16772,11 +16711,11 @@ func (m *Discoverer_Request) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -16785,12 +16724,12 @@ func (m *Discoverer_Request) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -16813,7 +16752,7 @@ func (m *Discoverer) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16836,12 +16775,12 @@ func (m *Discoverer) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -16864,7 +16803,7 @@ func (m *Info_Index_Count) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16892,7 +16831,7 @@ func (m *Info_Index_Count) UnmarshalVT(dAtA []byte) error { m.Stored = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16911,7 +16850,7 @@ func (m *Info_Index_Count) UnmarshalVT(dAtA []byte) error { m.Uncommitted = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16930,7 +16869,7 @@ func (m *Info_Index_Count) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16950,7 +16889,7 @@ func (m *Info_Index_Count) UnmarshalVT(dAtA []byte) error { var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -16965,12 +16904,12 @@ func (m *Info_Index_Count) UnmarshalVT(dAtA []byte) error { m.Saving = bool(v != 0) default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -16993,7 +16932,7 @@ func (m *Info_Index_UUID_Committed) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17021,7 +16960,7 @@ func (m *Info_Index_UUID_Committed) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17035,11 +16974,11 @@ func (m *Info_Index_UUID_Committed) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17048,12 +16987,12 @@ func (m *Info_Index_UUID_Committed) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -17076,7 +17015,7 @@ func (m *Info_Index_UUID_Uncommitted) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17104,7 +17043,7 @@ func (m *Info_Index_UUID_Uncommitted) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17118,11 +17057,11 @@ func (m *Info_Index_UUID_Uncommitted) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17131,12 +17070,12 @@ func (m *Info_Index_UUID_Uncommitted) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -17159,7 +17098,7 @@ func (m *Info_Index_UUID) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17182,12 +17121,12 @@ func (m *Info_Index_UUID) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -17210,7 +17149,7 @@ func (m *Info_Index) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17233,12 +17172,12 @@ func (m *Info_Index) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -17261,7 +17200,7 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17289,7 +17228,7 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17303,11 +17242,11 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17321,7 +17260,7 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17335,11 +17274,11 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17353,7 +17292,7 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17367,11 +17306,11 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17385,7 +17324,7 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17399,11 +17338,11 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17417,7 +17356,7 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17430,11 +17369,11 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17453,7 +17392,7 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17466,11 +17405,11 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17489,7 +17428,7 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17502,11 +17441,11 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17520,12 +17459,12 @@ func (m *Info_Pod) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -17548,7 +17487,7 @@ func (m *Info_Node) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17576,7 +17515,7 @@ func (m *Info_Node) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17590,11 +17529,11 @@ func (m *Info_Node) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17608,7 +17547,7 @@ func (m *Info_Node) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17622,11 +17561,11 @@ func (m *Info_Node) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17640,7 +17579,7 @@ func (m *Info_Node) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17654,11 +17593,11 @@ func (m *Info_Node) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17672,7 +17611,7 @@ func (m *Info_Node) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17685,11 +17624,11 @@ func (m *Info_Node) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17708,7 +17647,7 @@ func (m *Info_Node) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17721,11 +17660,11 @@ func (m *Info_Node) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17744,7 +17683,7 @@ func (m *Info_Node) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17757,11 +17696,11 @@ func (m *Info_Node) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17775,12 +17714,12 @@ func (m *Info_Node) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -17803,7 +17742,7 @@ func (m *Info_Service) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17831,7 +17770,7 @@ func (m *Info_Service) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17845,11 +17784,11 @@ func (m *Info_Service) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17863,7 +17802,7 @@ func (m *Info_Service) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17877,11 +17816,11 @@ func (m *Info_Service) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17895,7 +17834,7 @@ func (m *Info_Service) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17909,11 +17848,11 @@ func (m *Info_Service) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17927,7 +17866,7 @@ func (m *Info_Service) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17940,11 +17879,11 @@ func (m *Info_Service) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17961,7 +17900,7 @@ func (m *Info_Service) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -17974,11 +17913,11 @@ func (m *Info_Service) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -17997,7 +17936,7 @@ func (m *Info_Service) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18010,11 +17949,11 @@ func (m *Info_Service) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -18028,12 +17967,12 @@ func (m *Info_Service) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -18056,7 +17995,7 @@ func (m *Info_ServicePort) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18084,7 +18023,7 @@ func (m *Info_ServicePort) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18098,11 +18037,11 @@ func (m *Info_ServicePort) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -18116,7 +18055,7 @@ func (m *Info_ServicePort) UnmarshalVT(dAtA []byte) error { m.Port = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18130,12 +18069,12 @@ func (m *Info_ServicePort) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -18158,7 +18097,7 @@ func (m *Info_Labels) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18186,7 +18125,7 @@ func (m *Info_Labels) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18199,11 +18138,11 @@ func (m *Info_Labels) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -18218,7 +18157,7 @@ func (m *Info_Labels) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18235,7 +18174,7 @@ func (m *Info_Labels) UnmarshalVT(dAtA []byte) error { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18249,11 +18188,11 @@ func (m *Info_Labels) UnmarshalVT(dAtA []byte) error { } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF @@ -18264,7 +18203,7 @@ func (m *Info_Labels) UnmarshalVT(dAtA []byte) error { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18278,11 +18217,11 @@ func (m *Info_Labels) UnmarshalVT(dAtA []byte) error { } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF @@ -18291,12 +18230,12 @@ func (m *Info_Labels) UnmarshalVT(dAtA []byte) error { iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -18308,12 +18247,12 @@ func (m *Info_Labels) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -18336,7 +18275,7 @@ func (m *Info_Annotations) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18364,7 +18303,7 @@ func (m *Info_Annotations) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18377,11 +18316,11 @@ func (m *Info_Annotations) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -18396,7 +18335,7 @@ func (m *Info_Annotations) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18413,7 +18352,7 @@ func (m *Info_Annotations) UnmarshalVT(dAtA []byte) error { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18427,11 +18366,11 @@ func (m *Info_Annotations) UnmarshalVT(dAtA []byte) error { } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF @@ -18442,7 +18381,7 @@ func (m *Info_Annotations) UnmarshalVT(dAtA []byte) error { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18456,11 +18395,11 @@ func (m *Info_Annotations) UnmarshalVT(dAtA []byte) error { } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF @@ -18469,12 +18408,12 @@ func (m *Info_Annotations) UnmarshalVT(dAtA []byte) error { iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -18486,12 +18425,12 @@ func (m *Info_Annotations) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -18514,7 +18453,7 @@ func (m *Info_CPU) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18570,12 +18509,12 @@ func (m *Info_CPU) UnmarshalVT(dAtA []byte) error { m.Usage = float64(math.Float64frombits(v)) default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -18598,7 +18537,7 @@ func (m *Info_Memory) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18654,12 +18593,12 @@ func (m *Info_Memory) UnmarshalVT(dAtA []byte) error { m.Usage = float64(math.Float64frombits(v)) default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -18682,7 +18621,7 @@ func (m *Info_Pods) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18710,7 +18649,7 @@ func (m *Info_Pods) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18723,11 +18662,11 @@ func (m *Info_Pods) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -18739,12 +18678,12 @@ func (m *Info_Pods) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -18767,7 +18706,7 @@ func (m *Info_Nodes) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18795,7 +18734,7 @@ func (m *Info_Nodes) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18808,11 +18747,11 @@ func (m *Info_Nodes) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -18824,12 +18763,12 @@ func (m *Info_Nodes) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -18852,7 +18791,7 @@ func (m *Info_Services) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18880,7 +18819,7 @@ func (m *Info_Services) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18893,11 +18832,11 @@ func (m *Info_Services) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -18909,12 +18848,12 @@ func (m *Info_Services) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -18937,7 +18876,7 @@ func (m *Info_IPs) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18965,7 +18904,7 @@ func (m *Info_IPs) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -18979,11 +18918,11 @@ func (m *Info_IPs) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -18992,12 +18931,12 @@ func (m *Info_IPs) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -19020,7 +18959,7 @@ func (m *Info) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -19043,12 +18982,12 @@ func (m *Info) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -19071,7 +19010,7 @@ func (m *Mirror_Target) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -19099,7 +19038,7 @@ func (m *Mirror_Target) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -19113,11 +19052,11 @@ func (m *Mirror_Target) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -19131,7 +19070,7 @@ func (m *Mirror_Target) UnmarshalVT(dAtA []byte) error { m.Port = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -19145,12 +19084,12 @@ func (m *Mirror_Target) UnmarshalVT(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -19173,7 +19112,7 @@ func (m *Mirror_Targets) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -19201,7 +19140,7 @@ func (m *Mirror_Targets) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -19214,11 +19153,11 @@ func (m *Mirror_Targets) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -19230,12 +19169,12 @@ func (m *Mirror_Targets) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -19258,7 +19197,7 @@ func (m *Mirror) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -19281,12 +19220,12 @@ func (m *Mirror) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -19309,7 +19248,7 @@ func (m *Empty) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -19332,12 +19271,12 @@ func (m *Empty) UnmarshalVT(dAtA []byte) error { switch fieldNum { default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -19352,88 +19291,3 @@ func (m *Empty) UnmarshalVT(dAtA []byte) error { } return nil } - -func skip(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLength - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroup - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLength - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflow = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") -) diff --git a/apis/grpc/v1/rpc/errdetails/error_details_vtproto.pb.go b/apis/grpc/v1/rpc/errdetails/error_details_vtproto.pb.go index 08dca9dceef..27e9c07ef95 100644 --- a/apis/grpc/v1/rpc/errdetails/error_details_vtproto.pb.go +++ b/apis/grpc/v1/rpc/errdetails/error_details_vtproto.pb.go @@ -18,8 +18,9 @@ package errdetails import ( fmt "fmt" - bits "math/bits" + protohelpers "github.com/planetscale/vtprotobuf/protohelpers" + durationpb1 "github.com/planetscale/vtprotobuf/types/known/durationpb" io "github.com/vdaas/vald/internal/io" proto "google.golang.org/protobuf/proto" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -37,10 +38,9 @@ func (m *ErrorInfo) CloneVT() *ErrorInfo { if m == nil { return (*ErrorInfo)(nil) } - r := &ErrorInfo{ - Reason: m.Reason, - Domain: m.Domain, - } + r := new(ErrorInfo) + r.Reason = m.Reason + r.Domain = m.Domain if rhs := m.Metadata; rhs != nil { tmpContainer := make(map[string]string, len(rhs)) for k, v := range rhs { @@ -63,14 +63,8 @@ func (m *RetryInfo) CloneVT() *RetryInfo { if m == nil { return (*RetryInfo)(nil) } - r := &RetryInfo{} - if rhs := m.RetryDelay; rhs != nil { - if vtpb, ok := interface{}(rhs).(interface{ CloneVT() *durationpb.Duration }); ok { - r.RetryDelay = vtpb.CloneVT() - } else { - r.RetryDelay = proto.Clone(rhs).(*durationpb.Duration) - } - } + r := new(RetryInfo) + r.RetryDelay = (*durationpb.Duration)((*durationpb1.Duration)(m.RetryDelay).CloneVT()) if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -86,9 +80,8 @@ func (m *DebugInfo) CloneVT() *DebugInfo { if m == nil { return (*DebugInfo)(nil) } - r := &DebugInfo{ - Detail: m.Detail, - } + r := new(DebugInfo) + r.Detail = m.Detail if rhs := m.StackEntries; rhs != nil { tmpContainer := make([]string, len(rhs)) copy(tmpContainer, rhs) @@ -109,10 +102,9 @@ func (m *QuotaFailure_Violation) CloneVT() *QuotaFailure_Violation { if m == nil { return (*QuotaFailure_Violation)(nil) } - r := &QuotaFailure_Violation{ - Subject: m.Subject, - Description: m.Description, - } + r := new(QuotaFailure_Violation) + r.Subject = m.Subject + r.Description = m.Description if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -128,7 +120,7 @@ func (m *QuotaFailure) CloneVT() *QuotaFailure { if m == nil { return (*QuotaFailure)(nil) } - r := &QuotaFailure{} + r := new(QuotaFailure) if rhs := m.Violations; rhs != nil { tmpContainer := make([]*QuotaFailure_Violation, len(rhs)) for k, v := range rhs { @@ -151,11 +143,10 @@ func (m *PreconditionFailure_Violation) CloneVT() *PreconditionFailure_Violation if m == nil { return (*PreconditionFailure_Violation)(nil) } - r := &PreconditionFailure_Violation{ - Type: m.Type, - Subject: m.Subject, - Description: m.Description, - } + r := new(PreconditionFailure_Violation) + r.Type = m.Type + r.Subject = m.Subject + r.Description = m.Description if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -171,7 +162,7 @@ func (m *PreconditionFailure) CloneVT() *PreconditionFailure { if m == nil { return (*PreconditionFailure)(nil) } - r := &PreconditionFailure{} + r := new(PreconditionFailure) if rhs := m.Violations; rhs != nil { tmpContainer := make([]*PreconditionFailure_Violation, len(rhs)) for k, v := range rhs { @@ -194,10 +185,9 @@ func (m *BadRequest_FieldViolation) CloneVT() *BadRequest_FieldViolation { if m == nil { return (*BadRequest_FieldViolation)(nil) } - r := &BadRequest_FieldViolation{ - Field: m.Field, - Description: m.Description, - } + r := new(BadRequest_FieldViolation) + r.Field = m.Field + r.Description = m.Description if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -213,7 +203,7 @@ func (m *BadRequest) CloneVT() *BadRequest { if m == nil { return (*BadRequest)(nil) } - r := &BadRequest{} + r := new(BadRequest) if rhs := m.FieldViolations; rhs != nil { tmpContainer := make([]*BadRequest_FieldViolation, len(rhs)) for k, v := range rhs { @@ -236,10 +226,9 @@ func (m *RequestInfo) CloneVT() *RequestInfo { if m == nil { return (*RequestInfo)(nil) } - r := &RequestInfo{ - RequestId: m.RequestId, - ServingData: m.ServingData, - } + r := new(RequestInfo) + r.RequestId = m.RequestId + r.ServingData = m.ServingData if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -255,12 +244,11 @@ func (m *ResourceInfo) CloneVT() *ResourceInfo { if m == nil { return (*ResourceInfo)(nil) } - r := &ResourceInfo{ - ResourceType: m.ResourceType, - ResourceName: m.ResourceName, - Owner: m.Owner, - Description: m.Description, - } + r := new(ResourceInfo) + r.ResourceType = m.ResourceType + r.ResourceName = m.ResourceName + r.Owner = m.Owner + r.Description = m.Description if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -276,10 +264,9 @@ func (m *Help_Link) CloneVT() *Help_Link { if m == nil { return (*Help_Link)(nil) } - r := &Help_Link{ - Description: m.Description, - Url: m.Url, - } + r := new(Help_Link) + r.Description = m.Description + r.Url = m.Url if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -295,7 +282,7 @@ func (m *Help) CloneVT() *Help { if m == nil { return (*Help)(nil) } - r := &Help{} + r := new(Help) if rhs := m.Links; rhs != nil { tmpContainer := make([]*Help_Link, len(rhs)) for k, v := range rhs { @@ -318,10 +305,9 @@ func (m *LocalizedMessage) CloneVT() *LocalizedMessage { if m == nil { return (*LocalizedMessage)(nil) } - r := &LocalizedMessage{ - Locale: m.Locale, - Message: m.Message, - } + r := new(LocalizedMessage) + r.Locale = m.Locale + r.Message = m.Message if len(m.unknownFields) > 0 { r.unknownFields = make([]byte, len(m.unknownFields)) copy(r.unknownFields, m.unknownFields) @@ -373,13 +359,7 @@ func (this *RetryInfo) EqualVT(that *RetryInfo) bool { } else if this == nil || that == nil { return false } - if equal, ok := interface{}(this.RetryDelay).(interface { - EqualVT(*durationpb.Duration) bool - }); ok { - if !equal.EqualVT(that.RetryDelay) { - return false - } - } else if !proto.Equal(this.RetryDelay, that.RetryDelay) { + if !(*durationpb1.Duration)(this.RetryDelay).EqualVT((*durationpb1.Duration)(that.RetryDelay)) { return false } return string(this.unknownFields) == string(that.unknownFields) @@ -751,15 +731,15 @@ func (m *ErrorInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) { baseI := i i -= len(v) copy(dAtA[i:], v) - i = encodeVarint(dAtA, i, uint64(len(v))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) - i = encodeVarint(dAtA, i, uint64(len(k))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa - i = encodeVarint(dAtA, i, uint64(baseI-i)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x1a } @@ -767,14 +747,14 @@ func (m *ErrorInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Domain) > 0 { i -= len(m.Domain) copy(dAtA[i:], m.Domain) - i = encodeVarint(dAtA, i, uint64(len(m.Domain))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Domain))) i-- dAtA[i] = 0x12 } if len(m.Reason) > 0 { i -= len(m.Reason) copy(dAtA[i:], m.Reason) - i = encodeVarint(dAtA, i, uint64(len(m.Reason))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Reason))) i-- dAtA[i] = 0xa } @@ -812,24 +792,12 @@ func (m *RetryInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) { copy(dAtA[i:], m.unknownFields) } if m.RetryDelay != nil { - if vtmsg, ok := interface{}(m.RetryDelay).(interface { - MarshalToSizedBufferVT([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.RetryDelay) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = encodeVarint(dAtA, i, uint64(len(encoded))) + size, err := (*durationpb1.Duration)(m.RetryDelay).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -869,7 +837,7 @@ func (m *DebugInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Detail) > 0 { i -= len(m.Detail) copy(dAtA[i:], m.Detail) - i = encodeVarint(dAtA, i, uint64(len(m.Detail))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Detail))) i-- dAtA[i] = 0x12 } @@ -877,7 +845,7 @@ func (m *DebugInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) { for iNdEx := len(m.StackEntries) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.StackEntries[iNdEx]) copy(dAtA[i:], m.StackEntries[iNdEx]) - i = encodeVarint(dAtA, i, uint64(len(m.StackEntries[iNdEx]))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StackEntries[iNdEx]))) i-- dAtA[i] = 0xa } @@ -918,14 +886,14 @@ func (m *QuotaFailure_Violation) MarshalToSizedBufferVT(dAtA []byte) (int, error if len(m.Description) > 0 { i -= len(m.Description) copy(dAtA[i:], m.Description) - i = encodeVarint(dAtA, i, uint64(len(m.Description))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Description))) i-- dAtA[i] = 0x12 } if len(m.Subject) > 0 { i -= len(m.Subject) copy(dAtA[i:], m.Subject) - i = encodeVarint(dAtA, i, uint64(len(m.Subject))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Subject))) i-- dAtA[i] = 0xa } @@ -969,7 +937,7 @@ func (m *QuotaFailure) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1010,21 +978,21 @@ func (m *PreconditionFailure_Violation) MarshalToSizedBufferVT(dAtA []byte) (int if len(m.Description) > 0 { i -= len(m.Description) copy(dAtA[i:], m.Description) - i = encodeVarint(dAtA, i, uint64(len(m.Description))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Description))) i-- dAtA[i] = 0x1a } if len(m.Subject) > 0 { i -= len(m.Subject) copy(dAtA[i:], m.Subject) - i = encodeVarint(dAtA, i, uint64(len(m.Subject))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Subject))) i-- dAtA[i] = 0x12 } if len(m.Type) > 0 { i -= len(m.Type) copy(dAtA[i:], m.Type) - i = encodeVarint(dAtA, i, uint64(len(m.Type))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) i-- dAtA[i] = 0xa } @@ -1068,7 +1036,7 @@ func (m *PreconditionFailure) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1109,14 +1077,14 @@ func (m *BadRequest_FieldViolation) MarshalToSizedBufferVT(dAtA []byte) (int, er if len(m.Description) > 0 { i -= len(m.Description) copy(dAtA[i:], m.Description) - i = encodeVarint(dAtA, i, uint64(len(m.Description))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Description))) i-- dAtA[i] = 0x12 } if len(m.Field) > 0 { i -= len(m.Field) copy(dAtA[i:], m.Field) - i = encodeVarint(dAtA, i, uint64(len(m.Field))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Field))) i-- dAtA[i] = 0xa } @@ -1160,7 +1128,7 @@ func (m *BadRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1201,14 +1169,14 @@ func (m *RequestInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.ServingData) > 0 { i -= len(m.ServingData) copy(dAtA[i:], m.ServingData) - i = encodeVarint(dAtA, i, uint64(len(m.ServingData))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ServingData))) i-- dAtA[i] = 0x12 } if len(m.RequestId) > 0 { i -= len(m.RequestId) copy(dAtA[i:], m.RequestId) - i = encodeVarint(dAtA, i, uint64(len(m.RequestId))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RequestId))) i-- dAtA[i] = 0xa } @@ -1248,28 +1216,28 @@ func (m *ResourceInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Description) > 0 { i -= len(m.Description) copy(dAtA[i:], m.Description) - i = encodeVarint(dAtA, i, uint64(len(m.Description))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Description))) i-- dAtA[i] = 0x22 } if len(m.Owner) > 0 { i -= len(m.Owner) copy(dAtA[i:], m.Owner) - i = encodeVarint(dAtA, i, uint64(len(m.Owner))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Owner))) i-- dAtA[i] = 0x1a } if len(m.ResourceName) > 0 { i -= len(m.ResourceName) copy(dAtA[i:], m.ResourceName) - i = encodeVarint(dAtA, i, uint64(len(m.ResourceName))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceName))) i-- dAtA[i] = 0x12 } if len(m.ResourceType) > 0 { i -= len(m.ResourceType) copy(dAtA[i:], m.ResourceType) - i = encodeVarint(dAtA, i, uint64(len(m.ResourceType))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceType))) i-- dAtA[i] = 0xa } @@ -1309,14 +1277,14 @@ func (m *Help_Link) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Url) > 0 { i -= len(m.Url) copy(dAtA[i:], m.Url) - i = encodeVarint(dAtA, i, uint64(len(m.Url))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Url))) i-- dAtA[i] = 0x12 } if len(m.Description) > 0 { i -= len(m.Description) copy(dAtA[i:], m.Description) - i = encodeVarint(dAtA, i, uint64(len(m.Description))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Description))) i-- dAtA[i] = 0xa } @@ -1360,7 +1328,7 @@ func (m *Help) MarshalToSizedBufferVT(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarint(dAtA, i, uint64(size)) + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) i-- dAtA[i] = 0xa } @@ -1401,31 +1369,20 @@ func (m *LocalizedMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error) { if len(m.Message) > 0 { i -= len(m.Message) copy(dAtA[i:], m.Message) - i = encodeVarint(dAtA, i, uint64(len(m.Message))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Message))) i-- dAtA[i] = 0x12 } if len(m.Locale) > 0 { i -= len(m.Locale) copy(dAtA[i:], m.Locale) - i = encodeVarint(dAtA, i, uint64(len(m.Locale))) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Locale))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func encodeVarint(dAtA []byte, offset int, v uint64) int { - offset -= sov(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} func (m *ErrorInfo) SizeVT() (n int) { if m == nil { return 0 @@ -1434,18 +1391,18 @@ func (m *ErrorInfo) SizeVT() (n int) { _ = l l = len(m.Reason) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Domain) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } if len(m.Metadata) > 0 { for k, v := range m.Metadata { _ = k _ = v - mapEntrySize := 1 + len(k) + sov(uint64(len(k))) + 1 + len(v) + sov(uint64(len(v))) - n += mapEntrySize + 1 + sov(uint64(mapEntrySize)) + mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) + n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) } } n += len(m.unknownFields) @@ -1459,14 +1416,8 @@ func (m *RetryInfo) SizeVT() (n int) { var l int _ = l if m.RetryDelay != nil { - if size, ok := interface{}(m.RetryDelay).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.RetryDelay) - } - n += 1 + l + sov(uint64(l)) + l = (*durationpb1.Duration)(m.RetryDelay).SizeVT() + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -1481,12 +1432,12 @@ func (m *DebugInfo) SizeVT() (n int) { if len(m.StackEntries) > 0 { for _, s := range m.StackEntries { l = len(s) - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } l = len(m.Detail) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -1500,11 +1451,11 @@ func (m *QuotaFailure_Violation) SizeVT() (n int) { _ = l l = len(m.Subject) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Description) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -1519,7 +1470,7 @@ func (m *QuotaFailure) SizeVT() (n int) { if len(m.Violations) > 0 { for _, e := range m.Violations { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -1534,15 +1485,15 @@ func (m *PreconditionFailure_Violation) SizeVT() (n int) { _ = l l = len(m.Type) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Subject) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Description) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -1557,7 +1508,7 @@ func (m *PreconditionFailure) SizeVT() (n int) { if len(m.Violations) > 0 { for _, e := range m.Violations { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -1572,11 +1523,11 @@ func (m *BadRequest_FieldViolation) SizeVT() (n int) { _ = l l = len(m.Field) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Description) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -1591,7 +1542,7 @@ func (m *BadRequest) SizeVT() (n int) { if len(m.FieldViolations) > 0 { for _, e := range m.FieldViolations { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -1606,11 +1557,11 @@ func (m *RequestInfo) SizeVT() (n int) { _ = l l = len(m.RequestId) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ServingData) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -1624,19 +1575,19 @@ func (m *ResourceInfo) SizeVT() (n int) { _ = l l = len(m.ResourceType) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.ResourceName) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Owner) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Description) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -1650,11 +1601,11 @@ func (m *Help_Link) SizeVT() (n int) { _ = l l = len(m.Description) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Url) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n @@ -1669,7 +1620,7 @@ func (m *Help) SizeVT() (n int) { if len(m.Links) > 0 { for _, e := range m.Links { l = e.SizeVT() - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } } n += len(m.unknownFields) @@ -1684,22 +1635,16 @@ func (m *LocalizedMessage) SizeVT() (n int) { _ = l l = len(m.Locale) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } l = len(m.Message) if l > 0 { - n += 1 + l + sov(uint64(l)) + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } n += len(m.unknownFields) return n } -func sov(x uint64) (n int) { - return (bits.Len64(x|1) + 6) / 7 -} -func soz(x uint64) (n int) { - return sov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} func (m *ErrorInfo) UnmarshalVT(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1708,7 +1653,7 @@ func (m *ErrorInfo) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1736,7 +1681,7 @@ func (m *ErrorInfo) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1750,11 +1695,11 @@ func (m *ErrorInfo) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1768,7 +1713,7 @@ func (m *ErrorInfo) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1782,11 +1727,11 @@ func (m *ErrorInfo) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1800,7 +1745,7 @@ func (m *ErrorInfo) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1813,11 +1758,11 @@ func (m *ErrorInfo) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -1832,7 +1777,7 @@ func (m *ErrorInfo) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1849,7 +1794,7 @@ func (m *ErrorInfo) UnmarshalVT(dAtA []byte) error { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1863,11 +1808,11 @@ func (m *ErrorInfo) UnmarshalVT(dAtA []byte) error { } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF @@ -1878,7 +1823,7 @@ func (m *ErrorInfo) UnmarshalVT(dAtA []byte) error { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1892,11 +1837,11 @@ func (m *ErrorInfo) UnmarshalVT(dAtA []byte) error { } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF @@ -1905,12 +1850,12 @@ func (m *ErrorInfo) UnmarshalVT(dAtA []byte) error { iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -1922,12 +1867,12 @@ func (m *ErrorInfo) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -1950,7 +1895,7 @@ func (m *RetryInfo) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1978,7 +1923,7 @@ func (m *RetryInfo) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -1991,11 +1936,11 @@ func (m *RetryInfo) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2003,26 +1948,18 @@ func (m *RetryInfo) UnmarshalVT(dAtA []byte) error { if m.RetryDelay == nil { m.RetryDelay = &durationpb.Duration{} } - if unmarshal, ok := interface{}(m.RetryDelay).(interface { - UnmarshalVT([]byte) error - }); ok { - if err := unmarshal.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - } else { - if err := proto.Unmarshal(dAtA[iNdEx:postIndex], m.RetryDelay); err != nil { - return err - } + if err := (*durationpb1.Duration)(m.RetryDelay).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2045,7 +1982,7 @@ func (m *DebugInfo) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2073,7 +2010,7 @@ func (m *DebugInfo) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2087,11 +2024,11 @@ func (m *DebugInfo) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2105,7 +2042,7 @@ func (m *DebugInfo) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2119,11 +2056,11 @@ func (m *DebugInfo) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2132,12 +2069,12 @@ func (m *DebugInfo) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2160,7 +2097,7 @@ func (m *QuotaFailure_Violation) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2188,7 +2125,7 @@ func (m *QuotaFailure_Violation) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2202,11 +2139,11 @@ func (m *QuotaFailure_Violation) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2220,7 +2157,7 @@ func (m *QuotaFailure_Violation) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2234,11 +2171,11 @@ func (m *QuotaFailure_Violation) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2247,12 +2184,12 @@ func (m *QuotaFailure_Violation) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2275,7 +2212,7 @@ func (m *QuotaFailure) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2303,7 +2240,7 @@ func (m *QuotaFailure) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2316,11 +2253,11 @@ func (m *QuotaFailure) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2332,12 +2269,12 @@ func (m *QuotaFailure) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2360,7 +2297,7 @@ func (m *PreconditionFailure_Violation) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2388,7 +2325,7 @@ func (m *PreconditionFailure_Violation) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2402,11 +2339,11 @@ func (m *PreconditionFailure_Violation) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2420,7 +2357,7 @@ func (m *PreconditionFailure_Violation) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2434,11 +2371,11 @@ func (m *PreconditionFailure_Violation) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2452,7 +2389,7 @@ func (m *PreconditionFailure_Violation) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2466,11 +2403,11 @@ func (m *PreconditionFailure_Violation) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2479,12 +2416,12 @@ func (m *PreconditionFailure_Violation) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2507,7 +2444,7 @@ func (m *PreconditionFailure) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2535,7 +2472,7 @@ func (m *PreconditionFailure) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2548,11 +2485,11 @@ func (m *PreconditionFailure) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2564,12 +2501,12 @@ func (m *PreconditionFailure) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2592,7 +2529,7 @@ func (m *BadRequest_FieldViolation) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2620,7 +2557,7 @@ func (m *BadRequest_FieldViolation) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2634,11 +2571,11 @@ func (m *BadRequest_FieldViolation) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2652,7 +2589,7 @@ func (m *BadRequest_FieldViolation) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2666,11 +2603,11 @@ func (m *BadRequest_FieldViolation) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2679,12 +2616,12 @@ func (m *BadRequest_FieldViolation) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2707,7 +2644,7 @@ func (m *BadRequest) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2735,7 +2672,7 @@ func (m *BadRequest) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2748,11 +2685,11 @@ func (m *BadRequest) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2764,12 +2701,12 @@ func (m *BadRequest) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2792,7 +2729,7 @@ func (m *RequestInfo) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2820,7 +2757,7 @@ func (m *RequestInfo) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2834,11 +2771,11 @@ func (m *RequestInfo) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2852,7 +2789,7 @@ func (m *RequestInfo) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2866,11 +2803,11 @@ func (m *RequestInfo) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2879,12 +2816,12 @@ func (m *RequestInfo) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -2907,7 +2844,7 @@ func (m *ResourceInfo) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2935,7 +2872,7 @@ func (m *ResourceInfo) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2949,11 +2886,11 @@ func (m *ResourceInfo) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2967,7 +2904,7 @@ func (m *ResourceInfo) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -2981,11 +2918,11 @@ func (m *ResourceInfo) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -2999,7 +2936,7 @@ func (m *ResourceInfo) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3013,11 +2950,11 @@ func (m *ResourceInfo) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3031,7 +2968,7 @@ func (m *ResourceInfo) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3045,11 +2982,11 @@ func (m *ResourceInfo) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3058,12 +2995,12 @@ func (m *ResourceInfo) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3086,7 +3023,7 @@ func (m *Help_Link) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3114,7 +3051,7 @@ func (m *Help_Link) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3128,11 +3065,11 @@ func (m *Help_Link) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3146,7 +3083,7 @@ func (m *Help_Link) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3160,11 +3097,11 @@ func (m *Help_Link) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3173,12 +3110,12 @@ func (m *Help_Link) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3201,7 +3138,7 @@ func (m *Help) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3229,7 +3166,7 @@ func (m *Help) UnmarshalVT(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3242,11 +3179,11 @@ func (m *Help) UnmarshalVT(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3258,12 +3195,12 @@ func (m *Help) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3286,7 +3223,7 @@ func (m *LocalizedMessage) UnmarshalVT(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3314,7 +3251,7 @@ func (m *LocalizedMessage) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3328,11 +3265,11 @@ func (m *LocalizedMessage) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3346,7 +3283,7 @@ func (m *LocalizedMessage) UnmarshalVT(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflow + return protohelpers.ErrIntOverflow } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -3360,11 +3297,11 @@ func (m *LocalizedMessage) UnmarshalVT(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if postIndex > l { return io.ErrUnexpectedEOF @@ -3373,12 +3310,12 @@ func (m *LocalizedMessage) UnmarshalVT(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skip(dAtA[iNdEx:]) + skippy, err := protohelpers.Skip(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLength + return protohelpers.ErrInvalidLength } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -3393,88 +3330,3 @@ func (m *LocalizedMessage) UnmarshalVT(dAtA []byte) error { } return nil } - -func skip(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLength - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroup - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLength - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflow = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") -) diff --git a/apis/swagger/v1/mirror/apis/proto/v1/mirror/mirror.swagger.json b/apis/swagger/v1/mirror/apis/proto/v1/mirror/mirror.swagger.json deleted file mode 100644 index ea66b1c5721..00000000000 --- a/apis/swagger/v1/mirror/apis/proto/v1/mirror/mirror.swagger.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "apis/proto/v1/mirror/mirror.proto", - "version": "version not set" - }, - "consumes": ["application/json"], - "produces": ["application/json"], - "paths": { - "/mirror/register": { - "post": { - "summary": "Register is the RPC to register other mirror servers.", - "operationId": "Mirror_Register", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/MirrorTargets" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/runtimeError" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/MirrorTargets" - } - } - ], - "tags": ["Mirror"] - } - } - }, - "definitions": { - "MirrorTargets": { - "type": "object", - "properties": { - "targets": { - "type": "array", - "items": { - "$ref": "#/definitions/v1MirrorTarget" - }, - "description": "The multiple target information." - } - }, - "description": "Represent the multiple Target message." - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string", - "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com. As of May 2023, there are no widely used type server\nimplementations and no plans to implement one.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." - }, - "value": { - "type": "string", - "format": "byte", - "description": "Must be a valid serialized protocol buffer of the above specified type." - } - }, - "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" - }, - "runtimeError": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1MirrorTarget": { - "type": "object", - "properties": { - "host": { - "type": "string", - "description": "The target hostname." - }, - "port": { - "type": "integer", - "format": "int64", - "description": "The target port." - } - }, - "description": "Represent server information." - } - } -} diff --git a/charts/vald-benchmark-operator/README.md b/charts/vald-benchmark-operator/README.md index 77a8b217701..659b3a54c2c 100644 --- a/charts/vald-benchmark-operator/README.md +++ b/charts/vald-benchmark-operator/README.md @@ -183,4 +183,4 @@ A benchmark operator for benchmarking the Vald cluster. --- -Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3) +Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0) diff --git a/charts/vald-helm-operator/crds/valdrelease.yaml b/charts/vald-helm-operator/crds/valdrelease.yaml index 4a9345982cb..fa8d749b294 100644 --- a/charts/vald-helm-operator/crds/valdrelease.yaml +++ b/charts/vald-helm-operator/crds/valdrelease.yaml @@ -116,6 +116,11 @@ spec: items: type: object x-kubernetes-preserve-unknown-fields: true + algorithm: + type: string + enum: + - ngt + - faiss annotations: type: object x-kubernetes-preserve-unknown-fields: true @@ -317,7 +322,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -769,6 +774,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -1259,7 +1266,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -1629,6 +1636,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -2109,7 +2118,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -2470,6 +2479,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -2929,7 +2940,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -3327,6 +3338,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -4290,7 +4303,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -4688,6 +4701,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -5624,7 +5639,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -6022,6 +6037,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -6678,7 +6695,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -7076,6 +7093,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -7775,7 +7794,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -8138,6 +8157,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -8747,7 +8768,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -9110,6 +9131,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -9765,7 +9788,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -9891,7 +9914,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -10260,6 +10283,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -10889,7 +10914,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -11252,6 +11277,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -11768,6 +11795,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: diff --git a/charts/vald/README.md b/charts/vald/README.md index a9bd03c32e8..5544cfe16f5 100644 --- a/charts/vald/README.md +++ b/charts/vald/README.md @@ -50,8 +50,9 @@ Run the following command to install the chart, | agent.affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms | list | `[]` | node affinity required node selectors | | agent.affinity.podAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity preferred scheduling terms | | agent.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod affinity required scheduling terms | -| agent.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app","operator":"In","values":["vald-agent-ngt"]}]},"topologyKey":"kubernetes.io/hostname"},"weight":100}]` | pod anti-affinity preferred scheduling terms | +| agent.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution | list | `[{"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"app","operator":"In","values":["vald-agent"]}]},"topologyKey":"kubernetes.io/hostname"},"weight":100}]` | pod anti-affinity preferred scheduling terms | | agent.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution | list | `[]` | pod anti-affinity required scheduling terms | +| agent.algorithm | string | `"ngt"` | agent algorithm type. it should be `ngt` or `faiss`. | | agent.annotations | object | `{}` | deployment annotations | | agent.enabled | bool | `true` | agent enabled | | agent.env | list | `[{"name":"MY_NODE_NAME","valueFrom":{"fieldRef":{"fieldPath":"spec.nodeName"}}},{"name":"MY_POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"MY_POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}]` | environment variables | @@ -67,7 +68,7 @@ Run the following command to install the chart, | agent.maxReplicas | int | `300` | maximum number of replicas. if HPA is disabled, this value will be ignored. | | agent.maxUnavailable | string | `"1"` | maximum number of unavailable replicas | | agent.minReplicas | int | `20` | minimum number of replicas. if HPA is disabled, the replicas will be set to this value | -| agent.name | string | `"vald-agent-ngt"` | name of agent deployment | +| agent.name | string | `"vald-agent"` | name of agent deployment | | agent.ngt.auto_create_index_pool_size | int | `16` | batch process pool size of automatic create index operation | | agent.ngt.auto_index_check_duration | string | `"30m"` | check duration of automatic indexing | | agent.ngt.auto_index_duration_limit | string | `"24h"` | limit duration of automatic indexing | @@ -97,7 +98,7 @@ Run the following command to install the chart, | agent.ngt.vqueue.insert_buffer_pool_size | int | `10000` | insert slice pool buffer size | | agent.nodeName | string | `""` | node name | | agent.nodeSelector | object | `{}` | node selector | -| agent.observability | object | `{"otlp":{"attribute":{"service_name":"vald-agent-ngt"}}}` | observability config (overrides defaults.observability) | +| agent.observability | object | `{"otlp":{"attribute":{"service_name":"vald-agent"}}}` | observability config (overrides defaults.observability) | | agent.persistentVolume.accessMode | string | `"ReadWriteOncePod"` | agent pod storage accessMode | | agent.persistentVolume.enabled | bool | `false` | enables PVC. It is required to enable if agent pod's file store functionality is enabled with non in-memory mode | | agent.persistentVolume.mountPropagation | string | `"None"` | agent pod storage mountPropagation | @@ -318,7 +319,7 @@ Run the following command to install the chart, | defaults.observability.metrics.enable_goroutine | bool | `true` | goroutine metrics enabled | | defaults.observability.metrics.enable_memory | bool | `true` | memory metrics enabled | | defaults.observability.metrics.enable_version_info | bool | `true` | version info metrics enabled | -| defaults.observability.metrics.version_info_labels | list | `["vald_version","server_name","git_commit","build_time","go_version","go_os","go_arch","ngt_version"]` | enabled label names of version info | +| defaults.observability.metrics.version_info_labels | list | `["vald_version","server_name","git_commit","build_time","go_version","go_os","go_arch","algorithm_info"]` | enabled label names of version info | | defaults.observability.otlp.attribute | object | `{"namespace":"_MY_POD_NAMESPACE_","node_name":"_MY_NODE_NAME_","pod_name":"_MY_POD_NAME_","service_name":"vald"}` | default resource attribute | | defaults.observability.otlp.attribute.namespace | string | `"_MY_POD_NAMESPACE_"` | namespace | | defaults.observability.otlp.attribute.node_name | string | `"_MY_NODE_NAME_"` | node name | @@ -433,6 +434,7 @@ Run the following command to install the chart, | defaults.server_config.servers.grpc.port | int | `8081` | gRPC server port | | defaults.server_config.servers.grpc.server.grpc.bidirectional_stream_concurrency | int | `20` | gRPC server bidirectional stream concurrency | | defaults.server_config.servers.grpc.server.grpc.connection_timeout | string | `""` | gRPC server connection timeout | +| defaults.server_config.servers.grpc.server.grpc.enable_admin | bool | `true` | gRPC server admin option | | defaults.server_config.servers.grpc.server.grpc.enable_reflection | bool | `true` | gRPC server reflection option | | defaults.server_config.servers.grpc.server.grpc.header_table_size | int | `0` | gRPC server header table size | | defaults.server_config.servers.grpc.server.grpc.initial_conn_window_size | int | `2097152` | gRPC server initial connection window size | diff --git a/charts/vald/templates/agent/faiss/configmap.yaml b/charts/vald/templates/agent/faiss/configmap.yaml new file mode 100644 index 00000000000..ef28fd6fa0f --- /dev/null +++ b/charts/vald/templates/agent/faiss/configmap.yaml @@ -0,0 +1,45 @@ +# +# Copyright (C) 2019-2024 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +{{- $agent := .Values.agent -}} +{{- if and ($agent.enabled) (eq (lower $agent.algorithm) "faiss")}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ $agent.name }}-config + labels: + app.kubernetes.io/name: {{ include "vald.name" . }} + helm.sh/chart: {{ include "vald.chart" . }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.Version }} + app.kubernetes.io/component: agent +data: + config.yaml: | + --- + version: {{ $agent.version }} + time_zone: {{ default .Values.defaults.time_zone $agent.time_zone }} + logging: + {{- $logging := dict "Values" $agent.logging "default" .Values.defaults.logging }} + {{- include "vald.logging" $logging | nindent 6 }} + server_config: + {{- $servers := dict "Values" $agent.server_config "default" .Values.defaults.server_config }} + {{- include "vald.servers" $servers | nindent 6 }} + observability: + {{- $observability := dict "Values" $agent.observability "default" .Values.defaults.observability }} + {{- include "vald.observability" $observability | nindent 6 }} + faiss: + {{- toYaml $agent.faiss | nindent 6 }} +{{- end }} diff --git a/charts/vald/templates/agent/configmap.yaml b/charts/vald/templates/agent/ngt/configmap.yaml similarity index 96% rename from charts/vald/templates/agent/configmap.yaml rename to charts/vald/templates/agent/ngt/configmap.yaml index 0886ab2d7b2..15942921fe8 100644 --- a/charts/vald/templates/agent/configmap.yaml +++ b/charts/vald/templates/agent/ngt/configmap.yaml @@ -14,7 +14,7 @@ # limitations under the License. # {{- $agent := .Values.agent -}} -{{- if $agent.enabled }} +{{- if and ($agent.enabled) (eq (lower $agent.algorithm) "ngt")}} apiVersion: v1 kind: ConfigMap metadata: diff --git a/charts/vald/templates/agent/sidecar-configmap.yaml b/charts/vald/templates/agent/sidecar/configmap.yaml similarity index 100% rename from charts/vald/templates/agent/sidecar-configmap.yaml rename to charts/vald/templates/agent/sidecar/configmap.yaml diff --git a/charts/vald/templates/agent/sidecar-svc.yaml b/charts/vald/templates/agent/sidecar/svc.yaml similarity index 100% rename from charts/vald/templates/agent/sidecar-svc.yaml rename to charts/vald/templates/agent/sidecar/svc.yaml diff --git a/charts/vald/templates/agent/statefulset.yaml b/charts/vald/templates/agent/statefulset.yaml index 9ff989d453e..855bec3c17b 100644 --- a/charts/vald/templates/agent/statefulset.yaml +++ b/charts/vald/templates/agent/statefulset.yaml @@ -101,6 +101,7 @@ spec: volumeMounts: - name: {{ $agent.sidecar.name }}-config mountPath: /etc/server/ + {{- if eq $agent.algorithm "ngt" }} {{- if not $agent.ngt.enable_in_memory_mode }} {{- if $agent.ngt.index_path }} {{- if $agent.persistentVolume.enabled }} @@ -113,6 +114,7 @@ spec: {{- end }} {{- end }} {{- end }} + {{- end }} {{- if $agent.volumeMounts }} {{- toYaml $agent.volumeMounts | nindent 12 }} {{- end }} diff --git a/charts/vald/values.schema.json b/charts/vald/values.schema.json index 551f638a771..3812adcd1d4 100644 --- a/charts/vald/values.schema.json +++ b/charts/vald/values.schema.json @@ -61,6 +61,11 @@ } } }, + "algorithm": { + "type": "string", + "description": "agent algorithm type. it should be `ngt` or `faiss`.", + "enum": ["ngt", "faiss"] + }, "annotations": { "type": "object", "description": "deployment annotations" @@ -341,7 +346,7 @@ "go_os", "go_arch", "cgo_enabled", - "ngt_version", + "algorithm_info", "build_cpu_info_flags" ] } @@ -1130,6 +1135,10 @@ "type": "string", "description": "gRPC server connection timeout" }, + "enable_admin": { + "type": "boolean", + "description": "gRPC server admin option" + }, "enable_reflection": { "type": "boolean", "description": "gRPC server reflection option" @@ -1966,7 +1975,7 @@ "go_os", "go_arch", "cgo_enabled", - "ngt_version", + "algorithm_info", "build_cpu_info_flags" ] } @@ -2620,6 +2629,10 @@ "type": "string", "description": "gRPC server connection timeout" }, + "enable_admin": { + "type": "boolean", + "description": "gRPC server admin option" + }, "enable_reflection": { "type": "boolean", "description": "gRPC server reflection option" @@ -3410,7 +3423,7 @@ "go_os", "go_arch", "cgo_enabled", - "ngt_version", + "algorithm_info", "build_cpu_info_flags" ] } @@ -4050,6 +4063,10 @@ "type": "string", "description": "gRPC server connection timeout" }, + "enable_admin": { + "type": "boolean", + "description": "gRPC server admin option" + }, "enable_reflection": { "type": "boolean", "description": "gRPC server reflection option" @@ -4769,7 +4786,7 @@ "go_os", "go_arch", "cgo_enabled", - "ngt_version", + "algorithm_info", "build_cpu_info_flags" ] } @@ -5464,6 +5481,10 @@ "type": "string", "description": "gRPC server connection timeout" }, + "enable_admin": { + "type": "boolean", + "description": "gRPC server admin option" + }, "enable_reflection": { "type": "boolean", "description": "gRPC server reflection option" @@ -7060,7 +7081,7 @@ "go_os", "go_arch", "cgo_enabled", - "ngt_version", + "algorithm_info", "build_cpu_info_flags" ] } @@ -7761,6 +7782,10 @@ "type": "string", "description": "gRPC server connection timeout" }, + "enable_admin": { + "type": "boolean", + "description": "gRPC server admin option" + }, "enable_reflection": { "type": "boolean", "description": "gRPC server reflection option" @@ -9322,7 +9347,7 @@ "go_os", "go_arch", "cgo_enabled", - "ngt_version", + "algorithm_info", "build_cpu_info_flags" ] } @@ -10023,6 +10048,10 @@ "type": "string", "description": "gRPC server connection timeout" }, + "enable_admin": { + "type": "boolean", + "description": "gRPC server admin option" + }, "enable_reflection": { "type": "boolean", "description": "gRPC server reflection option" @@ -11098,7 +11127,7 @@ "go_os", "go_arch", "cgo_enabled", - "ngt_version", + "algorithm_info", "build_cpu_info_flags" ] } @@ -11799,6 +11828,10 @@ "type": "string", "description": "gRPC server connection timeout" }, + "enable_admin": { + "type": "boolean", + "description": "gRPC server admin option" + }, "enable_reflection": { "type": "boolean", "description": "gRPC server reflection option" @@ -12969,7 +13002,7 @@ "go_os", "go_arch", "cgo_enabled", - "ngt_version", + "algorithm_info", "build_cpu_info_flags" ] } @@ -13619,6 +13652,10 @@ "type": "string", "description": "gRPC server connection timeout" }, + "enable_admin": { + "type": "boolean", + "description": "gRPC server admin option" + }, "enable_reflection": { "type": "boolean", "description": "gRPC server reflection option" @@ -14695,7 +14732,7 @@ "go_os", "go_arch", "cgo_enabled", - "ngt_version", + "algorithm_info", "build_cpu_info_flags" ] } @@ -15345,6 +15382,10 @@ "type": "string", "description": "gRPC server connection timeout" }, + "enable_admin": { + "type": "boolean", + "description": "gRPC server admin option" + }, "enable_reflection": { "type": "boolean", "description": "gRPC server reflection option" @@ -16481,7 +16522,7 @@ "go_os", "go_arch", "cgo_enabled", - "ngt_version", + "algorithm_info", "build_cpu_info_flags" ] } @@ -16688,7 +16729,7 @@ "go_os", "go_arch", "cgo_enabled", - "ngt_version", + "algorithm_info", "build_cpu_info_flags" ] } @@ -17346,6 +17387,10 @@ "type": "string", "description": "gRPC server connection timeout" }, + "enable_admin": { + "type": "boolean", + "description": "gRPC server admin option" + }, "enable_reflection": { "type": "boolean", "description": "gRPC server reflection option" @@ -18451,7 +18496,7 @@ "go_os", "go_arch", "cgo_enabled", - "ngt_version", + "algorithm_info", "build_cpu_info_flags" ] } @@ -19101,6 +19146,10 @@ "type": "string", "description": "gRPC server connection timeout" }, + "enable_admin": { + "type": "boolean", + "description": "gRPC server admin option" + }, "enable_reflection": { "type": "boolean", "description": "gRPC server reflection option" @@ -20024,6 +20073,10 @@ "type": "string", "description": "gRPC server connection timeout" }, + "enable_admin": { + "type": "boolean", + "description": "gRPC server admin option" + }, "enable_reflection": { "type": "boolean", "description": "gRPC server reflection option" diff --git a/charts/vald/values.yaml b/charts/vald/values.yaml index 0c3cda45202..e9db21a4c2e 100644 --- a/charts/vald/values.yaml +++ b/charts/vald/values.yaml @@ -210,6 +210,9 @@ defaults: # @schema {"name": "defaults.server_config.servers.grpc.server.grpc.enable_reflection", "type": "boolean"} # defaults.server_config.servers.grpc.server.grpc.enable_reflection -- gRPC server reflection option enable_reflection: true + # @schema {"name": "defaults.server_config.servers.grpc.server.grpc.enable_admin", "type": "boolean"} + # defaults.server_config.servers.grpc.server.grpc.enable_admin -- gRPC server admin option + enable_admin: true # @schema {"name": "defaults.server_config.servers.grpc.server.socket_option", "alias": "socket_option"} socket_option: # defaults.server_config.servers.grpc.server.socket_option.reuse_port -- server listen socket option for reuse_port functionality @@ -805,7 +808,7 @@ defaults: # @schema {"name": "defaults.observability.metrics.enable_version_info", "type": "boolean"} # defaults.observability.metrics.enable_version_info -- version info metrics enabled enable_version_info: true - # @schema {"name": "defaults.observability.metrics.version_info_labels", "type": "array", "items": {"type": "string", "enum": ["vald_version", "server_name", "git_commit", "build_time", "go_version", "go_os", "go_arch", "cgo_enabled", "ngt_version", "build_cpu_info_flags"]}} + # @schema {"name": "defaults.observability.metrics.version_info_labels", "type": "array", "items": {"type": "string", "enum": ["vald_version", "server_name", "git_commit", "build_time", "go_version", "go_os", "go_arch", "cgo_enabled", "algorithm_info", "build_cpu_info_flags"]}} # defaults.observability.metrics.version_info_labels -- enabled label names of version info version_info_labels: - "vald_version" @@ -815,7 +818,7 @@ defaults: - "go_version" - "go_os" - "go_arch" - - "ngt_version" + - "algorithm_info" # @schema {"name": "defaults.observability.metrics.enable_memory", "type": "boolean"} # defaults.observability.metrics.enable_memory -- memory metrics enabled enable_memory: true @@ -1772,6 +1775,10 @@ agent: # @schema {"name": "agent.version", "alias": "version"} # agent.version -- version of agent config version: v0.0.0 + # @schema {"name": "agent.algorithm", "type": "string", "enum": ["ngt", "faiss"]} + # agent.algorithm -- agent algorithm type. + # it should be `ngt` or `faiss`. + algorithm: ngt # @schema {"name": "agent.time_zone", "type": "string"} # agent.time_zone -- Time zone time_zone: "" @@ -1780,7 +1787,7 @@ agent: logging: {} # @schema {"name": "agent.name", "type": "string"} # agent.name -- name of agent deployment - name: vald-agent-ngt + name: vald-agent # @schema {"name": "agent.kind", "type": "string", "enum": ["StatefulSet", "Deployment", "DaemonSet"]} # agent.kind -- deployment kind: Deployment, DaemonSet or StatefulSet kind: StatefulSet @@ -1951,7 +1958,7 @@ agent: - key: app operator: In values: - - vald-agent-ngt + - vald-agent # agent.affinity.podAntiAffinity.requiredDuringSchedulingIgnoredDuringExecution -- pod anti-affinity required scheduling terms requiredDuringSchedulingIgnoredDuringExecution: [] # @schema {"name": "agent.topologySpreadConstraints", "alias": "topologySpreadConstraints"} @@ -1977,7 +1984,7 @@ agent: observability: otlp: attribute: - service_name: vald-agent-ngt + service_name: vald-agent # @schema {"name": "agent.resources", "alias": "resources"} # agent.resources -- compute resources. # recommended setting of memory requests = cluster memory * 0.4 / number of agent pods diff --git a/charts/vald/values/dev.yaml b/charts/vald/values/dev.yaml index 1a910b024d5..ec5c91fc61c 100644 --- a/charts/vald/values/dev.yaml +++ b/charts/vald/values/dev.yaml @@ -28,6 +28,8 @@ gateway: profefe.com/enable: "true" profefe.com/port: "6060" profefe.com/service: "vald-lb-gateway" + ingress: + enabled: true resources: requests: cpu: 100m diff --git a/cmd/agent/core/faiss/main.go b/cmd/agent/core/faiss/main.go new file mode 100644 index 00000000000..3c78d90e65d --- /dev/null +++ b/cmd/agent/core/faiss/main.go @@ -0,0 +1,59 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Package main provides program main +package main + +import ( + "context" + + "github.com/vdaas/vald/internal/errors" + "github.com/vdaas/vald/internal/info" + "github.com/vdaas/vald/internal/log" + "github.com/vdaas/vald/internal/runner" + "github.com/vdaas/vald/internal/safety" + "github.com/vdaas/vald/pkg/agent/core/faiss/config" + "github.com/vdaas/vald/pkg/agent/core/faiss/usecase" +) + +const ( + maxVersion = "v0.0.10" + minVersion = "v0.0.0" + name = "agent faiss" +) + +func main() { + if err := safety.RecoverFunc(func() error { + return runner.Do( + context.Background(), + runner.WithName(name), + runner.WithVersion(info.Version, maxVersion, minVersion), + runner.WithConfigLoader(func(path string) (interface{}, *config.GlobalConfig, error) { + cfg, err := config.NewConfig(path) + if err != nil { + return nil, nil, errors.Wrap(err, "failed to load "+name+"'s configuration") + } + return cfg, &cfg.GlobalConfig, nil + }), + runner.WithDaemonInitializer(func(cfg interface{}) (runner.Runner, error) { + return usecase.New(cfg.(*config.Data)) + }), + ) + })(); err != nil { + log.Fatal(err, info.Get()) + return + } +} diff --git a/cmd/agent/core/faiss/sample.yaml b/cmd/agent/core/faiss/sample.yaml new file mode 100644 index 00000000000..69fdbda5ec8 --- /dev/null +++ b/cmd/agent/core/faiss/sample.yaml @@ -0,0 +1,123 @@ +# +# Copyright (C) 2019-2024 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +version: v0.0.0 +time_zone: JST +logging: + format: raw + level: debug + logger: glg +server_config: + servers: + - name: grpc + host: 0.0.0.0 + port: 8081 + grpc: + bidirectional_stream_concurrency: 20 + connection_timeout: "" + header_table_size: 0 + initial_conn_window_size: 0 + initial_window_size: 0 + interceptors: [] + keepalive: + max_conn_age: "" + max_conn_age_grace: "" + max_conn_idle: "" + time: "" + timeout: "" + max_header_list_size: 0 + max_receive_message_size: 0 + max_send_message_size: 0 + read_buffer_size: 0 + write_buffer_size: 0 + mode: GRPC + probe_wait_time: 3s + restart: true + health_check_servers: + - name: readiness + host: 0.0.0.0 + port: 3001 + http: + handler_timeout: "" + idle_timeout: "" + read_header_timeout: "" + read_timeout: "" + shutdown_duration: 0s + write_timeout: "" + mode: "" + probe_wait_time: 3s + metrics_servers: + startup_strategy: + - grpc + - readiness + full_shutdown_duration: 600s + tls: + ca: /path/to/ca + cert: /path/to/cert + enabled: false + key: /path/to/key +observability: + enabled: false + collector: + duration: 5s + metrics: + enable_cgo: true + enable_goroutine: true + enable_memory: true + enable_version_info: true + version_info_labels: + - vald_version + - server_name + - git_commit + - build_time + - go_version + - go_os + - go_arch + - faiss_version + trace: + enabled: false + sampling_rate: 1 + prometheus: + enabled: false + endpoint: /metrics + namespace: vald + jaeger: + enabled: false + collector_endpoint: "" + agent_endpoint: "jaeger-agent.default.svc.cluster.local:6831" + username: "" + password: "" + service_name: "vald-agent-faiss" + buffer_max_count: 10 +faiss: + auto_index_check_duration: 30m + auto_index_duration_limit: 24h + auto_index_length: 100 + auto_save_index_duration: 35m + dimension: 64 + enable_copy_on_write: false + enable_in_memory_mode: true + enable_proactive_gc: true + index_path: "" + initial_delay_max_duration: 3m + load_index_timeout_factor: 1ms + m: 8 # dimension % m == 0, train size >= 2^m(or nlist) * minPointsPerCentroid + max_load_index_timeout: 10m + metric_type: "inner_product" + min_load_index_timeout: 3m + nbits_per_idx: 8 + nlist: 100 diff --git a/cmd/agent/core/ngt/sample-cow.yaml b/cmd/agent/core/ngt/sample-cow.yaml index 4684f5d57d2..22c39a193b3 100644 --- a/cmd/agent/core/ngt/sample-cow.yaml +++ b/cmd/agent/core/ngt/sample-cow.yaml @@ -87,7 +87,7 @@ observability: - go_version - go_os - go_arch - - ngt_version + - algorithm_info trace: enabled: false sampling_rate: 1 diff --git a/cmd/agent/core/ngt/sample.yaml b/cmd/agent/core/ngt/sample.yaml index e8d2a6ee4fd..d85547407bc 100644 --- a/cmd/agent/core/ngt/sample.yaml +++ b/cmd/agent/core/ngt/sample.yaml @@ -87,7 +87,7 @@ observability: - go_version - go_os - go_arch - - ngt_version + - algorithm_info trace: enabled: false sampling_rate: 1 diff --git a/cmd/discoverer/k8s/sample.yaml b/cmd/discoverer/k8s/sample.yaml index 703fd22d1f5..5298823cd9e 100644 --- a/cmd/discoverer/k8s/sample.yaml +++ b/cmd/discoverer/k8s/sample.yaml @@ -100,7 +100,7 @@ observability: - go_version - go_os - go_arch - - ngt_version + - algorithm_info trace: enabled: false sampling_rate: 1 diff --git a/cmd/gateway/filter/sample.yaml b/cmd/gateway/filter/sample.yaml index 71366f7aab3..3a0ffc87e01 100644 --- a/cmd/gateway/filter/sample.yaml +++ b/cmd/gateway/filter/sample.yaml @@ -98,7 +98,7 @@ observability: - go_version - go_os - go_arch - - ngt_version + - algorithm_info trace: enabled: false sampling_rate: 1 diff --git a/cmd/gateway/lb/sample.yaml b/cmd/gateway/lb/sample.yaml index 0163700ddfb..d23403a3fe5 100644 --- a/cmd/gateway/lb/sample.yaml +++ b/cmd/gateway/lb/sample.yaml @@ -98,7 +98,7 @@ observability: - go_version - go_os - go_arch - - ngt_version + - algorithm_info trace: enabled: false sampling_rate: 1 diff --git a/cmd/manager/index/sample.yaml b/cmd/manager/index/sample.yaml index 4eb46f0fc01..1e8c2c803d4 100644 --- a/cmd/manager/index/sample.yaml +++ b/cmd/manager/index/sample.yaml @@ -98,7 +98,7 @@ observability: - go_version - go_os - go_arch - - ngt_version + - algorithm_info trace: enabled: false sampling_rate: 1 diff --git a/dockers/agent/core/faiss/Dockerfile b/dockers/agent/core/faiss/Dockerfile new file mode 100644 index 00000000000..0fc2308a2a3 --- /dev/null +++ b/dockers/agent/core/faiss/Dockerfile @@ -0,0 +1,127 @@ +# syntax = docker/dockerfile:latest +# +# Copyright (C) 2019-2024 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +ARG GO_VERSION=latest +# ARG DISTROLESS_IMAGE=gcr.io/distroless/static +# ARG DISTROLESS_IMAGE_TAG=nonroot +ARG MAINTAINER="vdaas.org vald team " + +FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION} AS golang + +FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder + +ARG TARGETARCH + +ENV ARCH=${TARGETARCH} +ENV GO111MODULE on +ENV DEBIAN_FRONTEND noninteractive +ENV INITRD No +ENV LANG en_US.UTF-8 +ENV GOROOT /opt/go +ENV GOPATH /go +ENV PATH ${PATH}:${GOROOT}/bin:${GOPATH}/bin +ENV ORG vdaas +ENV REPO vald +ENV PKG agent/core/faiss +ENV PKG_INTERNAL agent/internal +ENV APP_NAME faiss + +# skipcq: DOK-DL3008 +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + ca-certificates \ + cmake \ + curl \ + g++ \ + gcc \ + git \ + intel-mkl \ + unzip \ + upx \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +COPY --from=golang /usr/local/go $GOROOT +RUN mkdir -p "$GOPATH/src" + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/Makefile.d +COPY Makefile.d . +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} +COPY Makefile . +COPY .git . +COPY go.mod . +COPY go.sum . + +RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ + make go/download + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal +COPY internal . + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/apis/grpc +COPY apis/grpc . + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG} +COPY pkg/${PKG} . + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/pkg/${PKG_INTERNAL} +COPY pkg/${PKG_INTERNAL} . + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} +COPY cmd/${PKG} . + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions +COPY versions . + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} +RUN update-alternatives --set libblas.so-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libmkl_rt.so \ + && make faiss/install + +RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ + --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ + make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ + && mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" + +WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} +RUN cp sample.yaml /tmp/config.yaml + +FROM --platform=${BUILDPLATFORM} ubuntu:devel +LABEL maintainer="${MAINTAINER}" + +ENV APP_NAME faiss + +COPY --from=builder /usr/bin/${APP_NAME} /go/bin/${APP_NAME} +COPY --from=builder /tmp/config.yaml /etc/server/config.yaml + +COPY --from=builder /usr/local/lib/libfaiss.so /usr/local/lib/libfaiss.so +COPY --from=builder /lib/x86_64-linux-gnu/libstdc++.so.6 /lib/x86_64-linux-gnu/libstdc++.so.6 +COPY --from=builder /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/x86_64-linux-gnu/libgcc_s.so.1 +COPY --from=builder /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6 +COPY --from=builder /lib/x86_64-linux-gnu/libmkl_intel_lp64.so /lib/x86_64-linux-gnu/libmkl_intel_lp64.so +COPY --from=builder /lib/x86_64-linux-gnu/libmkl_sequential.so /lib/x86_64-linux-gnu/libmkl_sequential.so +COPY --from=builder /lib/x86_64-linux-gnu/libmkl_core.so /lib/x86_64-linux-gnu/libmkl_core.so +COPY --from=builder /lib/x86_64-linux-gnu/libgomp.so.1 /lib/x86_64-linux-gnu/libgomp.so.1 +COPY --from=builder /lib/x86_64-linux-gnu/libm.so.6 /lib/x86_64-linux-gnu/libm.so.6 +COPY --from=builder /lib/x86_64-linux-gnu/libdl.so.2 /lib/x86_64-linux-gnu/libdl.so.2 +COPY --from=builder /lib/x86_64-linux-gnu/libpthread.so.0 /lib/x86_64-linux-gnu/libpthread.so.0 +COPY --from=builder /lib/x86_64-linux-gnu/libmkl_avx2.so /lib/x86_64-linux-gnu/libmkl_avx2.so +RUN ldconfig -v + +USER nonroot:nonroot + +ENTRYPOINT ["/go/bin/faiss"] diff --git a/dockers/agent/core/ngt/Dockerfile b/dockers/agent/core/ngt/Dockerfile index d98150a7935..293b819988b 100644 --- a/dockers/agent/core/ngt/Dockerfile +++ b/dockers/agent/core/ngt/Dockerfile @@ -41,8 +41,8 @@ ENV APP_NAME ngt # skipcq: DOK-DL3008 RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ build-essential \ + ca-certificates \ cmake \ curl \ g++ \ diff --git a/dockers/ci/base/Dockerfile b/dockers/ci/base/Dockerfile index 2bb5787508d..0b84885016b 100644 --- a/dockers/ci/base/Dockerfile +++ b/dockers/ci/base/Dockerfile @@ -72,6 +72,7 @@ COPY Makefile.d Makefile.d COPY apis/proto apis/proto COPY versions versions COPY hack/go.mod.default hack/go.mod.default +COPY example/client/go.mod.default example/client/go.mod.default RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ @@ -80,6 +81,7 @@ RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ make ngt/install \ + && make faiss/install \ && make helm/install \ && make helm-docs/install \ && make kind/install \ diff --git a/dockers/dev/Dockerfile b/dockers/dev/Dockerfile index 7a33529525f..dad96bda314 100644 --- a/dockers/dev/Dockerfile +++ b/dockers/dev/Dockerfile @@ -51,12 +51,14 @@ COPY Makefile . COPY Makefile.d Makefile.d COPY versions versions COPY hack/go.mod.default hack/go.mod.default +COPY example/client/go.mod.default example/client/go.mod.default # basic deps RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ --mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ make deps GO_CLEAN_DEPS=false \ && make ngt/install \ + && make faiss/install \ && make helm/install \ && make helm-docs/install \ && make valdcli/install \ diff --git a/docs/overview/component/README.md b/docs/overview/component/README.md index 49461c6b9bb..58e03e547e5 100644 --- a/docs/overview/component/README.md +++ b/docs/overview/component/README.md @@ -67,6 +67,7 @@ In this section, we will describe what is Vald Agent and the corresponding compo Vald Agent provides functionalities to perform approximate nearest neighbor search. Agent-NGT uses [yahoojapan/NGT](https://github.com/yahoojapan/NGT) as a core library. +And Agent-Faiss uses [facebookresearch/faiss](https://github.com/facebookresearch/faiss) as a core library. Each Vald Agent pod has its own vector data space because only several Vald Agents are selected to be inserted/updated in a single insert/update request. diff --git a/docs/overview/component/agent.md b/docs/overview/component/agent.md index be0326bb7f7..1cf33ad5348 100644 --- a/docs/overview/component/agent.md +++ b/docs/overview/component/agent.md @@ -78,6 +78,56 @@ This image shows the mechanism to create NGT index. Please refer to [Go Doc](https://pkg.go.dev/github.com/vdaas/vald@v1.3.1/pkg/agent/core/ngt/service) for other functions. +#### Vald Agent Faiss + +Vald Agent Faiss uses [Faiss](https://github.com/facebookresearch/faiss) as an algorithm. + +The main functions are the followings: + +- Insert + - Request to insert new vectors into the Faiss. + - Requested vectors are stored in the `vqueue`. + - Cache a fixed number of verctors for Faiss training. + - Once Faiss trained in CreateIndex, the vector is never cached for Faiss training. +- Search + - Get the nearest neighbor vectors of the request vector from Faiss indexes. + - radius/epsilon is search config for NGT and has no meaning in Faiss. +- Update + - Create a request to update the specific vectors to the new vectors. + - Requested vectors are stored in the `vqueue`. +- Remove + - Create a request to remove the specific vectors from Faiss indexes. + - Requested vectors are stored in the `vqueue`. +- Exist + - Check whether the specific vectors are already inserted or not. +- CreateIndex + - Create a new Faiss index structure in memory using vectors stored in the `vqueue` and the existing Faiss index structure if it exists. + - If a certain number of vectors required for Faiss training are not cached, they will not be trained. + - If Faiss is not trained, no index is generated. +- SaveIndex + - Save metadata about Faiss index information to the internal storage. + +Unimplemented functions are the followings: + +- GetObject +- SearchByID +- StreamXXX +- MultiXXX + +
+Same as Agent NGT, You have to control the duration of CreateIndex and SaveIndex by configuration. + +These methods don’t always run when getting the request. + +
+ +
+As you see, Vald Agent Faiss can only search the nearest neighbors from the Faiss index. + +You have to wait to complete the CreateIndex and SaveIndex functions before searching. + +
+ ### Sidecar `Sidecar` saves the index metadata file to external storage like Amazon S3 or Google Cloud Storage. diff --git a/docs/tutorial/get-started-with-faiss-agent.md b/docs/tutorial/get-started-with-faiss-agent.md new file mode 100644 index 00000000000..87d75621601 --- /dev/null +++ b/docs/tutorial/get-started-with-faiss-agent.md @@ -0,0 +1,393 @@ +# Get Started + +This tutorial is for those who have already completed [Get Started](https://github.com/vdaas/vald/blob/main/docs/tutorial/get-started.md). +Please refer to Prepare the Kubernetes Cluster and others there. + +## Deploy Vald on Kubernetes Cluster + +This chapter shows how to deploy Vald using Helm and run it on your Kubernetes cluster.
+In this tutorial, you will deploy the basic configuration of Vald that is consisted of vald-agent-faiss, vald-lb-gateway, vald-discoverer, and vald-manager-index.
+ +1. Clone the repository + + ```bash + git clone https://github.com/vdaas/vald.git && \ + cd vald + ``` + +1. Confirm which cluster to deploy + + ```bash + kubectl cluster-info + ``` + +1. Edit Configurations + + Set the parameters for connecting to the vald-lb-gateway through Kubernetes ingress from the external network. + Please set these parameters. + + ```bash + vim example/helm/values.yaml + === + ## vald-lb-gateway settings + gateway: + lb: + ... + ingress: + enabled: true + # TODO: Set your ingress host. + host: localhost + # TODO: Set annotations which you have to set for your k8s cluster. + annotations: + ... + ## vald-agent-faiss settings + agent: + algorithm: faiss + image: + repository: vdaas/vald-agent-faiss + tag: latest + faiss: + auto_index_check_duration: 1m + auto_index_duration_limit: 24h + auto_index_length: 10 + auto_save_index_duration: 35m + dimension: 784 + enable_copy_on_write: false + enable_in_memory_mode: true + enable_proactive_gc: true + index_path: "" + initial_delay_max_duration: 3m + load_index_timeout_factor: 1ms + m: 8 # dimension % m == 0, train size >= 2^m(or nlist) * minPointsPerCentroid + max_load_index_timeout: 10m + metric_type: "inner_product" + min_load_index_timeout: 3m + nbits_per_idx: 8 + nlist: 100 + ... + ``` + + Note:
+ If you decided to use port-forward instead of ingress, please set `gateway.lb.ingress.enabled` to `false`. + +1. Deploy Vald using Helm + + Add vald repo into the helm repo. + + ```bash + helm repo add vald https://vald.vdaas.org/charts + ``` + + Deploy vald on your Kubernetes cluster. + + ```bash + helm install vald vald/vald --values example/helm/values.yaml + ``` + +1. Verify + + When finish deploying Vald, you can check the Vald's pods status following command. + + ```bash + kubectl get pods + ``` + +
Example output
+ If the deployment is successful, all Vald components should be running. + + ```bash + NAME READY STATUS RESTARTS AGE + vald-agent-faiss-0 1/1 Running 0 7m12s + vald-agent-faiss-1 1/1 Running 0 7m12s + vald-agent-faiss-2 1/1 Running 0 7m12s + vald-agent-faiss-3 1/1 Running 0 7m12s + vald-agent-faiss-4 1/1 Running 0 7m12s + vald-discoverer-7f9f697dbb-q44qh 1/1 Running 0 7m11s + vald-lb-gateway-6b7b9f6948-4z5md 1/1 Running 0 7m12s + vald-lb-gateway-6b7b9f6948-68g94 1/1 Running 0 6m56s + vald-lb-gateway-6b7b9f6948-cvspq 1/1 Running 0 6m56s + vald-manager-index-74c7b5ddd6-jrnlw 1/1 Running 0 7m12s + ``` + +
+ + ```bash + kubectl get ingress + ``` + +
Example output
+ + ```bash + NAME CLASS HOSTS ADDRESS PORTS AGE + vald-lb-gateway-ingress localhost 192.168.16.2 80 7m43s + ``` + +
+ + ```bash + kubectl get svc + ``` + +
Example output
+ + ```bash + NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE + kubernetes ClusterIP 10.43.0.1 443/TCP 9m29s + vald-agent-faiss ClusterIP None 8081/TCP,3001/TCP 8m48s + vald-discoverer ClusterIP None 8081/TCP,3001/TCP 8m48s + vald-manager-index ClusterIP None 8081/TCP,3001/TCP 8m48s + vald-lb-gateway ClusterIP None 8081/TCP,3001/TCP 8m48s + ``` + +
+ +## Run Example Code + +In this chapter, you will execute insert, search, and delete vectors to your Vald cluster using the example code.
+The [Fashion-MNIST](https://github.com/zalandoresearch/fashion-mnist) is used as a dataset for indexing and search query. + +The example code is implemented in Go and using [vald-client-go](https://github.com/vdaas/vald-client-go), one of the official Vald client libraries, for requesting to Vald cluster. +Vald provides multiple language client libraries such as Go, Java, Node.js, Python, etc. +If you are interested, please refer to [SDKs](../user-guides/sdks.md).
+ +1. Port Forward(option) + + If you do not use Kubernetes Ingress, port-forward is required to make requests from your local environment. + + ```bash + kubectl port-forward deployment/vald-lb-gateway 8081:8081 + ``` + +1. Download dataset + + Download [Fashion-MNIST](https://github.com/zalandoresearch/fashion-mnist) that is used as a dataset for indexing and search query. + + Move to the working directory + + ```bash + cd example/client + ``` + + Download Fashion-MNIST testing dataset + + ```bash + wget http://ann-benchmarks.com/fashion-mnist-784-euclidean.hdf5 + ``` + +1. Run Example + + We use [`example/client/main.go`](https://github.com/vdaas/vald/blob/main/example/client/main.go) to run the example.
+ This example will insert and index 400 vectors into the Vald from the Fashion-MNIST dataset via [gRPC](https://grpc.io/). + And then after waiting for indexing, it will request for searching the nearest vector 10 times. + You will get the 10 nearest neighbor vectors for each search query.
+ Run example codes by executing the below command. + + ```bash + go run main.go + ``` + +
The detailed explanation of example code is here
+ This will execute 6 steps. + + 1. init + + - Import packages +
example code
+ + ```go + package main + + import ( + "context" + "encoding/json" + "flag" + "time" + + "github.com/kpango/fuid" + "github.com/kpango/glg" + "github.com/vdaas/vald-client-go/v1/payload" + "github.com/vdaas/vald-client-go/v1/vald" + + "gonum.org/v1/hdf5" + "google.golang.org/grpc" + ) + ``` + +
+ + - Set variables + + - The constant number of training datasets and test datasets. +
example code
+ + ```go + const ( + insertCount = 400 + testCount = 20 + ) + ``` + +
+ + - The variables for configuration. +
example code
+ + ```go + const ( + datasetPath string + grpcServerAddr string + indexingWaitSeconds uint + ) + ``` + +
+ + - Recognition parameters. +
example code
+ + ```go + func init() { + flag.StringVar(&datasetPath, "path", "fashion-mnist-784-euclidean.hdf5", "set dataset path") + flag.StringVar(&grpcServerAddr, "addr", "127.0.0.1:8081", "set gRPC server address") + flag.UintVar(&indexingWaitSeconds, "wait", 60, "set indexing wait seconds") + flag.Parse() + } + ``` + +
+ + 1. load + + - Loading from Fashion-MNIST dataset and set id for each vector that is loaded. This step will return the training dataset, test dataset, and ids list of ids when loading is completed with success. +
example code
+ + ```go + ids, train, test, err := load(datasetPath) + if err != nil { + glg.Fatal(err) + } + ``` + +
+ + 1. Create the gRPC connection and Vald client with gRPC connection. + +
example code
+ + ```go + ctx := context.Background() + + conn, err := grpc.DialContext(ctx, grpcServerAddr, grpc.WithInsecure()) + if err != nil { + glg.Fatal(err) + } + + client := vald.NewValdClient(conn) + ``` + +
+ + 1. Insert and Index + + - Insert and Indexing 400 training datasets to the Vald agent. +
example code
+ + ```go + for i := range ids [:insertCount] { + _, err := client.Insert(ctx, &payload.Insert_Request{ + Vector: &payload.Object_Vector{ + Id: ids[i], + Vector: train[i], + }, + Config: &payload.Insert_Config{ + SkipStrictExistCheck: true, + }, + }) + if err != nil { + glg.Fatal(err) + } + if i%10 == 0 { + glg.Infof("Inserted %d", i) + } + } + ``` + +
+ + - Wait until indexing finish. +
example code
+ + ```go + wt := time.Duration(indexingWaitSeconds) * time.Second + glg.Infof("Wait %s for indexing to finish", wt) + time.Sleep(wt) + ``` + +
+ + 1. Search + + - Search 10 neighbor vectors for each 20 test datasets and return a list of the neighbor vectors. + + - When getting approximate vectors, the Vald client sends search config and vector to the server via gRPC. +
example code
+ + ```go + glg.Infof("Start search %d times", testCount) + for i, vec := range test[:testCount] { + res, err := client.Search(ctx, &payload.Search_Request){ + Vector: vec, + Config: &payload.Search_Config{ + Num: 10, + Radius: -1, + Epsilon: 0.1, + Timeout: 100000000, + } + } + if err != nil { + glg.Fatal(err) + } + + b, _ := json.MarshalIndent(res.GetResults(), "", " ") + glg.Infof("%d - Results : %s\n\n", i+1, string(b)) + time.Sleep(1 * time.Second) + } + ``` + +
+ + 1. Remove + + - Remove 400 indexed training datasets from the Vald agent. +
example code
+ + ```go + for i := range ids [:insertCount] { + _, err := client.Remove(ctx, &payload.Remove_Request{ + Id: &payload.Object_ID{ + Id: ids[i], + }, + }) + if err != nil { + glg.Fatal(err) + } + if i%10 == 0 { + glg.Infof("Removed %d", i) + } + } + ``` + +
+ +## Cleanup + +In the last, you can remove the deployed Vald Cluster by executing the below command. + +```bash +helm uninstall vald +``` + +## References + +- [Get Started with NGT agent by default](https://github.com/vdaas/vald/blob/main/docs/tutorial/get-started.md) +- [Faiss](https://github.com/facebookresearch/faiss) diff --git a/docs/user-guides/backup-configuration.md b/docs/user-guides/backup-configuration.md index 0f8872f38f8..06c1e3b21ab 100644 --- a/docs/user-guides/backup-configuration.md +++ b/docs/user-guides/backup-configuration.md @@ -29,7 +29,7 @@ Please refer to the following tables and decide which method fit for your case. This section shows the best practice for configuring backup features with PV, S3, or PV + S3. -Each sample configuration yaml is published on [here](https://github.com/vdaas/vald/tree/master/charts/vald/values). +Each sample configuration yaml is published on [here](https://github.com/vdaas/vald/tree/main/charts/vald/values). Please refer it for more details. ### General diff --git a/docs/user-guides/configuration.md b/docs/user-guides/configuration.md index b3b9e06d882..f54def2a171 100644 --- a/docs/user-guides/configuration.md +++ b/docs/user-guides/configuration.md @@ -175,6 +175,42 @@ When the setting parameter of Vald Agent NGT is shorter than the setting value o If this happens, the Index Manager may not function properly. +#### Faiss + +Vald Agent Faiss uses [facebookresearch/faiss][faiss] as a core library for searching vectors. +The behaviors of Faiss can be configured by setting `agent.faiss` field object. + +The important parameters are the followings: + +- `agent.faiss.dimension` +- `agent.faiss.distance_type` +- `agent.faiss.m` +- `agent.faiss.metric_type` +- `agent.faiss.nbits_per_idx` +- `agent.faiss.nlist` + +Users should configure these parameters first to fit their use case. +For further details, please read [the Fiass wiki][faiss-wiki]. + +Vald Agent Faiss has a feature to start indexing automatically. +The behavior of this feature can be configured with these parameters: + +- `agent.faiss.auto_index_duration_limit` +- `agent.faiss.auto_index_check_duration` +- `agent.faiss.auto_index_length` + +
+While the Vald Agent Faiss is in the process of creating indexes, it will ignore all search requests to the target pods. +
+ +
+When deploying Vald Index Manager, the above parameters should be set much longer than the Vald Index Manager settings (Please refer to the Vald Index Manager section) or minus value.
+E.g., set agent.faiss.auto_index_duration_limit to "720h" or "-1h" and agent.faiss.auto_index_check_duration to "24h" or "-1h".
+This is because the Vald Index Manager accurately grasps the index information of each Vald Agent Faiss and controls the execution timing of indexing.

+When the setting parameter of Vald Agent Faiss is shorter than the setting value of Vald Index Manager, Vald Agent Faiss may start indexing by itself without the execution command from Vald Index Manager. +If this happens, the Index Manager may not function properly. +
+ #### Resource requests and limits, Pod priorities Because the Vald Agent pod places indexes on memory, termination of agent pods causes loss of indexes. @@ -371,3 +407,5 @@ For further details, there are references to the Helm values in the Vald GitHub [kubernetes-topology-spread-constraints]: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ [yj-ngt]: https://github.com/yahoojapan/NGT [yj-ngt-wiki]: https://github.com/yahoojapan/NGT/wiki +[faiss]: https://github.com/facebookresearch/faiss +[faiss-wiki]: https://github.com/facebookresearch/faiss/wiki diff --git a/docs/user-guides/observability-configuration.md b/docs/user-guides/observability-configuration.md index cf2734ab9e2..66617e874b2 100644 --- a/docs/user-guides/observability-configuration.md +++ b/docs/user-guides/observability-configuration.md @@ -132,7 +132,7 @@ defaults: - "go_version" - "go_os" - "go_arch" - - "ngt_version" + - "algorithm_info" # enable memory metrics enable_memory: true # enable goroutine metrics diff --git a/example/client/go.mod b/example/client/go.mod index a356acea235..07b37447398 100644 --- a/example/client/go.mod +++ b/example/client/go.mod @@ -3,19 +3,19 @@ module github.com/vdaas/vald/example/client go 1.21 replace ( - github.com/envoyproxy/protoc-gen-validate => github.com/envoyproxy/protoc-gen-validate v1.0.2 + github.com/envoyproxy/protoc-gen-validate => github.com/envoyproxy/protoc-gen-validate v1.0.4 github.com/goccy/go-json => github.com/goccy/go-json v0.10.2 github.com/golang/protobuf => github.com/golang/protobuf v1.5.3 github.com/kpango/glg => github.com/kpango/glg v1.6.15 github.com/pkg/sftp => github.com/pkg/sftp v1.13.6 - golang.org/x/crypto => golang.org/x/crypto v0.14.0 - golang.org/x/net => golang.org/x/net v0.17.0 - golang.org/x/text => golang.org/x/text v0.13.0 - google.golang.org/genproto => google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b - google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b - google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b - google.golang.org/grpc => google.golang.org/grpc v1.58.3 - google.golang.org/protobuf => google.golang.org/protobuf v1.31.0 + golang.org/x/crypto => golang.org/x/crypto v0.18.0 + golang.org/x/net => golang.org/x/net v0.20.0 + golang.org/x/text => golang.org/x/text v0.14.0 + google.golang.org/genproto => google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe + google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe + google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe + google.golang.org/grpc => google.golang.org/grpc v1.61.0 + google.golang.org/protobuf => google.golang.org/protobuf v1.32.0 gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1 ) @@ -23,22 +23,21 @@ replace ( require ( github.com/kpango/fuid v0.0.0-20221203053508-503b5ad89aa1 github.com/kpango/glg v1.6.14 - github.com/vdaas/vald-client-go v1.7.8 + github.com/vdaas/vald-client-go v1.7.10 gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 - google.golang.org/grpc v1.58.3 + google.golang.org/grpc v1.60.1 ) require ( - github.com/envoyproxy/protoc-gen-validate v1.0.2 // indirect + buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20231115204500-e097f827e652.2 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/kpango/fastime v1.1.9 // indirect - github.com/planetscale/vtprotobuf v0.5.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231012201019-e917dd12ba7a // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240116215550-a9fa1716bcac // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac // indirect + google.golang.org/protobuf v1.32.0 // indirect ) diff --git a/example/client/go.sum b/example/client/go.sum index b30397075d7..c960134ce6b 100644 --- a/example/client/go.sum +++ b/example/client/go.sum @@ -1,53 +1,44 @@ -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20231115204500-e097f827e652.2 h1:iEPA5SBtdLJNwQis/SrcCuDWJh5E1V0mVO4Ih7/mRbg= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20231115204500-e097f827e652.2/go.mod h1:xafc+XIsTxTy76GJQ1TKgvJWsSugFBqMaN27WhUblew= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/kpango/fastime v1.1.9 h1:xVQHcqyPt5M69DyFH7g1EPRns1YQNap9d5eLhl/Jy84= github.com/kpango/fastime v1.1.9/go.mod h1:vyD7FnUn08zxY4b/QFBZVG+9EWMYsNl+QF0uE46urD4= github.com/kpango/fuid v0.0.0-20221203053508-503b5ad89aa1 h1:rxyM+7uaZQ35P9fbixdnld/h4AgEhODoubuy6A4nDdk= github.com/kpango/fuid v0.0.0-20221203053508-503b5ad89aa1/go.mod h1:CAYeq6us9NfnRkSz67/xKVIR6/vaY5ZQZRe6IVcaIKg= github.com/kpango/glg v1.6.15 h1:nw0xSxpSyrDIWHeb3dvnE08PW+SCbK+aYFETT75IeLA= github.com/kpango/glg v1.6.15/go.mod h1:cmsc7Yeu8AS3wHLmN7bhwENXOpxfq+QoqxCIk2FneRk= -github.com/planetscale/vtprotobuf v0.5.0 h1:l8PXm6Colok5z6qQLNhAj2Jq5BfoMTIHxLER5a6nDqM= -github.com/planetscale/vtprotobuf v0.5.0/go.mod h1:wm1N3qk9G/4+VM1WhpkLbvY/d8+0PbwYYpP5P5VhTks= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/vdaas/vald-client-go v1.7.8 h1:QguvA8BTj8o3Xe2FfmSO8ipOBTTdXoTB1KnSL52+IvM= -github.com/vdaas/vald-client-go v1.7.8/go.mod h1:kZ4GSvNGrCIaD3HfA7quabWM8Z10roUzT4C4xgCSTqU= +github.com/vdaas/vald-client-go v1.7.10 h1:hsvAXDJPs+KSdx6pUE66ZLz39uKcqFaNm1li7Ij8HG4= +github.com/vdaas/vald-client-go v1.7.10/go.mod h1:Q1FkJWDwDVM/64xLcQCBmA5mR2vaGxB7rrFSqsxq93E= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= -golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 h1:vJpL69PeUullhJyKtTjHjENEmZU3BkO4e+fod7nKzgM= gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946/go.mod h1:BQUWDHIAygjdt1HnUPQ0eWqLN2n5FwJycrpYUVUOx2I= -google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= -google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= -google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= -google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe h1:USL2DhxfgRchafRvt/wYyyQNzwgL7ZiURcozOE/Pkvo= +google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe h1:0poefMBYvYbs7g5UkjS6HcxBPaTRAmznle9jnxYoAI8= +google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= +google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= diff --git a/example/client/main.go b/example/client/main.go index c587a4505e4..5cf5fb2c1f6 100644 --- a/example/client/main.go +++ b/example/client/main.go @@ -29,13 +29,13 @@ import ( ) const ( - insertCount = 400 - testCount = 20 + testCount = 20 ) var ( datasetPath string grpcServerAddr string + insertCount uint indexingWaitSeconds uint ) @@ -43,10 +43,12 @@ func init() { /** Path option specifies hdf file by path. Default value is `fashion-mnist-784-euclidean.hdf5`. Addr option specifies grpc server address. Default value is `127.0.0.1:8081`. - Wait option specifies indexing wait time (in seconds). Default value is `60`. + Insert option specifies insert count. Default value is `400`. + Wait option specifies indexing wait time (in seconds). Default value is `60`. **/ flag.StringVar(&datasetPath, "path", "fashion-mnist-784-euclidean.hdf5", "dataset path") flag.StringVar(&grpcServerAddr, "addr", "localhost:8081", "gRPC server address") + flag.UintVar(&insertCount, "insert", 400, "insert count") flag.UintVar(&indexingWaitSeconds, "wait", 60, "indexing wait seconds") flag.Parse() } diff --git a/go.mod b/go.mod old mode 100755 new mode 100644 index 17a2dfe2ef6..301df0a427b --- a/go.mod +++ b/go.mod @@ -3,18 +3,18 @@ module github.com/vdaas/vald go 1.21 replace ( - cloud.google.com/go => cloud.google.com/go v0.111.0 - cloud.google.com/go/bigquery => cloud.google.com/go/bigquery v1.57.1 - cloud.google.com/go/compute => cloud.google.com/go/compute v1.23.3 + cloud.google.com/go => cloud.google.com/go v0.112.0 + cloud.google.com/go/bigquery => cloud.google.com/go/bigquery v1.58.0 + cloud.google.com/go/compute => cloud.google.com/go/compute v1.23.4 cloud.google.com/go/datastore => cloud.google.com/go/datastore v1.15.0 cloud.google.com/go/firestore => cloud.google.com/go/firestore v1.14.0 - cloud.google.com/go/iam => cloud.google.com/go/iam v1.1.5 - cloud.google.com/go/kms => cloud.google.com/go/kms v1.15.5 - cloud.google.com/go/monitoring => cloud.google.com/go/monitoring v1.16.3 - cloud.google.com/go/pubsub => cloud.google.com/go/pubsub v1.33.0 - cloud.google.com/go/secretmanager => cloud.google.com/go/secretmanager v1.11.4 - cloud.google.com/go/storage => cloud.google.com/go/storage v1.35.1 - cloud.google.com/go/trace => cloud.google.com/go/trace v1.10.4 + cloud.google.com/go/iam => cloud.google.com/go/iam v1.1.6 + cloud.google.com/go/kms => cloud.google.com/go/kms v1.15.6 + cloud.google.com/go/monitoring => cloud.google.com/go/monitoring v1.17.1 + cloud.google.com/go/pubsub => cloud.google.com/go/pubsub v1.36.1 + cloud.google.com/go/secretmanager => cloud.google.com/go/secretmanager v1.11.5 + cloud.google.com/go/storage => cloud.google.com/go/storage v1.37.0 + cloud.google.com/go/trace => cloud.google.com/go/trace v1.10.5 code.cloudfoundry.org/bytefmt => code.cloudfoundry.org/bytefmt v0.0.0-20231017140541-3b893ed0421b contrib.go.opencensus.io/exporter/aws => contrib.go.opencensus.io/exporter/aws v0.0.0-20230502192102-15967c811cec contrib.go.opencensus.io/exporter/prometheus => contrib.go.opencensus.io/exporter/prometheus v0.4.2 @@ -23,48 +23,49 @@ replace ( github.com/Azure/azure-amqp-common-go/v3 => github.com/Azure/azure-amqp-common-go/v3 v3.2.3 github.com/Azure/azure-sdk-for-go => github.com/Azure/azure-sdk-for-go v68.0.0+incompatible github.com/Azure/azure-sdk-for-go/sdk/azcore => github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1 - github.com/Azure/azure-sdk-for-go/sdk/azidentity => github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 + github.com/Azure/azure-sdk-for-go/sdk/azidentity => github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 github.com/Azure/azure-sdk-for-go/sdk/internal => github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 - github.com/Azure/go-amqp => github.com/Azure/go-amqp v1.0.2 - github.com/Azure/go-autorest => github.com/Azure/go-autorest v14.2.1-0.20230905222633-df94ce56f001+incompatible - github.com/Azure/go-autorest/autorest => github.com/Azure/go-autorest/autorest v0.11.30-0.20230905222633-df94ce56f001 + github.com/Azure/go-amqp => github.com/Azure/go-amqp v1.0.4 + github.com/Azure/go-autorest => github.com/Azure/go-autorest v14.2.1-0.20240104002855-4c0e21ca2bbb+incompatible + github.com/Azure/go-autorest/autorest => github.com/Azure/go-autorest/autorest v0.11.30-0.20240104002855-4c0e21ca2bbb github.com/Azure/go-autorest/autorest/adal => github.com/Azure/go-autorest/autorest/adal v0.9.23 - github.com/Azure/go-autorest/autorest/date => github.com/Azure/go-autorest/autorest/date v0.3.1-0.20230905222633-df94ce56f001 - github.com/Azure/go-autorest/autorest/mocks => github.com/Azure/go-autorest/autorest/mocks v0.4.3-0.20230905222633-df94ce56f001 - github.com/Azure/go-autorest/autorest/to => github.com/Azure/go-autorest/autorest/to v0.4.1-0.20230905222633-df94ce56f001 - github.com/Azure/go-autorest/logger => github.com/Azure/go-autorest/logger v0.2.2-0.20230905222633-df94ce56f001 - github.com/Azure/go-autorest/tracing => github.com/Azure/go-autorest/tracing v0.6.1-0.20230905222633-df94ce56f001 + github.com/Azure/go-autorest/autorest/date => github.com/Azure/go-autorest/autorest/date v0.3.1-0.20240104002855-4c0e21ca2bbb + github.com/Azure/go-autorest/autorest/mocks => github.com/Azure/go-autorest/autorest/mocks v0.4.3-0.20240104002855-4c0e21ca2bbb + github.com/Azure/go-autorest/autorest/to => github.com/Azure/go-autorest/autorest/to v0.4.1-0.20240104002855-4c0e21ca2bbb + github.com/Azure/go-autorest/logger => github.com/Azure/go-autorest/logger v0.2.2-0.20240104002855-4c0e21ca2bbb + github.com/Azure/go-autorest/tracing => github.com/Azure/go-autorest/tracing v0.6.1-0.20240104002855-4c0e21ca2bbb github.com/BurntSushi/toml => github.com/BurntSushi/toml v1.3.2 - github.com/DATA-DOG/go-sqlmock => github.com/DATA-DOG/go-sqlmock v1.5.1 - github.com/GoogleCloudPlatform/cloudsql-proxy => github.com/GoogleCloudPlatform/cloudsql-proxy v1.33.15 + github.com/DATA-DOG/go-sqlmock => github.com/DATA-DOG/go-sqlmock v1.5.2 + github.com/GoogleCloudPlatform/cloudsql-proxy => github.com/GoogleCloudPlatform/cloudsql-proxy v1.33.16 github.com/Masterminds/semver/v3 => github.com/Masterminds/semver/v3 v3.2.1 github.com/ajstarks/deck => github.com/ajstarks/deck v0.0.0-20231012031509-f833e437b68a github.com/ajstarks/deck/generate => github.com/ajstarks/deck/generate v0.0.0-20231012031509-f833e437b68a github.com/ajstarks/svgo => github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b + github.com/akrylysov/pogreb => github.com/akrylysov/pogreb v0.10.2 github.com/antihax/optional => github.com/antihax/optional v1.0.0 github.com/armon/go-socks5 => github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 - github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.49.0 - github.com/aws/aws-sdk-go-v2 => github.com/aws/aws-sdk-go-v2 v1.24.0 + github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.50.7 + github.com/aws/aws-sdk-go-v2 => github.com/aws/aws-sdk-go-v2 v1.24.1 github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream => github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 - github.com/aws/aws-sdk-go-v2/config => github.com/aws/aws-sdk-go-v2/config v1.26.1 - github.com/aws/aws-sdk-go-v2/credentials => github.com/aws/aws-sdk-go-v2/credentials v1.16.12 - github.com/aws/aws-sdk-go-v2/feature/ec2/imds => github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10 - github.com/aws/aws-sdk-go-v2/feature/s3/manager => github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7 - github.com/aws/aws-sdk-go-v2/internal/configsources => github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9 - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9 - github.com/aws/aws-sdk-go-v2/internal/ini => github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 + github.com/aws/aws-sdk-go-v2/config => github.com/aws/aws-sdk-go-v2/config v1.26.6 + github.com/aws/aws-sdk-go-v2/credentials => github.com/aws/aws-sdk-go-v2/credentials v1.16.16 + github.com/aws/aws-sdk-go-v2/feature/ec2/imds => github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 + github.com/aws/aws-sdk-go-v2/feature/s3/manager => github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.15 + github.com/aws/aws-sdk-go-v2/internal/configsources => github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 + github.com/aws/aws-sdk-go-v2/internal/ini => github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3 github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding => github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 - github.com/aws/aws-sdk-go-v2/service/internal/checksum => github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9 - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9 - github.com/aws/aws-sdk-go-v2/service/internal/s3shared => github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9 - github.com/aws/aws-sdk-go-v2/service/kms => github.com/aws/aws-sdk-go-v2/service/kms v1.27.5 - github.com/aws/aws-sdk-go-v2/service/s3 => github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5 - github.com/aws/aws-sdk-go-v2/service/secretsmanager => github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.25.5 - github.com/aws/aws-sdk-go-v2/service/sns => github.com/aws/aws-sdk-go-v2/service/sns v1.26.5 - github.com/aws/aws-sdk-go-v2/service/sqs => github.com/aws/aws-sdk-go-v2/service/sqs v1.29.5 - github.com/aws/aws-sdk-go-v2/service/ssm => github.com/aws/aws-sdk-go-v2/service/ssm v1.44.5 - github.com/aws/aws-sdk-go-v2/service/sso => github.com/aws/aws-sdk-go-v2/service/sso v1.18.5 - github.com/aws/aws-sdk-go-v2/service/sts => github.com/aws/aws-sdk-go-v2/service/sts v1.26.5 + github.com/aws/aws-sdk-go-v2/service/internal/checksum => github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10 + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 + github.com/aws/aws-sdk-go-v2/service/internal/s3shared => github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10 + github.com/aws/aws-sdk-go-v2/service/kms => github.com/aws/aws-sdk-go-v2/service/kms v1.27.9 + github.com/aws/aws-sdk-go-v2/service/s3 => github.com/aws/aws-sdk-go-v2/service/s3 v1.48.1 + github.com/aws/aws-sdk-go-v2/service/secretsmanager => github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.26.2 + github.com/aws/aws-sdk-go-v2/service/sns => github.com/aws/aws-sdk-go-v2/service/sns v1.26.7 + github.com/aws/aws-sdk-go-v2/service/sqs => github.com/aws/aws-sdk-go-v2/service/sqs v1.29.7 + github.com/aws/aws-sdk-go-v2/service/ssm => github.com/aws/aws-sdk-go-v2/service/ssm v1.44.7 + github.com/aws/aws-sdk-go-v2/service/sso => github.com/aws/aws-sdk-go-v2/service/sso v1.18.7 + github.com/aws/aws-sdk-go-v2/service/sts => github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 github.com/aws/smithy-go => github.com/aws/smithy-go v1.19.0 github.com/benbjohnson/clock => github.com/benbjohnson/clock v1.3.5 github.com/beorn7/perks => github.com/beorn7/perks v1.0.1 @@ -90,9 +91,9 @@ replace ( github.com/dnaeon/go-vcr => github.com/dnaeon/go-vcr v1.2.0 github.com/docopt/docopt-go => github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815 github.com/dustin/go-humanize => github.com/dustin/go-humanize v1.0.1 - github.com/emicklei/go-restful/v3 => github.com/emicklei/go-restful/v3 v3.11.0 - github.com/envoyproxy/go-control-plane => github.com/envoyproxy/go-control-plane v0.11.1 - github.com/envoyproxy/protoc-gen-validate => github.com/envoyproxy/protoc-gen-validate v1.0.2 + github.com/emicklei/go-restful/v3 => github.com/emicklei/go-restful/v3 v3.11.2 + github.com/envoyproxy/go-control-plane => github.com/envoyproxy/go-control-plane v0.12.0 + github.com/envoyproxy/protoc-gen-validate => github.com/envoyproxy/protoc-gen-validate v1.0.4 github.com/evanphx/json-patch => github.com/evanphx/json-patch v0.5.2 github.com/fogleman/gg => github.com/fogleman/gg v1.3.0 github.com/fortytw2/leaktest => github.com/fortytw2/leaktest v1.3.0 @@ -106,30 +107,30 @@ replace ( github.com/go-fonts/liberation => github.com/go-fonts/liberation v0.3.2 github.com/go-fonts/stix => github.com/go-fonts/stix v0.2.2 github.com/go-gl/gl => github.com/go-gl/gl v0.0.0-20231021071112-07e5d0ea2e71 - github.com/go-gl/glfw/v3.3/glfw => github.com/go-gl/glfw/v3.3/glfw v0.0.0-20231124074035-2de0cf0c80af + github.com/go-gl/glfw/v3.3/glfw => github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240118000515-a250818d05e3 github.com/go-kit/log => github.com/go-kit/log v0.2.1 github.com/go-latex/latex => github.com/go-latex/latex v0.0.0-20231108140139-5c1ce85aa4ea github.com/go-logfmt/logfmt => github.com/go-logfmt/logfmt v0.6.0 - github.com/go-logr/logr => github.com/go-logr/logr v1.3.0 + github.com/go-logr/logr => github.com/go-logr/logr v1.4.1 github.com/go-logr/stdr => github.com/go-logr/stdr v1.2.2 github.com/go-logr/zapr => github.com/go-logr/zapr v1.3.0 - github.com/go-openapi/jsonpointer => github.com/go-openapi/jsonpointer v0.20.0 - github.com/go-openapi/jsonreference => github.com/go-openapi/jsonreference v0.20.2 - github.com/go-openapi/swag => github.com/go-openapi/swag v0.22.4 + github.com/go-openapi/jsonpointer => github.com/go-openapi/jsonpointer v0.20.2 + github.com/go-openapi/jsonreference => github.com/go-openapi/jsonreference v0.20.4 + github.com/go-openapi/swag => github.com/go-openapi/swag v0.22.9 github.com/go-pdf/fpdf => github.com/go-pdf/fpdf v1.4.3 github.com/go-playground/assert/v2 => github.com/go-playground/assert/v2 v2.2.0 github.com/go-playground/locales => github.com/go-playground/locales v0.14.1 github.com/go-playground/universal-translator => github.com/go-playground/universal-translator v0.18.1 - github.com/go-playground/validator/v10 => github.com/go-playground/validator/v10 v10.16.0 + github.com/go-playground/validator/v10 => github.com/go-playground/validator/v10 v10.17.0 github.com/go-redis/redis/v8 => github.com/go-redis/redis/v8 v8.11.5 github.com/go-sql-driver/mysql => github.com/go-sql-driver/mysql v1.7.1 github.com/go-task/slim-sprig => github.com/go-task/slim-sprig v2.20.0+incompatible github.com/go-toolsmith/astcopy => github.com/go-toolsmith/astcopy v1.1.0 - github.com/go-toolsmith/astequal => github.com/go-toolsmith/astequal v1.1.0 + github.com/go-toolsmith/astequal => github.com/go-toolsmith/astequal v1.2.0 github.com/go-toolsmith/strparse => github.com/go-toolsmith/strparse v1.1.0 github.com/gobwas/httphead => github.com/gobwas/httphead v0.1.0 github.com/gobwas/pool => github.com/gobwas/pool v0.2.1 - github.com/gobwas/ws => github.com/gobwas/ws v1.3.1 + github.com/gobwas/ws => github.com/gobwas/ws v1.3.2 github.com/goccy/go-json => github.com/goccy/go-json v0.10.2 github.com/gocql/gocql => github.com/gocql/gocql v1.6.0 github.com/gocraft/dbr/v2 => github.com/gocraft/dbr/v2 v2.7.6 @@ -153,22 +154,22 @@ replace ( github.com/google/gofuzz => github.com/google/gofuzz v1.2.0 github.com/google/martian => github.com/google/martian v2.1.0+incompatible github.com/google/martian/v3 => github.com/google/martian/v3 v3.3.2 - github.com/google/pprof => github.com/google/pprof v0.0.0-20231212022811-ec68065c825e + github.com/google/pprof => github.com/google/pprof v0.0.0-20240130152714-0ed6a68c8d9e github.com/google/shlex => github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/google/subcommands => github.com/google/subcommands v1.2.0 - github.com/google/uuid => github.com/google/uuid v1.4.0 + github.com/google/uuid => github.com/google/uuid v1.6.0 github.com/google/wire => github.com/google/wire v0.5.0 github.com/googleapis/gax-go/v2 => github.com/googleapis/gax-go/v2 v2.12.0 github.com/gorilla/mux => github.com/gorilla/mux v1.8.1 github.com/gorilla/websocket => github.com/gorilla/websocket v1.5.1 github.com/gregjones/httpcache => github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 - github.com/grpc-ecosystem/grpc-gateway/v2 => github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 + github.com/grpc-ecosystem/grpc-gateway/v2 => github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 github.com/hailocab/go-hostpool => github.com/kpango/go-hostpool v0.0.0-20210303030322-aab80263dcd0 github.com/hanwen/go-fuse/v2 => github.com/hanwen/go-fuse/v2 v2.4.2 github.com/hashicorp/go-uuid => github.com/hashicorp/go-uuid v1.0.3 github.com/hashicorp/go-version => github.com/hashicorp/go-version v1.6.0 github.com/iancoleman/strcase => github.com/iancoleman/strcase v0.3.0 - github.com/ianlancetaylor/demangle => github.com/ianlancetaylor/demangle v0.0.0-20231023195312-e2daf7ba7156 + github.com/ianlancetaylor/demangle => github.com/ianlancetaylor/demangle v0.0.0-20240123011522-1fd6b93ad1eb github.com/inconshreveable/mousetrap => github.com/inconshreveable/mousetrap v1.1.0 github.com/jackc/chunkreader/v2 => github.com/jackc/chunkreader/v2 v2.0.1 github.com/jackc/pgconn => github.com/jackc/pgconn v1.14.1 @@ -177,7 +178,7 @@ replace ( github.com/jackc/pgpassfile => github.com/jackc/pgpassfile v1.0.0 github.com/jackc/pgproto3/v2 => github.com/jackc/pgproto3/v2 v2.3.2 github.com/jackc/pgservicefile => github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 - github.com/jackc/pgtype => github.com/jackc/pgtype v1.14.0 + github.com/jackc/pgtype => github.com/jackc/pgtype v1.14.1 github.com/jackc/pgx/v4 => github.com/jackc/pgx/v4 v4.18.1 github.com/jackc/puddle => github.com/jackc/puddle v1.3.0 github.com/jessevdk/go-flags => github.com/jessevdk/go-flags v1.5.0 @@ -190,7 +191,7 @@ replace ( github.com/jstemmer/go-junit-report => github.com/jstemmer/go-junit-report v1.0.0 github.com/kisielk/errcheck => github.com/kisielk/errcheck v1.6.3 github.com/kisielk/gotool => github.com/kisielk/gotool v1.0.0 - github.com/klauspost/compress => github.com/klauspost/compress v1.17.5-0.20231209164634-6bf960e5bd5d + github.com/klauspost/compress => github.com/klauspost/compress v1.17.6-0.20240126152145-9b0f130f2599 github.com/klauspost/cpuid/v2 => github.com/klauspost/cpuid/v2 v2.2.6 github.com/kpango/fastime => github.com/kpango/fastime v1.1.9 github.com/kpango/fuid => github.com/kpango/fuid v0.0.0-20221203053508-503b5ad89aa1 @@ -202,14 +203,14 @@ replace ( github.com/kubernetes-csi/external-snapshotter/client/v6 => github.com/kubernetes-csi/external-snapshotter/client/v6 v6.3.0 github.com/kylelemons/godebug => github.com/kylelemons/godebug v1.1.0 github.com/leanovate/gopter => github.com/leanovate/gopter v0.2.9 - github.com/leodido/go-urn => github.com/leodido/go-urn v1.2.4 + github.com/leodido/go-urn => github.com/leodido/go-urn v1.3.0 github.com/lib/pq => github.com/lib/pq v1.10.9 github.com/liggitt/tabwriter => github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de github.com/lucasb-eyer/go-colorful => github.com/lucasb-eyer/go-colorful v1.2.0 github.com/mailru/easyjson => github.com/mailru/easyjson v0.7.7 github.com/mattn/go-colorable => github.com/mattn/go-colorable v0.1.13 github.com/mattn/go-isatty => github.com/mattn/go-isatty v0.0.20 - github.com/mattn/go-sqlite3 => github.com/mattn/go-sqlite3 v1.14.18 + github.com/mattn/go-sqlite3 => github.com/mattn/go-sqlite3 v1.14.20 github.com/matttproud/golang_protobuf_extensions => github.com/matttproud/golang_protobuf_extensions v1.0.4 github.com/mitchellh/colorstring => github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db github.com/moby/spdystream => github.com/moby/spdystream v0.2.0 @@ -223,21 +224,21 @@ replace ( github.com/niemeyer/pretty => github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e github.com/nxadm/tail => github.com/nxadm/tail v1.4.11 github.com/onsi/ginkgo => github.com/onsi/ginkgo v1.16.5 - github.com/onsi/ginkgo/v2 => github.com/onsi/ginkgo/v2 v2.13.2 - github.com/onsi/gomega => github.com/onsi/gomega v1.30.0 + github.com/onsi/ginkgo/v2 => github.com/onsi/ginkgo/v2 v2.15.0 + github.com/onsi/gomega => github.com/onsi/gomega v1.31.1 github.com/peterbourgon/diskv => github.com/peterbourgon/diskv v2.0.1+incompatible github.com/phpdave11/gofpdf => github.com/phpdave11/gofpdf v1.4.2 github.com/phpdave11/gofpdi => github.com/phpdave11/gofpdi v1.0.13 github.com/pierrec/cmdflag => github.com/pierrec/cmdflag v0.0.2 github.com/pierrec/lz4/v3 => github.com/pierrec/lz4/v3 v3.3.5 - github.com/pkg/browser => github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 + github.com/pkg/browser => github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c github.com/pkg/errors => github.com/pkg/errors v0.9.1 github.com/pkg/sftp => github.com/pkg/sftp v1.13.6 github.com/pmezard/go-difflib => github.com/pmezard/go-difflib v1.0.0 github.com/prashantv/gostub => github.com/prashantv/gostub v1.1.0 - github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.17.0 + github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.18.0 github.com/prometheus/client_model => github.com/prometheus/client_model v0.5.0 - github.com/prometheus/common => github.com/prometheus/common v0.45.0 + github.com/prometheus/common => github.com/prometheus/common v0.46.0 github.com/prometheus/procfs => github.com/prometheus/procfs v0.12.0 github.com/prometheus/prometheus => github.com/prometheus/prometheus v1.99.0 github.com/quasilyte/go-ruleguard => github.com/quasilyte/go-ruleguard v0.4.0 @@ -245,7 +246,7 @@ replace ( github.com/quasilyte/gogrep => github.com/quasilyte/gogrep v0.5.0 github.com/quasilyte/stdinfo => github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 github.com/rogpeppe/fastuuid => github.com/rogpeppe/fastuuid v1.2.0 - github.com/rogpeppe/go-internal => github.com/rogpeppe/go-internal v1.11.0 + github.com/rogpeppe/go-internal => github.com/rogpeppe/go-internal v1.12.0 github.com/rs/xid => github.com/rs/xid v1.5.0 github.com/rs/zerolog => github.com/rs/zerolog v1.31.0 github.com/russross/blackfriday/v2 => github.com/russross/blackfriday/v2 v2.1.0 @@ -273,53 +274,53 @@ replace ( github.com/zeebo/xxh3 => github.com/zeebo/xxh3 v1.0.2 go.etcd.io/bbolt => go.etcd.io/bbolt v1.3.8 go.opencensus.io => go.opencensus.io v0.24.0 - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0 - go.opentelemetry.io/otel => go.opentelemetry.io/otel v1.11.1 - go.opentelemetry.io/otel/exporters/otlp/internal/retry => go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.1 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric => go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.33.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc => go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.33.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace => go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.1 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc => go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.1 - go.opentelemetry.io/otel/metric => go.opentelemetry.io/otel/metric v0.33.0 - go.opentelemetry.io/otel/sdk => go.opentelemetry.io/otel/sdk v1.11.1 - go.opentelemetry.io/otel/sdk/metric => go.opentelemetry.io/otel/sdk/metric v0.33.0 - go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v1.11.1 - go.opentelemetry.io/proto/otlp => go.opentelemetry.io/proto/otlp v1.0.0 - go.starlark.net => go.starlark.net v0.0.0-20231121155337-90ade8b19d09 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 + go.opentelemetry.io/otel => go.opentelemetry.io/otel v1.22.0 + go.opentelemetry.io/otel/exporters/otlp/internal/retry => go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.17.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric => go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.43.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc => go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.45.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace => go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc => go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0 + go.opentelemetry.io/otel/metric => go.opentelemetry.io/otel/metric v1.22.0 + go.opentelemetry.io/otel/sdk => go.opentelemetry.io/otel/sdk v1.22.0 + go.opentelemetry.io/otel/sdk/metric => go.opentelemetry.io/otel/sdk/metric v1.22.0 + go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v1.22.0 + go.opentelemetry.io/proto/otlp => go.opentelemetry.io/proto/otlp v1.1.0 + go.starlark.net => go.starlark.net v0.0.0-20240123142251-f86470692795 go.uber.org/atomic => go.uber.org/atomic v1.11.0 go.uber.org/automaxprocs => go.uber.org/automaxprocs v1.5.3 go.uber.org/goleak => go.uber.org/goleak v1.3.0 go.uber.org/multierr => go.uber.org/multierr v1.11.0 go.uber.org/zap => go.uber.org/zap v1.26.0 - gocloud.dev => gocloud.dev v0.35.0 - golang.org/x/crypto => golang.org/x/crypto v0.16.0 - golang.org/x/exp => golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb - golang.org/x/exp/typeparams => golang.org/x/exp/typeparams v0.0.0-20231206192017-f3f8817b8deb - golang.org/x/image => golang.org/x/image v0.14.0 + gocloud.dev => gocloud.dev v0.36.0 + golang.org/x/crypto => golang.org/x/crypto v0.18.0 + golang.org/x/exp => golang.org/x/exp v0.0.0-20240119083558-1b970713d09a + golang.org/x/exp/typeparams => golang.org/x/exp/typeparams v0.0.0-20240119083558-1b970713d09a + golang.org/x/image => golang.org/x/image v0.15.0 golang.org/x/lint => golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 - golang.org/x/mobile => golang.org/x/mobile v0.0.0-20231127183840-76ac6878050a + golang.org/x/mobile => golang.org/x/mobile v0.0.0-20240112133503-c713f31d574b golang.org/x/mod => golang.org/x/mod v0.14.0 - golang.org/x/net => golang.org/x/net v0.19.0 - golang.org/x/oauth2 => golang.org/x/oauth2 v0.15.0 - golang.org/x/sync => golang.org/x/sync v0.5.0 - golang.org/x/sys => golang.org/x/sys v0.15.0 - golang.org/x/term => golang.org/x/term v0.15.0 + golang.org/x/net => golang.org/x/net v0.20.0 + golang.org/x/oauth2 => golang.org/x/oauth2 v0.16.0 + golang.org/x/sync => golang.org/x/sync v0.6.0 + golang.org/x/sys => golang.org/x/sys v0.16.0 + golang.org/x/term => golang.org/x/term v0.16.0 golang.org/x/text => golang.org/x/text v0.14.0 golang.org/x/time => golang.org/x/time v0.5.0 - golang.org/x/tools => golang.org/x/tools v0.16.0 + golang.org/x/tools => golang.org/x/tools v0.17.0 golang.org/x/xerrors => golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 gomodules.xyz/jsonpatch/v2 => gomodules.xyz/jsonpatch/v2 v2.4.0 gonum.org/v1/gonum => gonum.org/v1/gonum v0.14.0 gonum.org/v1/hdf5 => gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 gonum.org/v1/plot => gonum.org/v1/plot v0.14.0 - google.golang.org/api => google.golang.org/api v0.153.0 + google.golang.org/api => google.golang.org/api v0.161.0 google.golang.org/appengine => google.golang.org/appengine v1.6.8 - google.golang.org/genproto => google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 - google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20231211222908-989df2bf70f3 - google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20231211222908-989df2bf70f3 - google.golang.org/grpc => google.golang.org/grpc v1.60.0 + google.golang.org/genproto => google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe + google.golang.org/genproto/googleapis/api => google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe + google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe + google.golang.org/grpc => google.golang.org/grpc v1.61.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc => google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 - google.golang.org/protobuf => google.golang.org/protobuf v1.31.0 + google.golang.org/protobuf => google.golang.org/protobuf v1.32.0 gopkg.in/check.v1 => gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c gopkg.in/inconshreveable/log15.v2 => gopkg.in/inconshreveable/log15.v2 v2.16.0 gopkg.in/inf.v0 => gopkg.in/inf.v0 v0.9.1 @@ -327,19 +328,19 @@ replace ( gopkg.in/yaml.v2 => gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 => gopkg.in/yaml.v3 v3.0.1 honnef.co/go/tools => honnef.co/go/tools v0.4.6 - k8s.io/api => k8s.io/api v0.27.3 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.27.3 - k8s.io/apimachinery => k8s.io/apimachinery v0.27.3 - k8s.io/cli-runtime => k8s.io/cli-runtime v0.27.3 - k8s.io/client-go => k8s.io/client-go v0.27.3 - k8s.io/component-base => k8s.io/component-base v0.27.3 - k8s.io/klog/v2 => k8s.io/klog/v2 v2.110.1 - k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 - k8s.io/kubernetes => k8s.io/kubernetes v0.27.3 - k8s.io/metrics => k8s.io/metrics v0.27.3 + k8s.io/api => k8s.io/api v0.29.1 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.29.1 + k8s.io/apimachinery => k8s.io/apimachinery v0.29.1 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.29.1 + k8s.io/client-go => k8s.io/client-go v0.29.1 + k8s.io/component-base => k8s.io/component-base v0.29.1 + k8s.io/klog/v2 => k8s.io/klog/v2 v2.120.1 + k8s.io/kube-openapi => k8s.io/kube-openapi v0.0.0-20240126223410-2919ad4fcfec + k8s.io/kubernetes => k8s.io/kubernetes v0.29.1 + k8s.io/metrics => k8s.io/metrics v0.29.1 nhooyr.io/websocket => nhooyr.io/websocket v1.8.10 rsc.io/pdf => rsc.io/pdf v0.1.1 - sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.15.0 + sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.17.0 sigs.k8s.io/json => sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd sigs.k8s.io/kustomize => sigs.k8s.io/kustomize v2.0.3+incompatible sigs.k8s.io/structured-merge-diff/v4 => sigs.k8s.io/structured-merge-diff/v4 v4.4.1 @@ -347,10 +348,11 @@ replace ( ) require ( - buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20231115204500-e097f827e652.2 - cloud.google.com/go/storage v1.35.1 + buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.32.0-20231115204500-e097f827e652.1 + cloud.google.com/go/storage v1.36.0 code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6 - github.com/aws/aws-sdk-go v1.48.3 + github.com/akrylysov/pogreb v0.0.0-00010101000000-000000000000 + github.com/aws/aws-sdk-go v1.49.0 github.com/fsnotify/fsnotify v1.7.0 github.com/go-redis/redis/v8 v8.0.0-00010101000000-000000000000 github.com/go-sql-driver/mysql v1.7.1 @@ -358,7 +360,7 @@ require ( github.com/gocql/gocql v0.0.0-20200131111108-92af2e088537 github.com/gocraft/dbr/v2 v2.0.0-00010101000000-000000000000 github.com/google/go-cmp v0.6.0 - github.com/google/uuid v1.4.0 + github.com/google/uuid v1.5.0 github.com/gorilla/mux v0.0.0-00010101000000-000000000000 github.com/hashicorp/go-version v0.0.0-00010101000000-000000000000 github.com/klauspost/compress v1.15.9 @@ -370,76 +372,79 @@ require ( github.com/leanovate/gopter v0.0.0-00010101000000-000000000000 github.com/lucasb-eyer/go-colorful v0.0.0-00010101000000-000000000000 github.com/pierrec/lz4/v3 v3.0.0-00010101000000-000000000000 + github.com/planetscale/vtprotobuf v0.6.0 github.com/quasilyte/go-ruleguard v0.0.0-00010101000000-000000000000 github.com/quasilyte/go-ruleguard/dsl v0.3.22 github.com/scylladb/gocqlx v0.0.0-00010101000000-000000000000 github.com/stretchr/testify v1.8.4 github.com/zeebo/xxh3 v1.0.2 - go.etcd.io/bbolt v1.3.6 - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0 - go.opentelemetry.io/otel v1.19.0 + go.etcd.io/bbolt v1.3.8 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 + go.opentelemetry.io/otel v1.22.0 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.0.0-00010101000000-000000000000 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.1 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 - go.opentelemetry.io/otel/metric v1.19.0 - go.opentelemetry.io/otel/sdk v1.19.0 - go.opentelemetry.io/otel/sdk/metric v0.33.0 - go.opentelemetry.io/otel/trace v1.19.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 + go.opentelemetry.io/otel/metric v1.22.0 + go.opentelemetry.io/otel/sdk v1.22.0 + go.opentelemetry.io/otel/sdk/metric v1.22.0 + go.opentelemetry.io/otel/trace v1.22.0 go.uber.org/automaxprocs v0.0.0-00010101000000-000000000000 - go.uber.org/goleak v1.2.1 + go.uber.org/goleak v1.3.0 go.uber.org/ratelimit v0.3.0 go.uber.org/zap v1.26.0 gocloud.dev v0.0.0-00010101000000-000000000000 - golang.org/x/net v0.19.0 - golang.org/x/oauth2 v0.15.0 - golang.org/x/sync v0.5.0 - golang.org/x/sys v0.15.0 + golang.org/x/net v0.20.0 + golang.org/x/oauth2 v0.16.0 + golang.org/x/sync v0.6.0 + golang.org/x/sys v0.16.0 golang.org/x/text v0.14.0 golang.org/x/time v0.5.0 - golang.org/x/tools v0.16.0 + golang.org/x/tools v0.17.0 gonum.org/v1/hdf5 v0.0.0-00010101000000-000000000000 gonum.org/v1/plot v0.10.1 - google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f - google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f - google.golang.org/grpc v1.59.0 - google.golang.org/protobuf v1.31.0 + google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe + google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe + google.golang.org/grpc v1.61.0 + google.golang.org/protobuf v1.32.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.28.0 - k8s.io/apimachinery v0.28.0 + k8s.io/api v0.29.1 + k8s.io/apimachinery v0.29.1 k8s.io/cli-runtime v0.0.0-00010101000000-000000000000 - k8s.io/client-go v0.28.0 + k8s.io/client-go v0.29.1 k8s.io/metrics v0.0.0-00010101000000-000000000000 + k8s.io/utils v0.0.0-20240102154912-e7106e64919e sigs.k8s.io/controller-runtime v0.0.0-00010101000000-000000000000 ) require ( - cloud.google.com/go v0.110.10 // indirect + cloud.google.com/go v0.112.0 // indirect cloud.google.com/go/compute v1.23.3 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.5 // indirect git.sr.ht/~sbinet/gg v0.5.0 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver v1.5.0 // indirect github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b // indirect - github.com/akrylysov/pogreb v0.10.2 // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/campoy/embedmd v1.0.0 // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/emicklei/go-restful/v3 v3.10.1 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect + github.com/evanphx/json-patch/v5 v5.8.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-fonts/liberation v0.3.2 // indirect github.com/go-latex/latex v0.0.0-20230307184459-12ec69307ad9 // indirect - github.com/go-logr/logr v1.3.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.4 // indirect + github.com/go-openapi/swag v0.22.6 // indirect github.com/go-pdf/fpdf v0.9.0 // indirect github.com/go-toolsmith/astcopy v1.0.2 // indirect github.com/go-toolsmith/astequal v1.1.0 // indirect @@ -450,8 +455,7 @@ require ( github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.0.1 // indirect - github.com/google/gnostic v0.6.9 // indirect - github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect + github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect @@ -459,7 +463,7 @@ require ( github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect github.com/huandu/xstrings v1.4.0 // indirect github.com/imdario/mergo v0.3.6 // indirect @@ -470,52 +474,52 @@ require ( github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/moby/spdystream v0.2.0 // indirect + github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.11.1 // indirect + github.com/prometheus/client_golang v1.18.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect github.com/scylladb/go-reflectx v1.0.1 // indirect - github.com/spf13/cobra v1.6.0 // indirect + github.com/spf13/cobra v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.0 // indirect - github.com/xlab/treeprint v1.1.0 // indirect + github.com/xlab/treeprint v1.2.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.33.0 // indirect - go.opentelemetry.io/proto/otlp v0.19.0 // indirect - go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect + go.opentelemetry.io/proto/otlp v1.0.0 // indirect + go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.16.0 // indirect + golang.org/x/crypto v0.18.0 // indirect + golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b // indirect golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect - golang.org/x/image v0.14.0 // indirect + golang.org/x/image v0.15.0 // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/term v0.15.0 // indirect + golang.org/x/term v0.16.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect - google.golang.org/api v0.152.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect + google.golang.org/api v0.160.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f // indirect + google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.27.2 // indirect - k8s.io/component-base v0.27.3 // indirect - k8s.io/klog/v2 v2.90.1 // indirect - k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect - k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect + k8s.io/apiextensions-apiserver v0.29.0 // indirect + k8s.io/component-base v0.29.1 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/kustomize/api v0.13.2 // indirect - sigs.k8s.io/kustomize/kyaml v0.14.1 // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect + sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index bc9f46a40e0..48948774728 100644 --- a/go.sum +++ b/go.sum @@ -1,56 +1,56 @@ -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20231115204500-e097f827e652.2 h1:iEPA5SBtdLJNwQis/SrcCuDWJh5E1V0mVO4Ih7/mRbg= -buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.31.0-20231115204500-e097f827e652.2/go.mod h1:xafc+XIsTxTy76GJQ1TKgvJWsSugFBqMaN27WhUblew= -cloud.google.com/go v0.111.0 h1:YHLKNupSD1KqjDbQ3+LVdQ81h/UJbJyZG203cEfnQgM= -cloud.google.com/go v0.111.0/go.mod h1:0mibmpKP1TyOOFYQY5izo0LnT+ecvOQ0Sg3OdmMiNRU= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.32.0-20231115204500-e097f827e652.1 h1:u0olL4yf2p7Tl5jfsAK5keaFi+JFJuv1CDHrbiXkxkk= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.32.0-20231115204500-e097f827e652.1/go.mod h1:tiTMKD8j6Pd/D2WzREoweufjzaJKHZg35f/VGcZ2v3I= +cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= +cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= cloud.google.com/go/accessapproval v1.7.4/go.mod h1:/aTEh45LzplQgFYdQdwPMR9YdX0UlhBmvB84uAmQKUc= cloud.google.com/go/accesscontextmanager v1.8.2/go.mod h1:E6/SCRM30elQJ2PKtFMs2YhfJpZSNcJyejhuzoId4Zk= cloud.google.com/go/accesscontextmanager v1.8.4/go.mod h1:ParU+WbMpD34s5JFEnGAnPBYAgUHozaTmDJU7aCU9+M= -cloud.google.com/go/aiplatform v1.54.0/go.mod h1:pwZMGvqe0JRkI1GWSZCtnAfrR4K1bv65IHILGA//VEU= -cloud.google.com/go/analytics v0.21.6/go.mod h1:eiROFQKosh4hMaNhF85Oc9WO97Cpa7RggD40e/RBy8w= +cloud.google.com/go/aiplatform v1.58.0/go.mod h1:pwZMGvqe0JRkI1GWSZCtnAfrR4K1bv65IHILGA//VEU= +cloud.google.com/go/analytics v0.22.0/go.mod h1:eiROFQKosh4hMaNhF85Oc9WO97Cpa7RggD40e/RBy8w= cloud.google.com/go/apigateway v1.6.4/go.mod h1:0EpJlVGH5HwAN4VF4Iec8TAzGN1aQgbxAWGJsnPCGGY= cloud.google.com/go/apigeeconnect v1.6.4/go.mod h1:CapQCWZ8TCjnU0d7PobxhpOdVz/OVJ2Hr/Zcuu1xFx0= cloud.google.com/go/apigeeregistry v0.8.2/go.mod h1:h4v11TDGdeXJDJvImtgK2AFVvMIgGWjSb0HRnBSjcX8= cloud.google.com/go/appengine v1.8.4/go.mod h1:TZ24v+wXBujtkK77CXCpjZbnuTvsFNT41MUaZ28D6vg= cloud.google.com/go/area120 v0.8.4/go.mod h1:jfawXjxf29wyBXr48+W+GyX/f8fflxp642D/bb9v68M= cloud.google.com/go/artifactregistry v1.14.6/go.mod h1:np9LSFotNWHcjnOgh8UVK0RFPCTUGbO0ve3384xyHfE= -cloud.google.com/go/asset v1.15.3/go.mod h1:yYLfUD4wL4X589A9tYrv4rFrba0QlDeag0CMcM5ggXU= +cloud.google.com/go/asset v1.17.0/go.mod h1:yYLfUD4wL4X589A9tYrv4rFrba0QlDeag0CMcM5ggXU= cloud.google.com/go/assuredworkloads v1.11.4/go.mod h1:4pwwGNwy1RP0m+y12ef3Q/8PaiWrIDQ6nD2E8kvWI9U= cloud.google.com/go/automl v1.13.4/go.mod h1:ULqwX/OLZ4hBVfKQaMtxMSTlPx0GqGbWN8uA/1EqCP8= cloud.google.com/go/baremetalsolution v1.2.3/go.mod h1:/UAQ5xG3faDdy180rCUv47e0jvpp3BFxT+Cl0PFjw5g= -cloud.google.com/go/batch v1.6.3/go.mod h1:J64gD4vsNSA2O5TtDB5AAux3nJ9iV8U3ilg3JDBYejU= +cloud.google.com/go/batch v1.7.0/go.mod h1:J64gD4vsNSA2O5TtDB5AAux3nJ9iV8U3ilg3JDBYejU= cloud.google.com/go/beyondcorp v1.0.3/go.mod h1:HcBvnEd7eYr+HGDd5ZbuVmBYX019C6CEXBonXbCVwJo= -cloud.google.com/go/bigquery v1.57.1/go.mod h1:iYzC0tGVWt1jqSzBHqCr3lrRn0u13E8e+AqowBsDgug= -cloud.google.com/go/billing v1.17.4/go.mod h1:5DOYQStCxquGprqfuid/7haD7th74kyMBHkjO/OvDtk= -cloud.google.com/go/binaryauthorization v1.7.3/go.mod h1:VQ/nUGRKhrStlGr+8GMS8f6/vznYLkdK5vaKfdCIpvU= +cloud.google.com/go/bigquery v1.58.0/go.mod h1:0eh4mWNY0KrBTjUzLjoYImapGORq9gEPT7MWjCy9lik= +cloud.google.com/go/billing v1.18.0/go.mod h1:5DOYQStCxquGprqfuid/7haD7th74kyMBHkjO/OvDtk= +cloud.google.com/go/binaryauthorization v1.8.0/go.mod h1:VQ/nUGRKhrStlGr+8GMS8f6/vznYLkdK5vaKfdCIpvU= cloud.google.com/go/certificatemanager v1.7.4/go.mod h1:FHAylPe/6IIKuaRmHbjbdLhGhVQ+CWHSD5Jq0k4+cCE= -cloud.google.com/go/channel v1.17.3/go.mod h1:QcEBuZLGGrUMm7kNj9IbU1ZfmJq2apotsV83hbxX7eE= +cloud.google.com/go/channel v1.17.4/go.mod h1:QcEBuZLGGrUMm7kNj9IbU1ZfmJq2apotsV83hbxX7eE= cloud.google.com/go/cloudbuild v1.15.0/go.mod h1:eIXYWmRt3UtggLnFGx4JvXcMj4kShhVzGndL1LwleEM= cloud.google.com/go/clouddms v1.7.3/go.mod h1:fkN2HQQNUYInAU3NQ3vRLkV2iWs8lIdmBKOx4nrL6Hc= cloud.google.com/go/cloudtasks v1.12.4/go.mod h1:BEPu0Gtt2dU6FxZHNqqNdGqIG86qyWKBPGnsb7udGY0= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= +cloud.google.com/go/compute v1.23.4 h1:EBT9Nw4q3zyE7G45Wvv3MzolIrCJEuHys5muLY0wvAw= +cloud.google.com/go/compute v1.23.4/go.mod h1:/EJMj55asU6kAFnuZET8zqgwgJ9FvXWXOkkfQZa4ioI= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/contactcenterinsights v1.12.0/go.mod h1:HHX5wrz5LHVAwfI2smIotQG9x8Qd6gYilaHcLLLmNis= -cloud.google.com/go/container v1.28.0/go.mod h1:b1A1gJeTBXVLQ6GGw9/9M4FG94BEGsqJ5+t4d/3N7O4= +cloud.google.com/go/contactcenterinsights v1.12.1/go.mod h1:HHX5wrz5LHVAwfI2smIotQG9x8Qd6gYilaHcLLLmNis= +cloud.google.com/go/container v1.29.0/go.mod h1:b1A1gJeTBXVLQ6GGw9/9M4FG94BEGsqJ5+t4d/3N7O4= cloud.google.com/go/containeranalysis v0.11.3/go.mod h1:kMeST7yWFQMGjiG9K7Eov+fPNQcGhb8mXj/UcTiWw9U= -cloud.google.com/go/datacatalog v1.18.1/go.mod h1:TzAWaz+ON1tkNr4MOcak8EBHX7wIRX/gZKM+yTVsv+A= cloud.google.com/go/datacatalog v1.19.0/go.mod h1:5FR6ZIF8RZrtml0VUao22FxhdjkoG+a0866rEnObryM= +cloud.google.com/go/datacatalog v1.19.2/go.mod h1:2YbODwmhpLM4lOFe3PuEhHK9EyTzQJ5AXgIy7EDKTEE= cloud.google.com/go/dataflow v0.9.4/go.mod h1:4G8vAkHYCSzU8b/kmsoR2lWyHJD85oMJPHMtan40K8w= cloud.google.com/go/dataform v0.9.1/go.mod h1:pWTg+zGQ7i16pyn0bS1ruqIE91SdL2FDMvEYu/8oQxs= cloud.google.com/go/datafusion v1.7.4/go.mod h1:BBs78WTOLYkT4GVZIXQCZT3GFpkpDN4aBY4NDX/jVlM= cloud.google.com/go/datalabeling v0.8.4/go.mod h1:Z1z3E6LHtffBGrNUkKwbwbDxTiXEApLzIgmymj8A3S8= -cloud.google.com/go/dataplex v1.11.2/go.mod h1:mHJYQQ2VEJHsyoC0OdNyy988DvEbPhqFs5OOLffLX0c= +cloud.google.com/go/dataplex v1.14.0/go.mod h1:mHJYQQ2VEJHsyoC0OdNyy988DvEbPhqFs5OOLffLX0c= cloud.google.com/go/dataproc v1.12.0/go.mod h1:zrF3aX0uV3ikkMz6z4uBbIKyhRITnxvr4i3IjKsKrw4= cloud.google.com/go/dataproc/v2 v2.3.0/go.mod h1:G5R6GBc9r36SXv/RtZIVfB8SipI+xVn0bX5SxUzVYbY= cloud.google.com/go/dataqna v0.8.4/go.mod h1:mySRKjKg5Lz784P6sCov3p1QD+RZQONRMRjzGNcFd0c= cloud.google.com/go/datastore v1.15.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= cloud.google.com/go/datastream v1.10.3/go.mod h1:YR0USzgjhqA/Id0Ycu1VvZe8hEWwrkjuXrGbzeDOSEA= -cloud.google.com/go/deploy v1.15.0/go.mod h1:e5XOUI5D+YGldyLNZ21wbp9S8otJbBE4i88PtO9x/2g= -cloud.google.com/go/dialogflow v1.44.3/go.mod h1:mHly4vU7cPXVweuB5R0zsYKPMzy240aQdAu06SqBbAQ= +cloud.google.com/go/deploy v1.17.0/go.mod h1:XBr42U5jIr64t92gcpOXxNrqL2PStQCXHuKK5GRUuYo= +cloud.google.com/go/dialogflow v1.48.1/go.mod h1:C1sjs2/g9cEwjCltkKeYp3FFpz8BOzNondEaAlCpt+A= cloud.google.com/go/dlp v1.11.1/go.mod h1:/PA2EnioBeXTL/0hInwgj0rfsQb3lpE3R8XUJxqUNKI= -cloud.google.com/go/documentai v1.23.5/go.mod h1:ghzBsyVTiVdkfKaUCum/9bGBEyBjDO4GfooEcYKhN+g= +cloud.google.com/go/documentai v1.23.7/go.mod h1:ghzBsyVTiVdkfKaUCum/9bGBEyBjDO4GfooEcYKhN+g= cloud.google.com/go/domains v0.9.4/go.mod h1:27jmJGShuXYdUNjyDG0SodTfT5RwLi7xmH334Gvi3fY= cloud.google.com/go/edgecontainer v1.1.4/go.mod h1:AvFdVuZuVGdgaE5YvlL1faAoa1ndRR/5XhXZvPBHbsE= cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= @@ -62,18 +62,18 @@ cloud.google.com/go/functions v1.15.4/go.mod h1:CAsTc3VlRMVvx+XqXxKqVevguqJpnVip cloud.google.com/go/gkebackup v1.3.4/go.mod h1:gLVlbM8h/nHIs09ns1qx3q3eaXcGSELgNu1DWXYz1HI= cloud.google.com/go/gkeconnect v0.8.4/go.mod h1:84hZz4UMlDCKl8ifVW8layK4WHlMAFeq8vbzjU0yJkw= cloud.google.com/go/gkehub v0.14.4/go.mod h1:Xispfu2MqnnFt8rV/2/3o73SK1snL8s9dYJ9G2oQMfc= -cloud.google.com/go/gkemulticloud v1.0.3/go.mod h1:7NpJBN94U6DY1xHIbsDqB2+TFZUfjLUKLjUX8NGLor0= +cloud.google.com/go/gkemulticloud v1.1.0/go.mod h1:7NpJBN94U6DY1xHIbsDqB2+TFZUfjLUKLjUX8NGLor0= cloud.google.com/go/grafeas v0.3.0/go.mod h1:P7hgN24EyONOTMyeJH6DxG4zD7fwiYa5Q6GUgyFSOU8= cloud.google.com/go/gsuiteaddons v1.6.4/go.mod h1:rxtstw7Fx22uLOXBpsvb9DUbC+fiXs7rF4U29KHM/pE= -cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= -cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= cloud.google.com/go/iap v1.9.3/go.mod h1:DTdutSZBqkkOm2HEOTBzhZxh2mwwxshfD/h3yofAiCw= cloud.google.com/go/ids v1.4.4/go.mod h1:z+WUc2eEl6S/1aZWzwtVNWoSZslgzPxAboS0lZX0HjI= cloud.google.com/go/iot v1.7.4/go.mod h1:3TWqDVvsddYBG++nHSZmluoCAVGr1hAcabbWZNKEZLk= -cloud.google.com/go/kms v1.15.5/go.mod h1:cU2H5jnp6G2TDpUGZyqTCoy1n16fbubHZjmVXSMtwDI= +cloud.google.com/go/kms v1.15.6/go.mod h1:yF75jttnIdHfGBoE51AKsD/Yqf+/jICzB9v1s1acsms= cloud.google.com/go/language v1.12.2/go.mod h1:9idWapzr/JKXBBQ4lWqVX/hcadxB194ry20m/bTrhWc= cloud.google.com/go/lifesciences v0.9.4/go.mod h1:bhm64duKhMi7s9jR9WYJYvjAFJwRqNj+Nia7hF0Z7JA= -cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= +cloud.google.com/go/logging v1.9.0/go.mod h1:1Io0vnZv4onoUnsVUQY3HZ3Igb1nBchky0A0y7BBBhE= cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= cloud.google.com/go/longrunning v0.5.0/go.mod h1:0JNuqRShmscVAhIACGtskSAWtqtOoPkwP0YF1oVEchc= @@ -81,11 +81,11 @@ cloud.google.com/go/longrunning v0.5.1/go.mod h1:spvimkwdz6SPWKEt/XBij79E9fiTkHS cloud.google.com/go/longrunning v0.5.2/go.mod h1:nqo6DQbNV2pXhGDbDMoN2bWz68MjZUzqv2YttZiveCs= cloud.google.com/go/longrunning v0.5.4/go.mod h1:zqNVncI0BOP8ST6XQD1+VcvuShMmq7+xFSzOL++V0dI= cloud.google.com/go/managedidentities v1.6.4/go.mod h1:WgyaECfHmF00t/1Uk8Oun3CQ2PGUtjc3e9Alh79wyiM= -cloud.google.com/go/maps v1.6.1/go.mod h1:4+buOHhYXFBp58Zj/K+Lc1rCmJssxxF4pJ5CJnhdz18= +cloud.google.com/go/maps v1.6.3/go.mod h1:VGAn809ADswi1ASofL5lveOHPnE6Rk/SFTTBx1yuOLw= cloud.google.com/go/mediatranslation v0.8.4/go.mod h1:9WstgtNVAdN53m6TQa5GjIjLqKQPXe74hwSCxUP6nj4= cloud.google.com/go/memcache v1.10.4/go.mod h1:v/d8PuC8d1gD6Yn5+I3INzLR01IDn0N4Ym56RgikSI0= cloud.google.com/go/metastore v1.13.3/go.mod h1:K+wdjXdtkdk7AQg4+sXS8bRrQa9gcOr+foOMF2tqINE= -cloud.google.com/go/monitoring v1.16.3/go.mod h1:KwSsX5+8PnXv5NJnICZzW2R8pWTis8ypC4zmdRD63Tw= +cloud.google.com/go/monitoring v1.17.1/go.mod h1:SJzPMakCF0GHOuKEH/r4hxVKF04zl+cRPQyc3d/fqII= cloud.google.com/go/networkconnectivity v1.14.3/go.mod h1:4aoeFdrJpYEXNvrnfyD5kIzs8YtHg945Og4koAjHQek= cloud.google.com/go/networkmanagement v1.9.3/go.mod h1:y7WMO1bRLaP5h3Obm4tey+NquUvB93Co1oh4wpL+XcU= cloud.google.com/go/networksecurity v0.9.4/go.mod h1:E9CeMZ2zDsNBkr8axKSYm8XyTqNhiCHf1JO/Vb8mD1w= @@ -93,39 +93,39 @@ cloud.google.com/go/notebooks v1.11.2/go.mod h1:z0tlHI/lREXC8BS2mIsUeR3agM1AkgLi cloud.google.com/go/optimization v1.6.2/go.mod h1:mWNZ7B9/EyMCcwNl1frUGEuY6CPijSkz88Fz2vwKPOY= cloud.google.com/go/orchestration v1.8.4/go.mod h1:d0lywZSVYtIoSZXb0iFjv9SaL13PGyVOKDxqGxEf/qI= cloud.google.com/go/orgpolicy v1.11.2/go.mod h1:biRDpNwfyytYnmCRWZWxrKF22Nkz9eNVj9zyaBdpm1o= -cloud.google.com/go/orgpolicy v1.11.4/go.mod h1:0+aNV/nrfoTQ4Mytv+Aw+stBDBjNf4d8fYRA9herfJI= +cloud.google.com/go/orgpolicy v1.12.0/go.mod h1:0+aNV/nrfoTQ4Mytv+Aw+stBDBjNf4d8fYRA9herfJI= cloud.google.com/go/osconfig v1.12.2/go.mod h1:eh9GPaMZpI6mEJEuhEjUJmaxvQ3gav+fFEJon1Y8Iw0= cloud.google.com/go/osconfig v1.12.4/go.mod h1:B1qEwJ/jzqSRslvdOCI8Kdnp0gSng0xW4LOnIebQomA= -cloud.google.com/go/oslogin v1.12.2/go.mod h1:CQ3V8Jvw4Qo4WRhNPF0o+HAM4DiLuE27Ul9CX9g2QdY= +cloud.google.com/go/oslogin v1.13.0/go.mod h1:xPJqLwpTZ90LSE5IL1/svko+6c5avZLluiyylMb/sRA= cloud.google.com/go/phishingprotection v0.8.4/go.mod h1:6b3kNPAc2AQ6jZfFHioZKg9MQNybDg4ixFd4RPZZ2nE= cloud.google.com/go/policytroubleshooter v1.10.2/go.mod h1:m4uF3f6LseVEnMV6nknlN2vYGRb+75ylQwJdnOXfnv0= cloud.google.com/go/privatecatalog v0.9.4/go.mod h1:SOjm93f+5hp/U3PqMZAHTtBtluqLygrDrVO8X8tYtG0= -cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= +cloud.google.com/go/pubsub v1.36.1/go.mod h1:iYjCa9EzWOoBiTdd4ps7QoMtMln5NwaZQpK1hbRfBDE= cloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0= -cloud.google.com/go/recaptchaenterprise/v2 v2.8.4/go.mod h1:Dak54rw6lC2gBY8FBznpOCAR58wKf+R+ZSJRoeJok4w= +cloud.google.com/go/recaptchaenterprise/v2 v2.9.0/go.mod h1:Dak54rw6lC2gBY8FBznpOCAR58wKf+R+ZSJRoeJok4w= cloud.google.com/go/recommendationengine v0.8.4/go.mod h1:GEteCf1PATl5v5ZsQ60sTClUE0phbWmo3rQ1Js8louU= -cloud.google.com/go/recommender v1.11.3/go.mod h1:+FJosKKJSId1MBFeJ/TTyoGQZiEelQQIZMKYYD8ruK4= +cloud.google.com/go/recommender v1.12.0/go.mod h1:+FJosKKJSId1MBFeJ/TTyoGQZiEelQQIZMKYYD8ruK4= cloud.google.com/go/redis v1.14.1/go.mod h1:MbmBxN8bEnQI4doZPC1BzADU4HGocHBk2de3SbgOkqs= cloud.google.com/go/resourcemanager v1.9.4/go.mod h1:N1dhP9RFvo3lUfwtfLWVxfUWq8+KUQ+XLlHLH3BoFJ0= cloud.google.com/go/resourcesettings v1.6.4/go.mod h1:pYTTkWdv2lmQcjsthbZLNBP4QW140cs7wqA3DuqErVI= cloud.google.com/go/retail v1.14.4/go.mod h1:l/N7cMtY78yRnJqp5JW8emy7MB1nz8E4t2yfOmklYfg= cloud.google.com/go/run v1.3.3/go.mod h1:WSM5pGyJ7cfYyYbONVQBN4buz42zFqwG67Q3ch07iK4= cloud.google.com/go/scheduler v1.10.5/go.mod h1:MTuXcrJC9tqOHhixdbHDFSIuh7xZF2IysiINDuiq6NI= -cloud.google.com/go/secretmanager v1.11.4/go.mod h1:wreJlbS9Zdq21lMzWmJ0XhWW2ZxgPeahsqeV/vZoJ3w= +cloud.google.com/go/secretmanager v1.11.5/go.mod h1:eAGv+DaCHkeVyQi0BeXgAHOU0RdrMeZIASKc+S7VqH4= cloud.google.com/go/security v1.15.4/go.mod h1:oN7C2uIZKhxCLiAAijKUCuHLZbIt/ghYEo8MqwD/Ty4= -cloud.google.com/go/securitycenter v1.24.2/go.mod h1:l1XejOngggzqwr4Fa2Cn+iWZGf+aBLTXtB/vXjy5vXM= +cloud.google.com/go/securitycenter v1.24.3/go.mod h1:l1XejOngggzqwr4Fa2Cn+iWZGf+aBLTXtB/vXjy5vXM= cloud.google.com/go/servicedirectory v1.11.3/go.mod h1:LV+cHkomRLr67YoQy3Xq2tUXBGOs5z5bPofdq7qtiAw= cloud.google.com/go/shell v1.7.4/go.mod h1:yLeXB8eKLxw0dpEmXQ/FjriYrBijNsONpwnWsdPqlKM= -cloud.google.com/go/spanner v1.53.0/go.mod h1:liG4iCeLqm5L3fFLU5whFITqP0e0orsAW1uUSrd4rws= +cloud.google.com/go/spanner v1.55.0/go.mod h1:HXEznMUVhC+PC+HDyo9YFG2Ajj5BQDkcbqB9Z2Ffxi0= cloud.google.com/go/speech v1.21.0/go.mod h1:wwolycgONvfz2EDU8rKuHRW3+wc9ILPsAWoikBEWavY= -cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w= -cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= +cloud.google.com/go/storage v1.37.0 h1:WI8CsaFO8Q9KjPVtsZ5Cmi0dXV25zMoX0FklT7c3Jm4= +cloud.google.com/go/storage v1.37.0/go.mod h1:i34TiT2IhiNDmcj65PqwCjcoUX7Z5pLzS8DEmoiFq1k= cloud.google.com/go/storagetransfer v1.10.3/go.mod h1:Up8LY2p6X68SZ+WToswpQbQHnJpOty/ACcMafuey8gc= cloud.google.com/go/talent v1.6.5/go.mod h1:Mf5cma696HmE+P2BWJ/ZwYqeJXEeU0UqjHFXVLadEDI= cloud.google.com/go/texttospeech v1.7.4/go.mod h1:vgv0002WvR4liGuSd5BJbWy4nDn5Ozco0uJymY5+U74= cloud.google.com/go/tpu v1.6.4/go.mod h1:NAm9q3Rq2wIlGnOhpYICNI7+bpBebMJbh0yyp3aNw1Y= -cloud.google.com/go/trace v1.10.4/go.mod h1:Nso99EDIK8Mj5/zmB+iGr9dosS/bzWCJ8wGmE6TXNWY= -cloud.google.com/go/translate v1.9.3/go.mod h1:Kbq9RggWsbqZ9W5YpM94Q1Xv4dshw/gr/SHfsl5yCZ0= +cloud.google.com/go/trace v1.10.5/go.mod h1:9hjCV1nGBCtXbAE4YK7OqJ8pmPYSxPA0I67JwRd5s3M= +cloud.google.com/go/translate v1.10.0/go.mod h1:Kbq9RggWsbqZ9W5YpM94Q1Xv4dshw/gr/SHfsl5yCZ0= cloud.google.com/go/video v1.20.3/go.mod h1:TnH/mNZKVHeNtpamsSPygSR0iHtvrR/cW1/GDjN5+GU= cloud.google.com/go/videointelligence v1.11.4/go.mod h1:kPBMAYsTPFiQxMLmmjpcZUMklJp3nC9+ipJJtprccD8= cloud.google.com/go/vision/v2 v2.7.5/go.mod h1:GcviprJLFfK9OLf0z8Gm6lQb6ZFUulvpZws+mm6yPLM= @@ -155,9 +155,11 @@ git.sr.ht/~sbinet/cmpimg v0.1.0/go.mod h1:FU12psLbF4TfNXkKH2ZZQ29crIqoiqTZmeQ7dk git.sr.ht/~sbinet/gg v0.5.0 h1:6V43j30HM623V329xA9Ntq+WJrMjDxRjuAB1LFWF5m8= git.sr.ht/~sbinet/gg v0.5.0/go.mod h1:G2C0eRESqlKhS7ErsNey6HHrqU1PwsnCQlekFi9Q2Oo= git.wow.st/gmp/jni v0.0.0-20210610011705-34026c7e22d0/go.mod h1:+axXBRUTIDlCeE73IKeD/os7LoEnTKdkp8/gQOFjqyo= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/DATA-DOG/go-sqlmock v1.5.1 h1:FK6RCIUSfmbnI/imIICmboyQBkOckutaa6R5YYlLZyo= -github.com/DATA-DOG/go-sqlmock v1.5.1/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= +github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= +github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/Kodeworks/golang-image-ico v0.0.0-20141118225523-73f0f4cfade9/go.mod h1:7uhhqiBaR4CpN0k9rMjOtjpcfGd6DG2m04zQxKnWQ0I= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= @@ -177,48 +179,48 @@ github.com/akrylysov/pogreb v0.10.2/go.mod h1:pNs6QmpQ1UlTJKDezuRWmaqkgUE2TuU0YT github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/stroke v0.0.0-20221221101821-bd29b49d73f0/go.mod h1:ccdDYaY5+gO+cbnQdFxEXqfy0RkoV25H3jLXUDNM3wg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg= +github.com/apache/arrow/go/v12 v12.0.1/go.mod h1:weuTY7JvTG/HDPtMQxEUp7pU73vkLWMLpY67QwZ/WWw= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aws/aws-sdk-go v1.49.0 h1:g9BkW1fo9GqKfwg2+zCD+TW/D36Ux+vtfJ8guF4AYmY= -github.com/aws/aws-sdk-go v1.49.0/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= -github.com/aws/aws-sdk-go-v2 v1.24.0 h1:890+mqQ+hTpNuw0gGP6/4akolQkSToDJgHfQE7AwGuk= -github.com/aws/aws-sdk-go-v2 v1.24.0/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4= +github.com/aws/aws-sdk-go v1.50.7 h1:odKb+uneeGgF2jgAerKjFzpljiyZxleV4SHB7oBK+YA= +github.com/aws/aws-sdk-go v1.50.7/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go-v2 v1.24.1 h1:xAojnj+ktS95YZlDf0zxWBkbFtymPeDP+rvUQIH3uAU= +github.com/aws/aws-sdk-go-v2 v1.24.1/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 h1:OCs21ST2LrepDfD3lwlQiOqIGp6JiEUqG84GzTDoyJs= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4/go.mod h1:usURWEKSNNAcAZuzRn/9ZYPT8aZQkR7xcCtunK/LkJo= -github.com/aws/aws-sdk-go-v2/config v1.26.1 h1:z6DqMxclFGL3Zfo+4Q0rLnAZ6yVkzCRxhRMsiRQnD1o= -github.com/aws/aws-sdk-go-v2/config v1.26.1/go.mod h1:ZB+CuKHRbb5v5F0oJtGdhFTelmrxd4iWO1lf0rQwSAg= -github.com/aws/aws-sdk-go-v2/credentials v1.16.12 h1:v/WgB8NxprNvr5inKIiVVrXPuuTegM+K8nncFkr1usU= -github.com/aws/aws-sdk-go-v2/credentials v1.16.12/go.mod h1:X21k0FjEJe+/pauud82HYiQbEr9jRKY3kXEIQ4hXeTQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10 h1:w98BT5w+ao1/r5sUuiH6JkVzjowOKeOJRHERyy1vh58= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10/go.mod h1:K2WGI7vUvkIv1HoNbfBA1bvIZ+9kL3YVmWxeKuLQsiw= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7 h1:FnLf60PtjXp8ZOzQfhJVsqF0OtYKQZWQfqOLshh8YXg= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7/go.mod h1:tDVvl8hyU6E9B8TrnNrZQEVkQlB8hjJwcgpPhgtlnNg= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9 h1:v+HbZaCGmOwnTTVS86Fleq0vPzOd7tnJGbFhP0stNLs= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9/go.mod h1:Xjqy+Nyj7VDLBtCMkQYOw1QYfAEZCVLrfI0ezve8wd4= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9 h1:N94sVhRACtXyVcjXxrwK1SKFIJrA9pOJ5yu2eSHnmls= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9/go.mod h1:hqamLz7g1/4EJP+GH5NBhcUMLjW+gKLQabgyz6/7WAU= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 h1:GrSw8s0Gs/5zZ0SX+gX4zQjRnRsMJDJ2sLur1gRBhEM= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4 h1:40Q4X5ebZruRtknEZH/bg91sT5pR853F7/1X9QRbI54= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4/go.mod h1:u77N7eEECzUv7F0xl2gcfK/vzc8wcjWobpy+DcrLJ5E= +github.com/aws/aws-sdk-go-v2/config v1.26.6 h1:Z/7w9bUqlRI0FFQpetVuFYEsjzE3h7fpU6HuGmfPL/o= +github.com/aws/aws-sdk-go-v2/config v1.26.6/go.mod h1:uKU6cnDmYCvJ+pxO9S4cWDb2yWWIH5hra+32hVh1MI4= +github.com/aws/aws-sdk-go-v2/credentials v1.16.16 h1:8q6Rliyv0aUFAVtzaldUEcS+T5gbadPbWdV1WcAddK8= +github.com/aws/aws-sdk-go-v2/credentials v1.16.16/go.mod h1:UHVZrdUsv63hPXFo1H7c5fEneoVo9UXiz36QG1GEPi0= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11 h1:c5I5iH+DZcH3xOIMlz3/tCKJDaHFwYEmxvlh2fAcFo8= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.11/go.mod h1:cRrYDYAMUohBJUtUnOhydaMHtiK/1NZ0Otc9lIb6O0Y= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.15 h1:2MUXyGW6dVaQz6aqycpbdLIH1NMcUI6kW6vQ0RabGYg= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.15/go.mod h1:aHbhbR6WEQgHAiRj41EQ2W47yOYwNtIkWTXmcAtYqj8= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10 h1:vF+Zgd9s+H4vOXd5BMaPWykta2a6Ih0AKLq/X6NYKn4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.10/go.mod h1:6BkRjejp/GR4411UGqkX8+wFMbFbqsUIimfK4XjOKR4= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10 h1:nYPe006ktcqUji8S2mqXf9c/7NdiKriOwMvWQHgYztw= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.10/go.mod h1:6UV4SZkVvmODfXKql4LCbaZUpF7HO2BX38FgBf9ZOLw= +github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3 h1:n3GDfwqF2tzEkXlv5cuy4iy7LpKDtqDMcNLfZDu9rls= +github.com/aws/aws-sdk-go-v2/internal/ini v1.7.3/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9 h1:ugD6qzjYtB7zM5PN/ZIeaAIyefPaD82G8+SJopgvUpw= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9/go.mod h1:YD0aYBWCrPENpHolhKw2XDlTIWae2GKXT1T4o6N6hiM= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 h1:/b31bi3YVNlkzkBrm9LfpaKoaYZUxIAj4sHfOTmLfqw= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4/go.mod h1:2aGXHFmbInwgP9ZfpmdIfOELL79zhdNYNmReK8qDfdQ= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9 h1:/90OR2XbSYfXucBMJ4U14wrjlfleq/0SB6dZDPncgmo= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9/go.mod h1:dN/Of9/fNZet7UrQQ6kTDo/VSwKPIq94vjlU16bRARc= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9 h1:Nf2sHxjMJR8CSImIVCONRi4g0Su3J+TSTbS7G0pUeMU= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9/go.mod h1:idky4TER38YIjr2cADF1/ugFMKvZV7p//pVeV5LZbF0= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9 h1:iEAeF6YC3l4FzlJPP9H3Ko1TXpdjdqWffxXjp8SY6uk= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9/go.mod h1:kjsXoK23q9Z/tLBrckZLLyvjhZoS+AGrzqzUfEClvMM= -github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5 h1:Keso8lIOS+IzI2MkPZyK6G0LYcK3My2LQ+T5bxghEAY= -github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5/go.mod h1:vADO6Jn+Rq4nDtfwNjhgR84qkZwiC6FqCaXdw/kYwjA= -github.com/aws/aws-sdk-go-v2/service/sso v1.18.5 h1:ldSFWz9tEHAwHNmjx2Cvy1MjP5/L9kNoR0skc6wyOOM= -github.com/aws/aws-sdk-go-v2/service/sso v1.18.5/go.mod h1:CaFfXLYL376jgbP7VKC96uFcU8Rlavak0UlAwk1Dlhc= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 h1:cbRqFTVnJV+KRpwFl76GJdIZJKKCdTPnjUZ7uWh3pIU= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1/go.mod h1:hHL974p5auvXlZPIjJTblXJpbkfK4klBczlsEaMCGVY= -github.com/aws/aws-sdk-go-v2/service/sts v1.26.5 h1:5UYvv8JUvllZsRnfrcMQ+hJ9jNICmcgKPAO1CER25Wg= -github.com/aws/aws-sdk-go-v2/service/sts v1.26.5/go.mod h1:XX5gh4CB7wAs4KhcF46G6C8a2i7eupU19dcAAE+EydU= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10 h1:L0ai8WICYHozIKK+OtPzVJBugL7culcuM4E4JOpIEm8= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.10/go.mod h1:byqfyxJBshFk0fF9YmK0M0ugIO8OWjzH2T3bPG4eGuA= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10 h1:DBYTXwIGQSGs9w4jKm60F5dmCQ3EEruxdc0MFh+3EY4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.10/go.mod h1:wohMUQiFdzo0NtxbBg0mSRGZ4vL3n0dKjLTINdcIino= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10 h1:KOxnQeWy5sXyS37fdKEvAsGHOr9fa/qvwxfJurR/BzE= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.10/go.mod h1:jMx5INQFYFYB3lQD9W0D8Ohgq6Wnl7NYOJ2TQndbulI= +github.com/aws/aws-sdk-go-v2/service/s3 v1.48.1 h1:5XNlsBsEvBZBMO6p82y+sqpWg8j5aBCe+5C2GBFgqBQ= +github.com/aws/aws-sdk-go-v2/service/s3 v1.48.1/go.mod h1:4qXHrG1Ne3VGIMZPCB8OjH/pLFO94sKABIusjh0KWPU= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.7 h1:eajuO3nykDPdYicLlP3AGgOyVN3MOlFmZv7WGTuJPow= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.7/go.mod h1:+mJNDdF+qiUlNKNC3fxn74WWNN+sOiGOEImje+3ScPM= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5 h1:2k9KmFawS63euAkY4/ixVNsYYwrwnd5fIvgEKkfZFNM= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5/go.mod h1:W+nd4wWDVkSUIox9bacmkBP5NMFQeTJ/xqNabpzSR38= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.7 h1:NzO4Vrau795RkUdSHKEwiR01FaGzGOH1EETJ+5QHnm0= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.7/go.mod h1:6h2YuIoxaMSCFf5fi1EgZAwdfkGMgDY+DVfa61uLe4U= github.com/aws/smithy-go v1.19.0 h1:KWFKQV80DpP3vJrrA9sVAHQ5gc2z8i4EzrLhLlWXcBM= github.com/aws/smithy-go v1.19.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= @@ -228,11 +230,11 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/campoy/embedmd v1.0.0 h1:V4kI2qTJJLf4J29RzI/MAt2c3Bl4dQSYPuflzwFH2hY= github.com/campoy/embedmd v1.0.0/go.mod h1:oxyr9RCiSXg0M3VJ3ks0UGfp98BpSSGr0kpiX3MzVl8= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -246,6 +248,7 @@ github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XP github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.21 h1:1/QdRyBaHHJP61QkWMXlOIBfsgdDeeKfK8SYVUWJKf0= github.com/creack/pty v1.1.21/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -256,17 +259,19 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cu github.com/disintegration/gift v1.2.1/go.mod h1:Jh2i7f7Q2BM7Ezno3PhfezbR1xpUg9dUg3/RlKGr4HI= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/emicklei/go-restful/v3 v3.11.2 h1:1onLa9DcsMYO9P+CXaL0dStDqQ2EHHXLiz+BtnqkLAU= +github.com/emicklei/go-restful/v3 v3.11.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/go-control-plane v0.12.0 h1:4X+VP1GHd1Mhj6IB5mMeGbLCleqxjletLK6K0rbxyZI= +github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= +github.com/envoyproxy/protoc-gen-validate v1.0.4 h1:gVPz/FMfvh57HdSJQyvBtF00j8JU4zdyUgIUNhlgg0A= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/esiqveland/notify v0.11.0/go.mod h1:63UbVSaeJwF0LVJARHFuPgUAoM7o1BEvCZyknsuonBc= github.com/evanphx/json-patch v0.5.2 h1:xVCHIVMUu1wtM/VkR9jVZ45N3FhZfYMMYGorLCR8P3k= github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= -github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= +github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= +github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fogleman/gg v1.3.0/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= @@ -287,22 +292,22 @@ github.com/go-fonts/liberation v0.3.2 h1:XuwG0vGHFBPRRI8Qwbi5tIvR3cku9LUfZGq/Ar1 github.com/go-fonts/liberation v0.3.2/go.mod h1:N0QsDLVUQPy3UYg9XAc3Uh3UDMp2Z7M1o4+X98dXkmI= github.com/go-fonts/stix v0.2.2/go.mod h1:SUxggC9dxd/Q+rb5PkJuvfvTbOPtNc2Qaua00fIp9iU= github.com/go-gl/gl v0.0.0-20231021071112-07e5d0ea2e71/go.mod h1:9YTyiznxEY1fVinfM7RvRcjRHbw2xLBJ3AAGIT0I4Nw= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20231124074035-2de0cf0c80af/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240118000515-a250818d05e3/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-latex/latex v0.0.0-20231108140139-5c1ce85aa4ea h1:DfZQkvEbdmOe+JK2TMtBM+0I9GSdzE2y/L1/AmD8xKc= github.com/go-latex/latex v0.0.0-20231108140139-5c1ce85aa4ea/go.mod h1:Y7Vld91/HRbTBm7JwoI7HejdDB0u+e9AUBO9MB7yuZk= -github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= +github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= +github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= +github.com/go-openapi/swag v0.22.9 h1:XX2DssF+mQKM2DHsbgZK74y/zj4mo9I99+89xUmuZCE= +github.com/go-openapi/swag v0.22.9/go.mod h1:3/OXnFfnMAwBD099SwYRk7GD3xOrr1iL7d/XNLXVVwE= github.com/go-pdf/fpdf v1.4.3 h1:0ZbUVyy3URshI6fCIaCD/iTVW33dqA8zbUHuGynxAPA= github.com/go-pdf/fpdf v1.4.3/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= @@ -317,13 +322,13 @@ github.com/go-text/typesetting-utils v0.0.0-20230326210548-458646692de6/go.mod h github.com/go-text/typesetting-utils v0.0.0-20230616150549-2a7df14b6a22/go.mod h1:DDxDdQEnB70R8owOx3LVpEFvpMK9eeH1o2r0yZhFI9o= github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= -github.com/go-toolsmith/astequal v1.1.0 h1:kHKm1AWqClYn15R0K1KKE4RG614D46n+nqUQ06E1dTw= -github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= +github.com/go-toolsmith/astequal v1.2.0 h1:3Fs3CYZ1k9Vo4FzFhwwewC3CHISHDnVUPC4x0bI2+Cw= +github.com/go-toolsmith/astequal v1.2.0/go.mod h1:c8NZ3+kSFtFY/8lPso4v8LuJjdJiUFVnSuU3s0qrrDY= github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.3.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY= +github.com/gobwas/ws v1.3.2/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY= github.com/goccmack/gocc v0.0.0-20230228185258-2292f9e40198/go.mod h1:DTh/Y2+NbnOVVoypCCQrovMPDKUGp4yZpSbWg5D0XIM= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= @@ -353,10 +358,8 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= -github.com/google/gnostic v0.7.0 h1:d7EpuFp8vVdML+y0JJJYiKeOLjKTdH/GvVkLOBWqJpw= -github.com/google/gnostic v0.7.0/go.mod h1:IAcUyMl6vtC95f60EZ8oXyqTsOersP6HbwjeG7EyDPM= -github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 h1:0VpGH+cDhbDtdcweoyCVsF3fhN8kejK6rFe/2FFX2nU= -github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49/go.mod h1:BkkQ4L1KS1xMt2aWSPStnn55ChGC0DPOn2FQYj+f25M= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= @@ -368,8 +371,8 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20231212022811-ec68065c825e h1:bwOy7hAFd0C91URzMIEBfr6BAz29yk7Qj0cy6S7DJlU= -github.com/google/pprof v0.0.0-20231212022811-ec68065c825e/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= +github.com/google/pprof v0.0.0-20240130152714-0ed6a68c8d9e h1:E+3PBMCXn0ma79O7iCrne0iUpKtZ7rIcZvoz+jNtNtw= +github.com/google/pprof v0.0.0-20240130152714-0ed6a68c8d9e/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= github.com/google/s2a-go v0.1.0/go.mod h1:OJpEgntRZo8ugHpF9hkoLJbS5dSI20XZeXJ9JVywLlM= github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= @@ -377,8 +380,8 @@ github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8= github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= @@ -399,14 +402,14 @@ github.com/goxjs/gl v0.0.0-20210104184919-e3fafc6f8f2a/go.mod h1:dy/f2gjY09hwVfI github.com/goxjs/glfw v0.0.0-20191126052801-d2efb5f20838/go.mod h1:oS8P8gVOT4ywTcjV6wZlOU4GuVFQ8F5328KY3MJ79CY= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 h1:6UKoz5ujsI55KNpsJH3UwCq3T8kKbZwNZBNPuTTje8U= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1/go.mod h1:YvJ2f6MplWDhfxiUC3KpyTy76kYUZA4W3pTv/wdKQ9Y= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/ianlancetaylor/demangle v0.0.0-20231023195312-e2daf7ba7156/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= +github.com/ianlancetaylor/demangle v0.0.0-20240123011522-1fd6b93ad1eb/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= @@ -433,8 +436,8 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:C github.com/kisielk/errcheck v1.6.3/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= -github.com/klauspost/compress v1.17.5-0.20231209164634-6bf960e5bd5d h1:UbHXx+E5gnUabmdPHcMr/JqJsf6zb1NLThctXovfPNQ= -github.com/klauspost/compress v1.17.5-0.20231209164634-6bf960e5bd5d/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.17.6-0.20240126152145-9b0f130f2599 h1:1ziPfONVdYn+wriWciJHTejdIbc+upTFJHkZgRiKPZg= +github.com/klauspost/compress v1.17.6-0.20240126152145-9b0f130f2599/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc= github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/kpango/fastime v1.1.9 h1:xVQHcqyPt5M69DyFH7g1EPRns1YQNap9d5eLhl/Jy84= @@ -470,16 +473,16 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0 github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mandolyte/mdtopdf v1.3.2/go.mod h1:c28Ldk+tVc/y7QQcEcILStS/OFlerdXGGdBUzJQBgEo= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-sqlite3 v1.14.18 h1:JL0eqdCOq6DJVNPSvArO/bIV9/P7fbGrV00LZHc+5aI= -github.com/mattn/go-sqlite3 v1.14.18/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/mattn/go-sqlite3 v1.14.20 h1:BAZ50Ns0OFBNxdAqFhbZqdPcht1Xlb16pDCqkq1spr0= +github.com/mattn/go-sqlite3 v1.14.20/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2/go.mod h1:76rfSfYPWj01Z85hUf/ituArm797mNKcvINh1OlsZKo= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= @@ -488,6 +491,8 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= @@ -496,10 +501,10 @@ github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.13.2 h1:Bi2gGVkfn6gQcjNjZJVO8Gf0FHzMPf2phUei9tejVMs= -github.com/onsi/ginkgo/v2 v2.13.2/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM= -github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8= -github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= +github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= +github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= @@ -512,16 +517,18 @@ github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFu github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk= +github.com/planetscale/vtprotobuf v0.6.0 h1:nBeETjudeJ5ZgBHUz1fVHvbqUKnYOXNhsIEabROxmNA= +github.com/planetscale/vtprotobuf v0.6.0/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y= +github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/quasilyte/go-ruleguard v0.4.0 h1:DyM6r+TKL+xbKB4Nm7Afd1IQh9kEUKQs2pboWGKtvQo= @@ -535,8 +542,8 @@ github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8 github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk= github.com/schollz/progressbar/v2 v2.15.0/go.mod h1:UdPq3prGkfQ7MOzZKlDRpYKcFqEMczbD7YmbPgpzKMI= @@ -568,9 +575,6 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tevino/abool v1.2.0/go.mod h1:qc66Pna1RiIsPa7O4Egxxs9OqkuxDX55zznh9K07Tzg= github.com/urfave/cli/v2 v2.4.0/go.mod h1:NX9W0zmTvedE5oDoOMs2RTC8RvdK98NTYZE5LbaEYPg= -github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= @@ -578,36 +582,36 @@ github.com/zeebo/assert v1.3.1 h1:vukIABvugfNMZMQO1ABsyQDJDTVQbn+LWSMy1ol1h6A= github.com/zeebo/assert v1.3.1/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= +go.einride.tech/aip v0.66.0/go.mod h1:qAhMsfT7plxBX+Oy7Huol6YUvZ0ZzdUz26yZsQwfl1M= go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0 h1:+uFejS4DCfNH6d3xODVIGsdhzgzhh45p9gpbHQMbdZI= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0/go.mod h1:HSmzQvagH8pS2/xrK7ScWsk0vAMtRTGbMFgInXCi8Tc= -go.opentelemetry.io/otel v1.11.1 h1:4WLLAmcfkmDk2ukNXJyq3/kiz/3UzCaYq6PskJsaou4= -go.opentelemetry.io/otel v1.11.1/go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.1 h1:X2GndnMCsUPh6CiY2a+frAbNsXaPLbB0soHRYhAZ5Ig= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.1/go.mod h1:i8vjiSzbiUC7wOQplijSXMYUpNM93DtlS5CbUT+C6oQ= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.33.0 h1:OT/UjHcjog4A1s1UMCtyehIKS+vpjM5Du0r7KGsH6TE= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.33.0/go.mod h1:0XctNDHEWmiSDIU8NPbJElrK05gBJFcYlGP4FMGo4g4= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.33.0 h1:1SVtGtRsNyGgv1fRfNXfh+sJowIwzF0gkf+61lvTgdg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.33.0/go.mod h1:ryB27ubOBXsiqfh6MwtSdx5knzbSZtjvPnMMmt3AykQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.1 h1:MEQNafcNCB0uQIti/oHgU7CZpUMYQ7qigBwMVKycHvc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.1/go.mod h1:19O5I2U5iys38SsmT2uDJja/300woyzE1KPIQxEUBUc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.1 h1:LYyG/f1W/jzAix16jbksJfMQFpOH/Ma6T639pVPMgfI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.1/go.mod h1:QrRRQiY3kzAoYPNLP0W/Ikg0gR6V3LMc+ODSxr7yyvg= -go.opentelemetry.io/otel/metric v0.33.0 h1:xQAyl7uGEYvrLAiV/09iTJlp1pZnQ9Wl793qbVvED1E= -go.opentelemetry.io/otel/metric v0.33.0/go.mod h1:QlTYc+EnYNq/M2mNk1qDDMRLpqCOj2f/r5c7Fd5FYaI= -go.opentelemetry.io/otel/sdk v1.11.1 h1:F7KmQgoHljhUuJyA+9BiU+EkJfyX5nVVF4wyzWZpKxs= -go.opentelemetry.io/otel/sdk v1.11.1/go.mod h1:/l3FE4SupHJ12TduVjUkZtlfFqDCQJlOlithYrdktys= -go.opentelemetry.io/otel/sdk/metric v0.33.0 h1:oTqyWfksgKoJmbrs2q7O7ahkJzt+Ipekihf8vhpa9qo= -go.opentelemetry.io/otel/sdk/metric v0.33.0/go.mod h1:xdypMeA21JBOvjjzDUtD0kzIcHO/SPez+a8HOzJPGp0= -go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ= -go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= -go.starlark.net v0.0.0-20231121155337-90ade8b19d09 h1:hzy3LFnSN8kuQK8h9tHl4ndF6UruMj47OqwqsS+/Ai4= -go.starlark.net v0.0.0-20231121155337-90ade8b19d09/go.mod h1:LcLNIzVOMp4oV+uusnpk+VU+SzXaJakUuBjoCSWH5dM= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 h1:sv9kVfal0MK0wBMCOGr+HeJm9v803BkJxGrk2au7j08= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= +go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= +go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.45.0 h1:tfil6di0PoNV7FZdsCS7A5izZoVVQ7AuXtyekbOpG/I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.45.0/go.mod h1:AKFZIEPOnqB00P63bTjOiah4ZTaRzl1TKwUWpZdYUHI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 h1:9M3+rhx7kZCIQQhQRYaZCdNu1V73tm4TvXs2ntl98C4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0/go.mod h1:noq80iT8rrHP1SfybmPiRGc9dc5M8RPmGvtwo7Oo7tc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0 h1:H2JFgRcGiyHg7H7bwcwaQJYrNFqCqrbTQ8K4p1OvDu8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0/go.mod h1:WfCWp1bGoYK8MeULtI15MmQVczfR+bFkk0DF3h06QmQ= +go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= +go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= +go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= +go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= +go.opentelemetry.io/otel/sdk/metric v1.22.0 h1:ARrRetm1HCVxq0cbnaZQlfwODYJHo3gFL8Z3tSmHBcI= +go.opentelemetry.io/otel/sdk/metric v1.22.0/go.mod h1:KjQGeMIDlBNEOo6HvjhxIec1p/69/kULDcp4gr0oLQQ= +go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= +go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= +go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxikMeI= +go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= +go.starlark.net v0.0.0-20240123142251-f86470692795 h1:LmbG8Pq7KDGkglKVn8VpZOZj6vb9b8nKEGcg9l03epM= +go.starlark.net v0.0.0-20240123142251-f86470692795/go.mod h1:LcLNIzVOMp4oV+uusnpk+VU+SzXaJakUuBjoCSWH5dM= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= @@ -620,39 +624,39 @@ go.uber.org/ratelimit v0.3.0 h1:IdZd9wqvFXnvLvSEBo0KPcGfkoBGNkpTHlrE3Rcjkjw= go.uber.org/ratelimit v0.3.0/go.mod h1:So5LG7CV1zWpY1sHe+DXTJqQvOx+FFPFaAs2SnoyBaI= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -gocloud.dev v0.35.0 h1:x/Gtt5OJdT4j+ir1AXAIXb7bBnFawXAAaJptCUGk3HU= -gocloud.dev v0.35.0/go.mod h1:wbyF+BhfdtLWyUtVEWRW13hFLb1vXnV2ovEhYGQe3ck= -golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= -golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb h1:c0vyKkb6yr3KR7jEfJaOSv4lG7xPkbN6r52aJz1d8a8= -golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= +gocloud.dev v0.36.0 h1:q5zoXux4xkOZP473e1EZbG8Gq9f0vlg1VNH5Du/ybus= +gocloud.dev v0.36.0/go.mod h1:bLxah6JQVKBaIxzsr5BQLYB4IYdWHkMZdzCXlo6F0gg= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/exp/shiny v0.0.0-20220827204233-334a2380cb91/go.mod h1:VjAR7z0ngyATZTELrBSkxOOHhhlnVUxDye4mcjx5h/8= golang.org/x/exp/shiny v0.0.0-20230801115018-d63ba01acd4b/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63/go.mod h1:UH99kUObWAZkDnWqppdQe5ZhPYESUw8I0zVV1uWBR+0= -golang.org/x/exp/typeparams v0.0.0-20231206192017-f3f8817b8deb h1:O9ulz4QbYejvlkJzZ6gNIYs+YhXXWg886sWk5ugFPSw= -golang.org/x/exp/typeparams v0.0.0-20231206192017-f3f8817b8deb/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= -golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4= -golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= +golang.org/x/exp/typeparams v0.0.0-20240119083558-1b970713d09a h1:8qmSSA8Gz/1kTrCe0nqR0R3Gb/NDhykzWw2q2mWZydM= +golang.org/x/exp/typeparams v0.0.0-20240119083558-1b970713d09a/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/image v0.15.0 h1:kOELfmgrmJlw4Cdb7g/QGuB3CvDrXbqEIww/pNtNBm8= +golang.org/x/image v0.15.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20231127183840-76ac6878050a/go.mod h1:Ede7gF0KGoHlj822RtphAHK1jLdrcuRBZg0sF1Q+SPc= +golang.org/x/mobile v0.0.0-20240112133503-c713f31d574b/go.mod h1:4efzQnuA1nICq6h4kmZRMGzbPiP06lZvgADUu1VpJCE= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= -golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= -golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= -golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= @@ -663,22 +667,22 @@ gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946 h1:vJpL69PeUullhJyKtTjHjENE gonum.org/v1/hdf5 v0.0.0-20210714002203-8c5d23bc6946/go.mod h1:BQUWDHIAygjdt1HnUPQ0eWqLN2n5FwJycrpYUVUOx2I= gonum.org/v1/plot v0.14.0 h1:+LBDVFYwFe4LHhdP8coW6296MBEY4nQ+Y4vuUpJopcE= gonum.org/v1/plot v0.14.0/go.mod h1:MLdR9424SJed+5VqC6MsouEpig9pZX2VZ57H9ko2bXU= -google.golang.org/api v0.153.0 h1:N1AwGhielyKFaUqH07/ZSIQR3uNPcV7NVw0vj+j4iR4= -google.golang.org/api v0.153.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY= +google.golang.org/api v0.161.0 h1:oYzk/bs26WN10AV7iU7MVJVXBH8oCPS2hHyBiEeFoSU= +google.golang.org/api v0.161.0/go.mod h1:0mu0TpK33qnydLvWqbImq2b1eQ5FHRSDCBzAxX9ZHyw= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 h1:1hfbdAfFbkmpg41000wDVqr7jUpK/Yo+LPnIxxGzmkg= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic= -google.golang.org/genproto/googleapis/api v0.0.0-20231211222908-989df2bf70f3 h1:EWIeHfGuUf00zrVZGEgYFxok7plSAXBGcH7NNdMAWvA= -google.golang.org/genproto/googleapis/api v0.0.0-20231211222908-989df2bf70f3/go.mod h1:k2dtGpRrbsSyKcNPKKI5sstZkrNCZwpU/ns96JoHbGg= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20231120223509-83a465c0220f/go.mod h1:iIgEblxoG4klcXsG0d9cpoxJ4xndv6+1FkDROCHhPRI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231211222908-989df2bf70f3 h1:kzJAXnzZoFbe5bhZd4zjUuHos/I31yH4thfMb/13oVY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231211222908-989df2bf70f3/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= -google.golang.org/grpc v1.60.0 h1:6FQAR0kM31P6MRdeluor2w2gPaS4SVNrD/DNTxrQ15k= -google.golang.org/grpc v1.60.0/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= +google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe h1:USL2DhxfgRchafRvt/wYyyQNzwgL7ZiURcozOE/Pkvo= +google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe h1:0poefMBYvYbs7g5UkjS6HcxBPaTRAmznle9jnxYoAI8= +google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:ZSvZ8l+AWJwXw91DoTjWjaVLpWU6o0eZ4YLYpH8aLeQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe h1:bQnxqljG/wqi4NTXu2+DJ3n7APcEA882QZ1JvhQAq9o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= +google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -689,28 +693,29 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/js/dom v0.0.0-20210725211120-f030747120f2/go.mod h1:sUMDUKNB2ZcVjt92UnLy3cdGs+wDAcrPdV3JP6sVgA4= honnef.co/go/tools v0.4.6/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= -k8s.io/api v0.27.3 h1:yR6oQXXnUEBWEWcvPWS0jQL575KoAboQPfJAuKNrw5Y= -k8s.io/api v0.27.3/go.mod h1:C4BNvZnQOF7JA/0Xed2S+aUyJSfTGkGFxLXz9MnpIpg= -k8s.io/apiextensions-apiserver v0.27.3 h1:xAwC1iYabi+TDfpRhxh4Eapl14Hs2OftM2DN5MpgKX4= -k8s.io/apiextensions-apiserver v0.27.3/go.mod h1:BH3wJ5NsB9XE1w+R6SSVpKmYNyIiyIz9xAmBl8Mb+84= -k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM= -k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= -k8s.io/cli-runtime v0.27.3 h1:h592I+2eJfXj/4jVYM+tu9Rv8FEc/dyCoD80UJlMW2Y= -k8s.io/cli-runtime v0.27.3/go.mod h1:LzXud3vFFuDFXn2LIrWnscPgUiEj7gQQcYZE2UPn9Kw= -k8s.io/client-go v0.27.3 h1:7dnEGHZEJld3lYwxvLl7WoehK6lAq7GvgjxpA3nv1E8= -k8s.io/client-go v0.27.3/go.mod h1:2MBEKuTo6V1lbKy3z1euEGnhPfGZLKTS9tiJ2xodM48= -k8s.io/component-base v0.27.3 h1:g078YmdcdTfrCE4fFobt7qmVXwS8J/3cI1XxRi/2+6k= -k8s.io/component-base v0.27.3/go.mod h1:JNiKYcGImpQ44iwSYs6dysxzR9SxIIgQalk4HaCNVUY= -k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= -k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= -k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 h1:OmK1d0WrkD3IPfkskvroRykOulHVHf0s0ZIFRjyt+UI= -k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515/go.mod h1:kzo02I3kQ4BTtEfVLaPbjvCkX97YqGve33wzlb3fofQ= -k8s.io/metrics v0.27.3 h1:pBVKgQjfui8xzfTidIxiOmLHwcCk3KbeuWowo/Oh0t0= -k8s.io/metrics v0.27.3/go.mod h1:pXj63OTdOjpYgSc95p+88fB3t4krLybM7MOeqIksI6o= -k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= -k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/api v0.29.1 h1:DAjwWX/9YT7NQD4INu49ROJuZAAAP/Ijki48GUPzxqw= +k8s.io/api v0.29.1/go.mod h1:7Kl10vBRUXhnQQI8YR/R327zXC8eJ7887/+Ybta+RoQ= +k8s.io/apiextensions-apiserver v0.29.1 h1:S9xOtyk9M3Sk1tIpQMu9wXHm5O2MX6Y1kIpPMimZBZw= +k8s.io/apiextensions-apiserver v0.29.1/go.mod h1:zZECpujY5yTW58co8V2EQR4BD6A9pktVgHhvc0uLfeU= +k8s.io/apimachinery v0.29.1 h1:KY4/E6km/wLBguvCZv8cKTeOwwOBqFNjwJIdMkMbbRc= +k8s.io/apimachinery v0.29.1/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU= +k8s.io/cli-runtime v0.29.1 h1:By3WVOlEWYfyxhGko0f/IuAOLQcbBSMzwSaDren2JUs= +k8s.io/cli-runtime v0.29.1/go.mod h1:vjEY9slFp8j8UoMhV5AlO8uulX9xk6ogfIesHobyBDU= +k8s.io/client-go v0.29.1 h1:19B/+2NGEwnFLzt0uB5kNJnfTsbV8w6TgQRz9l7ti7A= +k8s.io/client-go v0.29.1/go.mod h1:TDG/psL9hdet0TI9mGyHJSgRkW3H9JZk2dNEUS7bRks= +k8s.io/component-base v0.29.1 h1:MUimqJPCRnnHsskTTjKD+IC1EHBbRCVyi37IoFBrkYw= +k8s.io/component-base v0.29.1/go.mod h1:fP9GFjxYrLERq1GcWWZAE3bqbNcDKDytn2srWuHTtKc= +k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240126223410-2919ad4fcfec h1:iGTel2aR8vCZdxJDgmbeY0zrlXy9Qcvyw4R2sB4HLrA= +k8s.io/kube-openapi v0.0.0-20240126223410-2919ad4fcfec/go.mod h1:Pa1PvrP7ACSkuX6I7KYomY6cmMA0Tx86waBhDUgoKPw= +k8s.io/metrics v0.29.1 h1:qutc3aIPMCniMuEApuLaeYX47rdCn8eycVDx7R6wMlQ= +k8s.io/metrics v0.29.1/go.mod h1:JrbV2U71+v7d/9qb90UVKL8r0uJ6Z2Hy4V7mDm05cKs= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= @@ -759,14 +764,14 @@ modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/z v1.5.1/go.mod h1:eWFB510QWW5Th9YGZT81s+LwvaAs3Q2yr4sP0rmLkv8= rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= -sigs.k8s.io/controller-runtime v0.15.0 h1:ML+5Adt3qZnMSYxZ7gAverBLNPSMQEibtzAgp0UPojU= -sigs.k8s.io/controller-runtime v0.15.0/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= +sigs.k8s.io/controller-runtime v0.17.0 h1:fjJQf8Ukya+VjogLO6/bNX9HE6Y2xpsO5+fyS26ur/s= +sigs.k8s.io/controller-runtime v0.17.0/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/kustomize/api v0.13.2 h1:kejWfLeJhUsTGioDoFNJET5LQe/ajzXhJGYoU+pJsiA= -sigs.k8s.io/kustomize/api v0.13.2/go.mod h1:DUp325VVMFVcQSq+ZxyDisA8wtldwHxLZbr1g94UHsw= -sigs.k8s.io/kustomize/kyaml v0.14.1 h1:c8iibius7l24G2wVAGZn/Va2wNys03GXLjYVIcFVxKA= -sigs.k8s.io/kustomize/kyaml v0.14.1/go.mod h1:AN1/IpawKilWD7V+YvQwRGUvuUOOWpjsHu6uHwonSF4= +sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0= +sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3/go.mod h1:9n16EZKMhXBNSiUC5kSdFQJkdH3zbxS/JoO619G1VAY= +sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 h1:W6cLQc5pnqM7vh3b7HvGNfXrJ/xL6BDMS0v1V/HHg5U= +sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3/go.mod h1:JWP1Fj0VWGHyw3YUPjXSQnRnrwezrZSrApfX5S0nIag= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= diff --git a/hack/go.mod.default b/hack/go.mod.default old mode 100755 new mode 100644 index bd045ef535d..33efd46fae7 --- a/hack/go.mod.default +++ b/hack/go.mod.default @@ -272,19 +272,19 @@ replace ( github.com/xlab/treeprint => github.com/xlab/treeprint upgrade github.com/zeebo/assert => github.com/zeebo/assert upgrade github.com/zeebo/xxh3 => github.com/zeebo/xxh3 upgrade - go.opencensus.io => go.opencensus.io upgrade go.etcd.io/bbolt => go.etcd.io/bbolt upgrade - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.37.0 - go.opentelemetry.io/otel => go.opentelemetry.io/otel v1.11.1 - go.opentelemetry.io/otel/exporters/otlp/internal/retry => go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.1 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric => go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.33.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc => go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.33.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace => go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.1 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc => go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.1 - go.opentelemetry.io/otel/metric => go.opentelemetry.io/otel/metric v0.33.0 - go.opentelemetry.io/otel/sdk => go.opentelemetry.io/otel/sdk v1.11.1 - go.opentelemetry.io/otel/sdk/metric => go.opentelemetry.io/otel/sdk/metric v0.33.0 - go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v1.11.1 + go.opencensus.io => go.opencensus.io upgrade + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc => go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc upgrade + go.opentelemetry.io/otel => go.opentelemetry.io/otel upgrade + go.opentelemetry.io/otel/exporters/otlp/internal/retry => go.opentelemetry.io/otel/exporters/otlp/internal/retry upgrade + go.opentelemetry.io/otel/exporters/otlp/otlpmetric => go.opentelemetry.io/otel/exporters/otlp/otlpmetric upgrade + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc => go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc upgrade + go.opentelemetry.io/otel/exporters/otlp/otlptrace => go.opentelemetry.io/otel/exporters/otlp/otlptrace upgrade + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc => go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc upgrade + go.opentelemetry.io/otel/metric => go.opentelemetry.io/otel/metric upgrade + go.opentelemetry.io/otel/sdk => go.opentelemetry.io/otel/sdk upgrade + go.opentelemetry.io/otel/sdk/metric => go.opentelemetry.io/otel/sdk/metric upgrade + go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace upgrade go.opentelemetry.io/proto/otlp => go.opentelemetry.io/proto/otlp upgrade go.starlark.net => go.starlark.net upgrade go.uber.org/atomic => go.uber.org/atomic upgrade @@ -328,19 +328,19 @@ replace ( gopkg.in/yaml.v2 => gopkg.in/yaml.v2 upgrade gopkg.in/yaml.v3 => gopkg.in/yaml.v3 upgrade honnef.co/go/tools => honnef.co/go/tools upgrade - k8s.io/api => k8s.io/api v0.27.3 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.27.3 - k8s.io/apimachinery => k8s.io/apimachinery v0.27.3 - k8s.io/cli-runtime => k8s.io/cli-runtime v0.27.3 - k8s.io/client-go => k8s.io/client-go v0.27.3 - k8s.io/component-base => k8s.io/component-base v0.27.3 + k8s.io/api => k8s.io/api v0.29.1 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.29.1 + k8s.io/apimachinery => k8s.io/apimachinery v0.29.1 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.29.1 + k8s.io/client-go => k8s.io/client-go v0.29.1 + k8s.io/component-base => k8s.io/component-base v0.29.1 k8s.io/klog/v2 => k8s.io/klog/v2 upgrade - k8s.io/kube-openapi => k8s.io/kube-openapi 2546d827e515dca59571ec245eef2302e11018e1 - k8s.io/kubernetes => k8s.io/kubernetes v0.27.3 - k8s.io/metrics => k8s.io/metrics v0.27.3 + k8s.io/kube-openapi => k8s.io/kube-openapi master + k8s.io/kubernetes => k8s.io/kubernetes v0.29.1 + k8s.io/metrics => k8s.io/metrics v0.29.1 nhooyr.io/websocket => nhooyr.io/websocket upgrade rsc.io/pdf => rsc.io/pdf upgrade - sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.15.0 + sigs.k8s.io/controller-runtime => sigs.k8s.io/controller-runtime v0.17.0 sigs.k8s.io/json => sigs.k8s.io/json upgrade sigs.k8s.io/kustomize => sigs.k8s.io/kustomize upgrade sigs.k8s.io/structured-merge-diff/v4 => sigs.k8s.io/structured-merge-diff/v4 upgrade diff --git a/hack/license/gen/main.go b/hack/license/gen/main.go index e348675753c..a17f258b66a 100644 --- a/hack/license/gen/main.go +++ b/hack/license/gen/main.go @@ -209,6 +209,7 @@ func dirwalk(dir string) []string { "CONTRIBUTORS", "GO_VERSION", "NGT_VERSION", + "FAISS_VERSION", "Pipefile", "VALD_VERSION", "grp", @@ -276,7 +277,7 @@ func readAndRewrite(path string) error { } else { tmpl := apache switch filepath.Ext(path) { - case ".go": + case ".go", ".c", ".h", ".hpp", ".cpp": d.Escape = slushEscape switch fi.Name() { case "errgroup_test.go", diff --git a/internal/backoff/backoff_test.go b/internal/backoff/backoff_test.go index fd8e0634f39..b907b197251 100644 --- a/internal/backoff/backoff_test.go +++ b/internal/backoff/backoff_test.go @@ -262,7 +262,7 @@ func Test_backoff_Do(t *testing.T) { return nil, false, err } return test{ - name: "return nil response and error when function returns (nil, false, error) and not retriable", + name: "return nil response and error when function returns (nil, false, error) and not retryable", args: args{ ctx: ctx, f: f, @@ -278,7 +278,7 @@ func Test_backoff_Do(t *testing.T) { return nil, true, nil } return test{ - name: "return nil response and nil error when function returns (nil, true, nil) and not retriable", + name: "return nil response and nil error when function returns (nil, true, nil) and not retryable", args: args{ ctx: ctx, f: f, diff --git a/internal/client/v1/client/agent/core/client.go b/internal/client/v1/client/agent/core/client.go index 49a48ac93b8..4dfc45f55cd 100644 --- a/internal/client/v1/client/agent/core/client.go +++ b/internal/client/v1/client/agent/core/client.go @@ -86,11 +86,7 @@ func New(opts ...Option) (Client, error) { return c, nil } -func NewAgentClient(cc *grpc.ClientConn) interface { - vald.Client - client.ObjectReader - client.Indexer -} { +func NewAgentClient(cc *grpc.ClientConn) Client { return &singleAgentClient{ Client: vald.NewValdClient(cc), ac: agent.NewAgentClient(cc), diff --git a/internal/config/faiss.go b/internal/config/faiss.go new file mode 100644 index 00000000000..f6e97e6d468 --- /dev/null +++ b/internal/config/faiss.go @@ -0,0 +1,117 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Package config providers configuration type and load configuration logic +package config + +// Faiss represent the faiss core configuration for server. +type Faiss struct { + // IndexPath represents the faiss index file path + IndexPath string `yaml:"index_path" json:"index_path,omitempty"` + + // Dimension represents the faiss index dimension + Dimension int `yaml:"dimension" json:"dimension,omitempty" info:"dimension"` + + // Nlist represents the number of Voronoi cells + // ref: https://github.com/facebookresearch/faiss/wiki/Faster-search + Nlist int `yaml:"nlist" json:"nlist,omitempty" info:"nlist"` + + // M represents the number of subquantizers + // ref: https://github.com/facebookresearch/faiss/wiki/Faiss-indexes-(composite)#cell-probe-method-with-a-pq-index-as-coarse-quantizer + M int `yaml:"m" json:"m,omitempty" info:"m"` + + // NbitsPerIdx represents the number of bit per subvector index + // ref: https://github.com/facebookresearch/faiss/wiki/FAQ#can-i-ignore-warning-clustering-xxx-points-to-yyy-centroids + NbitsPerIdx int `yaml:"nbits_per_idx" json:"nbits_per_idx,omitempty" info:"nbits_per_idx"` + + // MetricType represents the metric type + MetricType string `yaml:"metric_type" json:"metric_type,omitempty" info:"metric_type"` + + // EnableInMemoryMode enables on memory faiss indexing mode + EnableInMemoryMode bool `yaml:"enable_in_memory_mode" json:"enable_in_memory_mode,omitempty"` + + // AutoIndexCheckDuration represents checking loop duration about auto indexing execution + AutoIndexCheckDuration string `yaml:"auto_index_check_duration" json:"auto_index_check_duration,omitempty"` + + // AutoSaveIndexDuration represents checking loop duration about auto save index execution + AutoSaveIndexDuration string `yaml:"auto_save_index_duration" json:"auto_save_index_duration,omitempty"` + + // AutoIndexDurationLimit represents auto indexing duration limit + AutoIndexDurationLimit string `yaml:"auto_index_duration_limit" json:"auto_index_duration_limit,omitempty"` + + // AutoIndexLength represents auto index length limit + AutoIndexLength int `yaml:"auto_index_length" json:"auto_index_length,omitempty"` + + // InitialDelayMaxDuration represents maximum duration for initial delay + InitialDelayMaxDuration string `yaml:"initial_delay_max_duration" json:"initial_delay_max_duration,omitempty"` + + // MinLoadIndexTimeout represents minimum duration of load index timeout + MinLoadIndexTimeout string `yaml:"min_load_index_timeout" json:"min_load_index_timeout,omitempty"` + + // MaxLoadIndexTimeout represents maximum duration of load index timeout + MaxLoadIndexTimeout string `yaml:"max_load_index_timeout" json:"max_load_index_timeout,omitempty"` + + // LoadIndexTimeoutFactor represents a factor of load index timeout + LoadIndexTimeoutFactor string `yaml:"load_index_timeout_factor" json:"load_index_timeout_factor,omitempty"` + + // EnableProactiveGC enables more proactive GC call for reducing heap memory allocation + EnableProactiveGC bool `yaml:"enable_proactive_gc" json:"enable_proactive_gc,omitempty"` + + // EnableCopyOnWrite enables copy on write saving + EnableCopyOnWrite bool `yaml:"enable_copy_on_write" json:"enable_copy_on_write,omitempty"` + + // VQueue represents the faiss vector queue buffer size + VQueue *VQueue `json:"vqueue,omitempty" yaml:"vqueue"` + + // KVSDB represents the faiss bidirectional kv store configuration + KVSDB *KVSDB `json:"kvsdb,omitempty" yaml:"kvsdb"` +} + +//// KVSDB represent the faiss vector bidirectional kv store configuration +// type KVSDB struct { +// // Concurrency represents kvsdb range loop processing concurrency +// Concurrency int `json:"concurrency,omitempty" yaml:"concurrency,omitempty"` +// } +//// VQueue represent the faiss vector queue buffer size +// type VQueue struct { +// // InsertBufferPoolSize represents insert time ordered slice buffer size +// InsertBufferPoolSize int `json:"insert_buffer_pool_size,omitempty" yaml:"insert_buffer_pool_size"` +// +// // DeleteBufferPoolSize represents delete time ordered slice buffer size +// DeleteBufferPoolSize int `json:"delete_buffer_pool_size,omitempty" yaml:"delete_buffer_pool_size"` +// } + +// Bind returns Faiss object whose some string value is filed value or environment value. +func (f *Faiss) Bind() *Faiss { + f.IndexPath = GetActualValue(f.IndexPath) + f.MetricType = GetActualValue(f.MetricType) + f.AutoIndexCheckDuration = GetActualValue(f.AutoIndexCheckDuration) + f.AutoIndexDurationLimit = GetActualValue(f.AutoIndexDurationLimit) + f.AutoSaveIndexDuration = GetActualValue(f.AutoSaveIndexDuration) + f.InitialDelayMaxDuration = GetActualValue(f.InitialDelayMaxDuration) + f.MinLoadIndexTimeout = GetActualValue(f.MinLoadIndexTimeout) + f.MaxLoadIndexTimeout = GetActualValue(f.MaxLoadIndexTimeout) + f.LoadIndexTimeoutFactor = GetActualValue(f.LoadIndexTimeoutFactor) + + if f.VQueue == nil { + f.VQueue = new(VQueue) + } + if f.KVSDB == nil { + f.KVSDB = new(KVSDB) + } + + return f +} diff --git a/internal/config/server.go b/internal/config/server.go index 7ecb88ce7e6..edbf04d06fd 100644 --- a/internal/config/server.go +++ b/internal/config/server.go @@ -20,6 +20,7 @@ package config import ( "github.com/vdaas/vald/internal/net" "github.com/vdaas/vald/internal/net/grpc" + "github.com/vdaas/vald/internal/net/grpc/admin" "github.com/vdaas/vald/internal/net/grpc/health" "github.com/vdaas/vald/internal/net/grpc/reflection" "github.com/vdaas/vald/internal/servers/server" @@ -89,6 +90,7 @@ type GRPC struct { HeaderTableSize int `json:"header_table_size,omitempty" yaml:"header_table_size"` Interceptors []string `json:"interceptors,omitempty" yaml:"interceptors"` EnableReflection bool `json:"enable_reflection,omitempty" yaml:"enable_reflection"` + EnableAdmin bool `json:"enable_admin,omitempty" yaml:"enable_admin"` } // GRPCKeepalive represents the configuration for gRPC keep-alive. @@ -282,6 +284,12 @@ func (s *Server) Opts() []server.Option { reflection.Register(srv) })) } + if s.GRPC.EnableAdmin { + opts = append(opts, + server.WithGRPCRegistFunc(func(srv *grpc.Server) { + admin.Register(srv) + })) + } if s.GRPC.Keepalive != nil { opts = append(opts, server.WithGRPCKeepaliveMaxConnIdle(s.GRPC.Keepalive.MaxConnIdle), diff --git a/internal/core/algorithm/algorithm.go b/internal/core/algorithm/algorithm.go index 2834625727a..3f0fc46af58 100644 --- a/internal/core/algorithm/algorithm.go +++ b/internal/core/algorithm/algorithm.go @@ -25,3 +25,10 @@ const ( // MinimumVectorDimensionSize is minimum value of vector dimension. MinimumVectorDimensionSize = 2 ) + +// SearchResult is struct for comfortable use in Go. +type SearchResult struct { + ID uint32 + Distance float32 + Error error +} diff --git a/internal/core/algorithm/faiss/Capi.cpp b/internal/core/algorithm/faiss/Capi.cpp new file mode 100644 index 00000000000..24fd153eeae --- /dev/null +++ b/internal/core/algorithm/faiss/Capi.cpp @@ -0,0 +1,231 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "Capi.h" + +FaissStruct* faiss_create_index( + const int d, + const int nlist, + const int m, + const int nbits_per_idx, + const int metric_type) { + //printf(__FUNCTION__); + //printf("\n"); + //fflush(stdout); + + FaissStruct *st = NULL; + try { + faiss::IndexFlat *quantizer; + switch (metric_type) { + case faiss::METRIC_INNER_PRODUCT: + quantizer = new faiss::IndexFlat(d, faiss::METRIC_INNER_PRODUCT); + break; + case faiss::METRIC_L2: + quantizer = new faiss::IndexFlat(d, faiss::METRIC_L2); + break; + default: + std::stringstream ss; + ss << "Capi : " << __FUNCTION__ << "() : Error: no metric type."; + std::cerr << ss.str() << std::endl; + return NULL; + } + faiss::IndexIVFPQ *index = new faiss::IndexIVFPQ(quantizer, d, nlist, m, nbits_per_idx); + //index->verbose = true; + st = new FaissStruct{ + static_cast(quantizer), + static_cast(index) + }; + } catch(std::exception &err) { + std::stringstream ss; + ss << "Capi : " << __FUNCTION__ << "() : Error: " << err.what(); + std::cerr << ss.str() << std::endl; + } + + return st; +} + +FaissStruct* faiss_read_index(const char* fname) { + //printf(__FUNCTION__); + //printf("\n"); + //fflush(stdout); + + FaissStruct *st = NULL; + try { + st = new FaissStruct{ + static_cast(NULL), + static_cast(faiss::read_index(fname)) + }; + } catch(std::exception &err) { + std::stringstream ss; + ss << "Capi : " << __FUNCTION__ << "() : Error: " << err.what(); + std::cerr << ss.str() << std::endl; + } + + return st; +} + +bool faiss_write_index( + const FaissStruct* st, + const char* fname) { + //printf(__FUNCTION__); + //printf("\n"); + //fflush(stdout); + + try { + faiss::write_index(static_cast(st->faiss_index), fname); + } catch(std::exception &err) { + std::stringstream ss; + ss << "Capi : " << __FUNCTION__ << "() : Error: " << err.what(); + std::cerr << ss.str() << std::endl; + return false; + } + + fflush(stdout); + return true; +} + +bool faiss_train( + const FaissStruct* st, + const int nb, + const float* xb) { + //printf(__FUNCTION__); + //printf("\n"); + //fflush(stdout); + + try { + //printf("is_trained: %d\n", (static_cast(st->faiss_index))->is_trained); + //printf("ntotal: %ld\n", (static_cast(st->faiss_index))->ntotal); + (static_cast(st->faiss_index))->train(nb, xb); + //printf("is_trained: %d\n", (static_cast(st->faiss_index))->is_trained); + //printf("ntotal: %ld\n", (static_cast(st->faiss_index))->ntotal); + } catch(std::exception &err) { + std::stringstream ss; + ss << "Capi : " << __FUNCTION__ << "() : Error: " << err.what(); + std::cerr << ss.str() << std::endl; + return false; + } + + fflush(stdout); + return true; +} + +int faiss_add( + const FaissStruct* st, + const int nb, + const float* xb, + const long int* xids ) { + //printf(__FUNCTION__); + //printf("\n"); + //fflush(stdout); + + try { + //printf("is_trained: %d\n", (static_cast(st->faiss_index))->is_trained); + //printf("ntotal: %ld\n", (static_cast(st->faiss_index))->ntotal); + (static_cast(st->faiss_index))->add_with_ids(nb, xb, xids); + //printf("is_trained: %d\n", (static_cast(st->faiss_index))->is_trained); + //printf("ntotal: %ld\n", (static_cast(st->faiss_index))->ntotal); + } catch(std::exception &err) { + std::stringstream ss; + ss << "Capi : " << __FUNCTION__ << "() : Error: " << err.what(); + std::cerr << ss.str() << std::endl; + return -1; + } + + fflush(stdout); + return (static_cast(st->faiss_index))->ntotal; +} + +bool faiss_search( + const FaissStruct* st, + const int k, + const int nq, + const float* xq, + long* I, + float* D) { + //printf(__FUNCTION__); + //printf("\n"); + //fflush(stdout); + + try { + //printf("is_trained: %d\n", (static_cast(st->faiss_index))->is_trained); + //printf("ntotal: %ld\n", (static_cast(st->faiss_index))->ntotal); + (static_cast(st->faiss_index))->search(nq, xq, k, D, I); + //printf("I=\n"); + //for(int i = 0; i < nq; i++) { + // for(int j = 0; j < k; j++) { + // printf("%5ld ", I[i * k + j]); + // } + // printf("\n"); + //} + //printf("D=\n"); + //for(int i = 0; i < nq; i++) { + // for(int j = 0; j < k; j++) { + // printf("%7g ", D[i * k + j]); + // } + // printf("\n"); + //} + } catch(std::exception &err) { + std::stringstream ss; + ss << "Capi : " << __FUNCTION__ << "() : Error: " << err.what(); + std::cerr << ss.str() << std::endl; + return false; + } + + return true; +} + +int faiss_remove( + const FaissStruct* st, + const int size, + const long int* ids) { + //printf(__FUNCTION__); + //printf("\n"); + //fflush(stdout); + + try { + //printf("is_trained: %d\n", (static_cast(st->faiss_index))->is_trained); + //printf("ntotal: %ld\n", (static_cast(st->faiss_index))->ntotal); + faiss::IDSelectorArray sel(size, ids); + (static_cast(st->faiss_index))->remove_ids(sel); + //printf("is_trained: %d\n", (static_cast(st->faiss_index))->is_trained); + //printf("ntotal: %ld\n", (static_cast(st->faiss_index))->ntotal); + } catch(std::exception &err) { + std::stringstream ss; + ss << "Capi : " << __FUNCTION__ << "() : Error: " << err.what(); + std::cerr << ss.str() << std::endl; + return -1; + } + + return (static_cast(st->faiss_index))->ntotal; +} + +void faiss_free(FaissStruct* st) { + //printf(__FUNCTION__); + //printf("\n"); + //fflush(stdout); + + free(st); + return; +} diff --git a/internal/core/algorithm/faiss/Capi.h b/internal/core/algorithm/faiss/Capi.h new file mode 100644 index 00000000000..19938a142a3 --- /dev/null +++ b/internal/core/algorithm/faiss/Capi.h @@ -0,0 +1,64 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#ifdef __cplusplus +extern "C" { +#endif + #include + #include + #include + + typedef void* FaissQuantizer; + typedef void* FaissIndex; + typedef struct { + FaissQuantizer faiss_quantizer; + FaissIndex faiss_index; + } FaissStruct; + + FaissStruct* faiss_create_index( + const int d, + const int nlist, + const int m, + const int nbits_per_idx, + const int metric_type); + FaissStruct* faiss_read_index(const char* fname); + bool faiss_write_index( + const FaissStruct* st, + const char* fname); + bool faiss_train( + const FaissStruct* st, + const int nb, + const float* xb); + int faiss_add( + const FaissStruct* st, + const int nb, + const float* xb, + const long int* xids); + bool faiss_search( + const FaissStruct* st, + const int k, + const int nq, + const float* xq, + long* I, + float* D); + int faiss_remove( + const FaissStruct* st, + const int size, + const long int* ids); + void faiss_free(FaissStruct* st); +#ifdef __cplusplus +} +#endif diff --git a/internal/core/algorithm/faiss/faiss.go b/internal/core/algorithm/faiss/faiss.go new file mode 100644 index 00000000000..167c3348610 --- /dev/null +++ b/internal/core/algorithm/faiss/faiss.go @@ -0,0 +1,250 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Package faiss provides implementation of Go API for https://github.com/facebookresearch/faiss +package faiss + +/* +#cgo LDFLAGS: -lfaiss +#include +*/ +import "C" + +import ( + "sync" + "unsafe" + + "github.com/vdaas/vald/internal/core/algorithm" + "github.com/vdaas/vald/internal/errors" +) + +type ( + // Faiss is core interface. + Faiss interface { + // SaveIndex stores faiss index to strage. + SaveIndex() error + + // SaveIndexWithPath stores faiss index to specified storage. + SaveIndexWithPath(idxPath string) error + + // Train trains faiss index. + Train(nb int, xb []float32) error + + // Add returns faiss ntotal. + Add(nb int, xb []float32, xids []int64) (int, error) + + // Search returns search result as []algorithm.SearchResult. + Search(k, nq int, xq []float32) ([]algorithm.SearchResult, error) + + // Remove removes from faiss index. + Remove(size int, ids []int64) (int, error) + + // Close faiss index. + Close() + } + + faiss struct { + st *C.FaissStruct + dimension C.int + nlist C.int + m C.int + nbitsPerIdx C.int + metricType metricType + idxPath string + mu *sync.RWMutex + } +) + +// metricType is alias of metric type in Faiss. +type metricType int + +const ( + // ------------------------------------------------------------- + // Metric Type Definition + // (https://github.com/facebookresearch/faiss/wiki/MetricType-and-distances) + // ------------------------------------------------------------- + // DistanceNone is unknown distance type. + DistanceNone metricType = iota - 1 + // InnerProduct is inner product. + InnerProduct + // L2 is l2 norm. + L2 + // -------------------------------------------------------------. + + // ------------------------------------------------------------- + // ErrorCode is false + // -------------------------------------------------------------. + ErrorCode = C._Bool(false) + // -------------------------------------------------------------. +) + +// New returns Faiss instance with recreating empty index file. +func New(opts ...Option) (Faiss, error) { + return gen(false, opts...) +} + +func Load(opts ...Option) (Faiss, error) { + return gen(true, opts...) +} + +func gen(isLoad bool, opts ...Option) (Faiss, error) { + var ( + f = new(faiss) + err error + ) + f.mu = new(sync.RWMutex) + + defer func() { + if err != nil { + f.Close() + } + }() + + for _, opt := range append(defaultOptions, opts...) { + if err = opt(f); err != nil { + return nil, errors.NewFaissError("faiss option error") + } + } + + if isLoad { + path := C.CString(f.idxPath) + defer C.free(unsafe.Pointer(path)) + f.st = C.faiss_read_index(path) + if f.st == nil { + return nil, errors.NewFaissError("faiss load index error") + } + } else { + switch f.metricType { + case InnerProduct: + f.st = C.faiss_create_index(f.dimension, f.nlist, f.m, f.nbitsPerIdx, C.int(InnerProduct)) + case L2: + f.st = C.faiss_create_index(f.dimension, f.nlist, f.m, f.nbitsPerIdx, C.int(L2)) + default: + return nil, errors.NewFaissError("faiss create index error: no metric type") + } + if f.st == nil { + return nil, errors.NewFaissError("faiss create index error: nil pointer") + } + } + + return f, nil +} + +// SaveIndex stores faiss index to storage. +func (f *faiss) SaveIndex() error { + path := C.CString(f.idxPath) + defer C.free(unsafe.Pointer(path)) + + f.mu.Lock() + ret := C.faiss_write_index(f.st, path) + f.mu.Unlock() + if ret == ErrorCode { + return errors.NewFaissError("failed to faiss_write_index") + } + + return nil +} + +// SaveIndexWithPath stores faiss index to specified storage. +func (f *faiss) SaveIndexWithPath(idxPath string) error { + path := C.CString(idxPath) + defer C.free(unsafe.Pointer(path)) + + f.mu.Lock() + ret := C.faiss_write_index(f.st, path) + f.mu.Unlock() + if ret == ErrorCode { + return errors.NewFaissError("failed to faiss_write_index") + } + + return nil +} + +// Train trains faiss index. +func (f *faiss) Train(nb int, xb []float32) error { + f.mu.Lock() + ret := C.faiss_train(f.st, (C.int)(nb), (*C.float)(&xb[0])) + f.mu.Unlock() + if ret == ErrorCode { + return errors.NewFaissError("failed to faiss_train") + } + + return nil +} + +// Add returns faiss ntotal. +func (f *faiss) Add(nb int, xb []float32, xids []int64) (int, error) { + dim := int(f.dimension) + if len(xb) != dim*nb || len(xb) != dim*len(xids) { + return -1, errors.ErrIncompatibleDimensionSize(len(xb)/nb, dim) + } + + f.mu.Lock() + ntotal := int(C.faiss_add(f.st, (C.int)(nb), (*C.float)(&xb[0]), (*C.long)(&xids[0]))) + f.mu.Unlock() + if ntotal < 0 { + return ntotal, errors.NewFaissError("failed to faiss_add") + } + + return ntotal, nil +} + +// Search returns search result as []algorithm.SearchResult. +func (f *faiss) Search(k, nq int, xq []float32) ([]algorithm.SearchResult, error) { + if len(xq) != nq*int(f.dimension) { + return nil, errors.ErrIncompatibleDimensionSize(len(xq), int(f.dimension)) + } + + I := make([]int64, k*nq) + D := make([]float32, k*nq) + f.mu.RLock() + ret := C.faiss_search(f.st, (C.int)(k), (C.int)(nq), (*C.float)(&xq[0]), (*C.long)(&I[0]), (*C.float)(&D[0])) + f.mu.RUnlock() + if ret == ErrorCode { + return nil, errors.NewFaissError("failed to faiss_search") + } + + if len(I) == 0 || len(D) == 0 { + return nil, errors.ErrEmptySearchResult + } + + result := make([]algorithm.SearchResult, k) + for i := range result { + result[i] = algorithm.SearchResult{uint32(I[i]), D[i], nil} + } + + return result, nil +} + +// Remove removes from faiss index. +func (f *faiss) Remove(size int, ids []int64) (int, error) { + f.mu.Lock() + ntotal := int(C.faiss_remove(f.st, (C.int)(size), (*C.long)(&ids[0]))) + f.mu.Unlock() + if ntotal < 0 { + return ntotal, errors.NewFaissError("failed to faiss_remove") + } + + return ntotal, nil +} + +// Close faiss index. +func (f *faiss) Close() { + if f.st != nil { + C.faiss_free(f.st) + f.st = nil + } +} diff --git a/internal/core/algorithm/faiss/option.go b/internal/core/algorithm/faiss/option.go new file mode 100644 index 00000000000..650d28caafc --- /dev/null +++ b/internal/core/algorithm/faiss/option.go @@ -0,0 +1,120 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Package faiss provides implementation of Go API for https://github.com/facebookresearch/faiss +package faiss + +import "C" + +import ( + "strings" + + "github.com/vdaas/vald/internal/core/algorithm" + "github.com/vdaas/vald/internal/errors" +) + +// Option represents the functional option for faiss. +type Option func(*faiss) error + +var defaultOptions = []Option{ + WithDimension(64), + WithNlist(100), + WithM(8), + WithNbitsPerIdx(8), + WithMetricType("l2"), +} + +// WithDimension represents the option to set the dimension for faiss. +func WithDimension(dim int) Option { + return func(f *faiss) error { + if dim > algorithm.MaximumVectorDimensionSize || dim < algorithm.MinimumVectorDimensionSize { + err := errors.ErrInvalidDimensionSize(dim, algorithm.MaximumVectorDimensionSize) + return errors.NewErrCriticalOption("dimension", dim, err) + } + + f.dimension = (C.int)(dim) + return nil + } +} + +// WithNlist represents the option to set the nlist for faiss. +func WithNlist(nlist int) Option { + return func(f *faiss) error { + if nlist <= 0 { + return errors.NewErrInvalidOption("nlist", nlist) + } + + f.nlist = (C.int)(nlist) + return nil + } +} + +// WithM represents the option to set the m for faiss. +func WithM(m int) Option { + return func(f *faiss) error { + if m <= 0 || int(f.dimension)%m != 0 { + return errors.NewErrInvalidOption("m", m) + } + + f.m = (C.int)(m) + return nil + } +} + +// WithNbitsPerIdx represents the option to set the n bits per index for faiss. +func WithNbitsPerIdx(nbitsPerIdx int) Option { + return func(f *faiss) error { + if nbitsPerIdx <= 0 { + return errors.NewErrInvalidOption("nbitsPerIdx", nbitsPerIdx) + } + + f.nbitsPerIdx = (C.int)(nbitsPerIdx) + return nil + } +} + +// WithMetricType represents the option to set the metric type for faiss. +func WithMetricType(metricType string) Option { + return func(f *faiss) error { + if len(metricType) == 0 { + return errors.NewErrIgnoredOption("metricType") + } + + switch strings.NewReplacer("-", "", "_", "", " ", "").Replace(strings.ToLower(metricType)) { + case "innerproduct": + f.metricType = InnerProduct + case "l2": + f.metricType = L2 + default: + err := errors.ErrUnsupportedDistanceType + return errors.NewErrCriticalOption("metricType", metricType, err) + } + + return nil + } +} + +// WithIndexPath represents the option to set the index path for faiss. +func WithIndexPath(idxPath string) Option { + return func(f *faiss) error { + if len(idxPath) == 0 { + return errors.NewErrIgnoredOption("indexPath") + } + + f.idxPath = idxPath + return nil + } +} diff --git a/internal/core/algorithm/ngt/ngt.go b/internal/core/algorithm/ngt/ngt.go index 46a7ea7984d..51454a3c544 100644 --- a/internal/core/algorithm/ngt/ngt.go +++ b/internal/core/algorithm/ngt/ngt.go @@ -42,11 +42,11 @@ type ( // NGT is core interface. NGT interface { - // Search returns search result as []SearchResult - Search(ctx context.Context, vec []float32, size int, epsilon, radius float32) ([]SearchResult, error) + // Search returns search result as []algorithm.SearchResult + Search(ctx context.Context, vec []float32, size int, epsilon, radius float32) ([]algorithm.SearchResult, error) - // Linear Search returns linear search result as []SearchResult - LinearSearch(ctx context.Context, vec []float32, size int) ([]SearchResult, error) + // Linear Search returns linear search result as []algorithm.SearchResult + LinearSearch(ctx context.Context, vec []float32, size int) ([]algorithm.SearchResult, error) // Insert returns NGT object id. // This only stores not indexing, you must call CreateIndex and SaveIndex. @@ -396,8 +396,8 @@ func (n *ngt) loadObjectSpace() error { return nil } -// Search returns search result as []SearchResult. -func (n *ngt) Search(ctx context.Context, vec []float32, size int, epsilon, radius float32) (result []SearchResult, err error) { +// Search returns search result as []algorithm.SearchResult. +func (n *ngt) Search(ctx context.Context, vec []float32, size int, epsilon, radius float32) (result []algorithm.SearchResult, err error) { if len(vec) != int(n.dimension) { return nil, errors.ErrIncompatibleDimensionSize(len(vec), int(n.dimension)) } @@ -446,7 +446,7 @@ func (n *ngt) Search(ctx context.Context, vec []float32, size int, epsilon, radi } return nil, errors.ErrEmptySearchResult } - result = make([]SearchResult, rsize) + result = make([]algorithm.SearchResult, rsize) for i := range result { select { @@ -457,10 +457,10 @@ func (n *ngt) Search(ctx context.Context, vec []float32, size int, epsilon, radi } d := C.ngt_get_result(results, C.uint32_t(i), ne.err) if d.id == 0 && d.distance == 0 { - result[i] = SearchResult{0, 0, n.newGoError(ne)} + result[i] = algorithm.SearchResult{0, 0, n.newGoError(ne)} ne = n.GetErrorBuffer() } else { - result[i] = SearchResult{uint32(d.id), float32(d.distance), nil} + result[i] = algorithm.SearchResult{uint32(d.id), float32(d.distance), nil} } } n.PutErrorBuffer(ne) @@ -468,8 +468,8 @@ func (n *ngt) Search(ctx context.Context, vec []float32, size int, epsilon, radi return result, nil } -// Linear Search returns linear search result as []SearchResult. -func (n *ngt) LinearSearch(ctx context.Context, vec []float32, size int) (result []SearchResult, err error) { +// Linear Search returns linear search result as []algorithm.SearchResult. +func (n *ngt) LinearSearch(ctx context.Context, vec []float32, size int) (result []algorithm.SearchResult, err error) { if len(vec) != int(n.dimension) { return nil, errors.ErrIncompatibleDimensionSize(len(vec), int(n.dimension)) } @@ -510,7 +510,7 @@ func (n *ngt) LinearSearch(ctx context.Context, vec []float32, size int) (result } return nil, errors.ErrEmptySearchResult } - result = make([]SearchResult, rsize) + result = make([]algorithm.SearchResult, rsize) for i := range result { select { case <-ctx.Done(): @@ -520,10 +520,18 @@ func (n *ngt) LinearSearch(ctx context.Context, vec []float32, size int) (result } d := C.ngt_get_result(results, C.uint32_t(i), ne.err) if d.id == 0 && d.distance == 0 { - result[i] = SearchResult{0, 0, n.newGoError(ne)} + result[i] = algorithm.SearchResult{ + ID: 0, + Distance: 0, + Error: n.newGoError(ne), + } ne = n.GetErrorBuffer() } else { - result[i] = SearchResult{uint32(d.id), float32(d.distance), nil} + result[i] = algorithm.SearchResult{ + ID: uint32(d.id), + Distance: float32(d.distance), + Error: nil, + } } } n.PutErrorBuffer(ne) diff --git a/internal/core/algorithm/ngt/ngt_test.go b/internal/core/algorithm/ngt/ngt_test.go index 9934ddab895..83ef76b23ad 100644 --- a/internal/core/algorithm/ngt/ngt_test.go +++ b/internal/core/algorithm/ngt/ngt_test.go @@ -1382,7 +1382,7 @@ func Test_ngt_Search(t *testing.T) { poolSize uint32 } type want struct { - want []SearchResult + want []algorithm.SearchResult err error } type test struct { @@ -1391,7 +1391,7 @@ func Test_ngt_Search(t *testing.T) { fields fields createFunc func(t *testing.T, fields fields) (NGT, error) want want - checkFunc func(want, []SearchResult, NGT, error) error + checkFunc func(want, []algorithm.SearchResult, NGT, error) error beforeFunc func(args) afterFunc func(*testing.T, NGT) error } @@ -1409,7 +1409,7 @@ func Test_ngt_Search(t *testing.T) { WithDimension(fields.dimension), ) } - defaultCheckFunc := func(w want, got []SearchResult, n NGT, err error) error { + defaultCheckFunc := func(w want, got []algorithm.SearchResult, n NGT, err error) error { if !errors.Is(err, w.err) { return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err) } @@ -1461,7 +1461,7 @@ func Test_ngt_Search(t *testing.T) { return insertCreateFunc(t, fields, [][]float32{vec}, 1) }, want: want{ - want: []SearchResult{ + want: []algorithm.SearchResult{ {ID: uint32(1), Distance: 0}, }, }, @@ -1489,7 +1489,7 @@ func Test_ngt_Search(t *testing.T) { return insertCreateFunc(t, fields, [][]float32{iv}, 1) }, want: want{ - want: []SearchResult{ + want: []algorithm.SearchResult{ {ID: uint32(1), Distance: 1}, }, }, @@ -1521,7 +1521,7 @@ func Test_ngt_Search(t *testing.T) { return insertCreateFunc(t, fields, ivs, 1) }, want: want{ - want: []SearchResult{ + want: []algorithm.SearchResult{ {ID: uint32(1), Distance: 3}, {ID: uint32(2), Distance: 3}, {ID: uint32(3), Distance: 3}, @@ -1562,7 +1562,7 @@ func Test_ngt_Search(t *testing.T) { return insertCreateFunc(t, fields, ivs, 1) }, want: want{ - want: []SearchResult{ + want: []algorithm.SearchResult{ {ID: uint32(1), Distance: 3}, {ID: uint32(2), Distance: 3}, {ID: uint32(3), Distance: 3}, @@ -1603,7 +1603,7 @@ func Test_ngt_Search(t *testing.T) { return insertCreateFunc(t, fields, ivs, 1) }, want: want{ - want: []SearchResult{ + want: []algorithm.SearchResult{ {ID: uint32(9), Distance: 0}, {ID: uint32(10), Distance: 0}, {ID: uint32(7), Distance: 3}, @@ -1638,7 +1638,7 @@ func Test_ngt_Search(t *testing.T) { return insertCreateFunc(t, fields, [][]float32{vec}, 1) }, want: want{ - want: []SearchResult{ + want: []algorithm.SearchResult{ {ID: uint32(1), Distance: 0}, }, }, @@ -1666,7 +1666,7 @@ func Test_ngt_Search(t *testing.T) { return insertCreateFunc(t, fields, [][]float32{iv}, 1) }, want: want{ - want: []SearchResult{ + want: []algorithm.SearchResult{ {ID: uint32(1), Distance: 1}, }, }, @@ -1698,7 +1698,7 @@ func Test_ngt_Search(t *testing.T) { return insertCreateFunc(t, fields, ivs, 1) }, want: want{ - want: []SearchResult{ + want: []algorithm.SearchResult{ {ID: uint32(1), Distance: 3}, {ID: uint32(2), Distance: 3}, }, @@ -1738,7 +1738,7 @@ func Test_ngt_Search(t *testing.T) { return insertCreateFunc(t, fields, ivs, 1) }, want: want{ - want: []SearchResult{ + want: []algorithm.SearchResult{ {ID: uint32(2), Distance: 0}, {ID: uint32(1), Distance: 3}, {ID: uint32(3), Distance: 3}, @@ -1779,7 +1779,7 @@ func Test_ngt_Search(t *testing.T) { return insertCreateFunc(t, fields, ivs, 1) }, want: want{ - want: []SearchResult{ + want: []algorithm.SearchResult{ {ID: uint32(2), Distance: 0}, {ID: uint32(1), Distance: 3}, {ID: uint32(3), Distance: 3}, diff --git a/internal/errors/faiss.go b/internal/errors/faiss.go new file mode 100644 index 00000000000..3ae63bd6692 --- /dev/null +++ b/internal/errors/faiss.go @@ -0,0 +1,32 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Package errors provides error types and function +package errors + +type FaissError struct { + Msg string +} + +func NewFaissError(msg string) error { + return FaissError{ + Msg: msg, + } +} + +func (f FaissError) Error() string { + return f.Msg +} diff --git a/internal/info/info.go b/internal/info/info.go index a9dcf0cd3c2..c436a6e19da 100644 --- a/internal/info/info.go +++ b/internal/info/info.go @@ -57,7 +57,7 @@ type Detail struct { GoArch string `json:"go_arch,omitempty" yaml:"go_arch,omitempty"` GoRoot string `json:"go_root,omitempty" yaml:"go_root,omitempty"` CGOEnabled string `json:"cgo_enabled,omitempty" yaml:"cgo_enabled,omitempty"` - NGTVersion string `json:"ngt_version,omitempty" yaml:"ngt_version,omitempty"` + AlgorithmInfo string `json:"algorithm_info,omitempty" yaml:"algorithm_info,omitempty"` BuildCPUInfoFlags []string `json:"build_cpu_info_flags,omitempty" yaml:"build_cpu_info_flags,omitempty"` StackTrace []StackTrace `json:"stack_trace,omitempty" yaml:"stack_trace,omitempty"` } @@ -89,8 +89,8 @@ var ( GoRoot string // CGOEnabled represent the cgo is enable or not to build Vald. CGOEnabled string - // NGTVersion represent the NGT version in Vald. - NGTVersion string + // AlgorithmInfo represent the NGT version in Vald. + AlgorithmInfo string // BuildCPUInfoFlags represent the CPU info flags to build Vald. BuildCPUInfoFlags string @@ -146,7 +146,7 @@ func New(opts ...Option) (Info, error) { GoArch: GoArch, GoRoot: GoRoot, CGOEnabled: CGOEnabled, - NGTVersion: NGTVersion, + AlgorithmInfo: AlgorithmInfo, BuildCPUInfoFlags: strings.Split(strings.TrimSpace(BuildCPUInfoFlags), " "), StackTrace: nil, }, @@ -329,28 +329,28 @@ func (i info) getDetail() Detail { func (i *info) prepare() { i.prepOnce.Do(func() { - if len(i.detail.GitCommit) == 0 { + if i.detail.GitCommit == "" { i.detail.GitCommit = "main" } - if len(Version) == 0 && len(i.detail.Version) == 0 { + if Version == "" && i.detail.Version == "" { i.detail.Version = GitCommit } - if len(i.detail.BuildTime) == 0 { + if i.detail.BuildTime == "" { i.detail.BuildTime = BuildTime } - if len(i.detail.GoVersion) == 0 { + if i.detail.GoVersion == "" { i.detail.GoVersion = runtime.Version() } - if len(i.detail.GoOS) == 0 { + if i.detail.GoOS == "" { i.detail.GoOS = runtime.GOOS } - if len(i.detail.GoArch) == 0 { + if i.detail.GoArch == "" { i.detail.GoArch = runtime.GOARCH } - if len(i.detail.GoRoot) == 0 { + if i.detail.GoRoot == "" { i.detail.GoRoot = runtime.GOROOT() } - if len(i.detail.CGOEnabled) == 0 && len(CGOEnabled) != 0 { + if i.detail.CGOEnabled == "" && CGOEnabled != "" { i.detail.CGOEnabled = CGOEnabled } switch i.detail.CGOEnabled { @@ -361,13 +361,13 @@ func (i *info) prepare() { default: i.detail.CGOEnabled = cgoUnknown } - if len(i.detail.NGTVersion) == 0 && len(NGTVersion) != 0 { - i.detail.NGTVersion = NGTVersion + if i.detail.AlgorithmInfo == "" && AlgorithmInfo != "" { + i.detail.AlgorithmInfo = AlgorithmInfo } - if len(i.detail.BuildCPUInfoFlags) == 0 && len(BuildCPUInfoFlags) != 0 { + if len(i.detail.BuildCPUInfoFlags) == 0 && BuildCPUInfoFlags != "" { i.detail.BuildCPUInfoFlags = strings.Split(strings.TrimSpace(BuildCPUInfoFlags), " ") } - if len(i.baseURL) == 0 { + if i.baseURL == "" { i.baseURL = "https://" + valdRepo + "/tree/" + i.detail.GitCommit } }) diff --git a/internal/info/info_test.go b/internal/info/info_test.go index ca0c7b2330a..0d8e1e04b36 100644 --- a/internal/info/info_test.go +++ b/internal/info/info_test.go @@ -96,7 +96,7 @@ func TestString(t *testing.T) { GoArch: runtime.GOARCH, GoRoot: runtime.GOROOT(), CGOEnabled: cgoUnknown, - NGTVersion: "", + AlgorithmInfo: "", BuildCPUInfoFlags: nil, StackTrace: nil, }, @@ -128,7 +128,7 @@ func TestString(t *testing.T) { GoArch: runtime.GOARCH, GoRoot: runtime.GOROOT(), CGOEnabled: cgoUnknown, - NGTVersion: "", + AlgorithmInfo: "", BuildCPUInfoFlags: nil, StackTrace: nil, }, @@ -200,7 +200,7 @@ func TestGet(t *testing.T) { GoArch: runtime.GOARCH, GoRoot: runtime.GOROOT(), CGOEnabled: cgoUnknown, - NGTVersion: "", + AlgorithmInfo: "", BuildCPUInfoFlags: []string{""}, StackTrace: make([]StackTrace, 0, 10), }, @@ -270,7 +270,7 @@ func TestInit(t *testing.T) { version := Version buildTime := BuildTime cgoEnabled := CGOEnabled - ngtVersion := NGTVersion + ngtVersion := AlgorithmInfo buildCPUInfoFlags := BuildCPUInfoFlags tests := []test{ { @@ -282,16 +282,16 @@ func TestInit(t *testing.T) { want: &info{ baseURL: "https://github.com/vdaas/vald/tree/gitcommit", detail: Detail{ - GitCommit: "gitcommit", - ServerName: "gateway", - Version: "gitcommit", - BuildTime: "1s", - GoVersion: runtime.Version(), - GoOS: runtime.GOOS, - GoArch: runtime.GOARCH, - GoRoot: runtime.GOROOT(), - CGOEnabled: cgoTrue, - NGTVersion: "v1.11.6", + GitCommit: "gitcommit", + ServerName: "gateway", + Version: "gitcommit", + BuildTime: "1s", + GoVersion: runtime.Version(), + GoOS: runtime.GOOS, + GoArch: runtime.GOARCH, + GoRoot: runtime.GOROOT(), + CGOEnabled: cgoTrue, + AlgorithmInfo: "v1.11.6", BuildCPUInfoFlags: []string{ "avx512f", "avx512dq", }, @@ -311,7 +311,7 @@ func TestInit(t *testing.T) { Version = "" BuildTime = "1s" CGOEnabled = cgoTrue - NGTVersion = "v1.11.6" + AlgorithmInfo = "v1.11.6" BuildCPUInfoFlags = "\t\tavx512f avx512dq\t" }, afterFunc: func(t *testing.T, _ args) { @@ -323,7 +323,7 @@ func TestInit(t *testing.T) { Version = version BuildTime = buildTime CGOEnabled = cgoEnabled - NGTVersion = ngtVersion + AlgorithmInfo = ngtVersion BuildCPUInfoFlags = buildCPUInfoFlags }, }, @@ -336,16 +336,16 @@ func TestInit(t *testing.T) { want: &info{ baseURL: "https://github.com/vdaas/vald/tree/gitcommit", detail: Detail{ - GitCommit: "gitcommit", - ServerName: "", - Version: "gitcommit", - BuildTime: "1s", - GoVersion: runtime.Version(), - GoOS: runtime.GOOS, - GoArch: runtime.GOARCH, - GoRoot: runtime.GOROOT(), - CGOEnabled: cgoTrue, - NGTVersion: "v1.11.6", + GitCommit: "gitcommit", + ServerName: "", + Version: "gitcommit", + BuildTime: "1s", + GoVersion: runtime.Version(), + GoOS: runtime.GOOS, + GoArch: runtime.GOARCH, + GoRoot: runtime.GOROOT(), + CGOEnabled: cgoTrue, + AlgorithmInfo: "v1.11.6", BuildCPUInfoFlags: []string{ "avx512f", "avx512dq", }, @@ -365,7 +365,7 @@ func TestInit(t *testing.T) { Version = "" BuildTime = "1s" CGOEnabled = cgoTrue - NGTVersion = "v1.11.6" + AlgorithmInfo = "v1.11.6" BuildCPUInfoFlags = "\t\tavx512f avx512dq\t" }, afterFunc: func(t *testing.T, _ args) { @@ -377,7 +377,7 @@ func TestInit(t *testing.T) { Version = version BuildTime = buildTime CGOEnabled = cgoEnabled - NGTVersion = ngtVersion + AlgorithmInfo = ngtVersion BuildCPUInfoFlags = buildCPUInfoFlags }, }, @@ -463,7 +463,7 @@ func TestNew(t *testing.T) { GoArch: runtime.GOARCH, GoRoot: runtime.GOROOT(), CGOEnabled: cgoUnknown, - NGTVersion: NGTVersion, + AlgorithmInfo: AlgorithmInfo, BuildCPUInfoFlags: strings.Split(strings.TrimSpace(BuildCPUInfoFlags), " "), StackTrace: nil, }, @@ -496,7 +496,7 @@ func TestNew(t *testing.T) { GoArch: runtime.GOARCH, GoRoot: runtime.GOROOT(), CGOEnabled: cgoUnknown, - NGTVersion: NGTVersion, + AlgorithmInfo: AlgorithmInfo, BuildCPUInfoFlags: strings.Split(strings.TrimSpace(BuildCPUInfoFlags), " "), }, prepOnce: func() (o sync.Once) { @@ -532,7 +532,7 @@ func TestNew(t *testing.T) { GoArch: runtime.GOARCH, GoRoot: runtime.GOROOT(), CGOEnabled: cgoUnknown, - NGTVersion: NGTVersion, + AlgorithmInfo: AlgorithmInfo, BuildCPUInfoFlags: strings.Split(strings.TrimSpace(BuildCPUInfoFlags), " "), StackTrace: nil, }, @@ -567,7 +567,7 @@ func TestNew(t *testing.T) { GoArch: runtime.GOARCH, GoRoot: runtime.GOROOT(), CGOEnabled: cgoUnknown, - NGTVersion: NGTVersion, + AlgorithmInfo: AlgorithmInfo, BuildCPUInfoFlags: strings.Split(strings.TrimSpace(BuildCPUInfoFlags), " "), StackTrace: nil, }, @@ -666,7 +666,7 @@ func Test_info_String(t *testing.T) { GoArch: "goarch", GoRoot: "/usr/local/go", CGOEnabled: cgoTrue, - NGTVersion: "1.2", + AlgorithmInfo: "1.2", BuildCPUInfoFlags: nil, StackTrace: []StackTrace{ { @@ -689,7 +689,7 @@ func Test_info_String(t *testing.T) { GoArch: "goarch", GoRoot: "/usr/local/go", CGOEnabled: cgoTrue, - NGTVersion: "1.2", + AlgorithmInfo: "1.2", BuildCPUInfoFlags: nil, StackTrace: []StackTrace{ { @@ -715,7 +715,7 @@ func Test_info_String(t *testing.T) { GoArch: "goarch", GoRoot: "/usr/local/go", CGOEnabled: cgoTrue, - NGTVersion: "1.2", + AlgorithmInfo: "1.2", BuildCPUInfoFlags: nil, StackTrace: []StackTrace{}, }, @@ -734,7 +734,7 @@ func Test_info_String(t *testing.T) { GoArch: "goarch", GoRoot: "/usr/local/go", CGOEnabled: cgoTrue, - NGTVersion: "1.2", + AlgorithmInfo: "1.2", BuildCPUInfoFlags: nil, StackTrace: nil, }, @@ -780,7 +780,7 @@ func TestDetail_String(t *testing.T) { GoOS string GoArch string CGOEnabled string - NGTVersion string + AlgorithmInfo string BuildCPUInfoFlags []string StackTrace []StackTrace } @@ -824,7 +824,7 @@ func TestDetail_String(t *testing.T) { GoOS: "goos", GoArch: "goarch", CGOEnabled: cgoTrue, - NGTVersion: "1.2", + AlgorithmInfo: "1.2", BuildCPUInfoFlags: nil, StackTrace: []StackTrace{ { @@ -845,7 +845,7 @@ func TestDetail_String(t *testing.T) { GoOS: "goos", GoArch: "goarch", CGOEnabled: cgoTrue, - NGTVersion: "1.2", + AlgorithmInfo: "1.2", BuildCPUInfoFlags: nil, StackTrace: []StackTrace{ { @@ -869,7 +869,7 @@ func TestDetail_String(t *testing.T) { GoOS: "goos", GoArch: "goarch", CGOEnabled: cgoTrue, - NGTVersion: "1.2", + AlgorithmInfo: "1.2", BuildCPUInfoFlags: nil, StackTrace: []StackTrace{}, }, @@ -883,7 +883,7 @@ func TestDetail_String(t *testing.T) { GoOS: "goos", GoArch: "goarch", CGOEnabled: cgoTrue, - NGTVersion: "1.2", + AlgorithmInfo: "1.2", BuildCPUInfoFlags: nil, StackTrace: nil, }, @@ -914,7 +914,7 @@ func TestDetail_String(t *testing.T) { GoOS: test.fields.GoOS, GoArch: test.fields.GoArch, CGOEnabled: test.fields.CGOEnabled, - NGTVersion: test.fields.NGTVersion, + AlgorithmInfo: test.fields.AlgorithmInfo, BuildCPUInfoFlags: test.fields.BuildCPUInfoFlags, StackTrace: test.fields.StackTrace, } @@ -960,17 +960,17 @@ func Test_info_Get(t *testing.T) { }, want: want{ want: Detail{ - ServerName: "", - Version: "", - GitCommit: GitCommit, - GoVersion: runtime.Version(), - GoOS: runtime.GOOS, - GoArch: runtime.GOARCH, - GoRoot: runtime.GOROOT(), - CGOEnabled: cgoUnknown, - StackTrace: []StackTrace{}, - NGTVersion: NGTVersion, - BuildTime: BuildTime, + ServerName: "", + Version: "", + GitCommit: GitCommit, + GoVersion: runtime.Version(), + GoOS: runtime.GOOS, + GoArch: runtime.GOARCH, + GoRoot: runtime.GOROOT(), + CGOEnabled: cgoUnknown, + StackTrace: []StackTrace{}, + AlgorithmInfo: AlgorithmInfo, + BuildTime: BuildTime, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1015,8 +1015,8 @@ func Test_info_Get(t *testing.T) { Line: 100, }, }, - NGTVersion: NGTVersion, - BuildTime: BuildTime, + AlgorithmInfo: AlgorithmInfo, + BuildTime: BuildTime, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1061,8 +1061,8 @@ func Test_info_Get(t *testing.T) { Line: 100, }, }, - NGTVersion: NGTVersion, - BuildTime: BuildTime, + AlgorithmInfo: AlgorithmInfo, + BuildTime: BuildTime, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1106,8 +1106,8 @@ func Test_info_Get(t *testing.T) { Line: 100, }, }, - NGTVersion: NGTVersion, - BuildTime: BuildTime, + AlgorithmInfo: AlgorithmInfo, + BuildTime: BuildTime, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1151,8 +1151,8 @@ func Test_info_Get(t *testing.T) { Line: 100, }, }, - NGTVersion: NGTVersion, - BuildTime: BuildTime, + AlgorithmInfo: AlgorithmInfo, + BuildTime: BuildTime, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1196,8 +1196,8 @@ func Test_info_Get(t *testing.T) { Line: 100, }, }, - NGTVersion: NGTVersion, - BuildTime: BuildTime, + AlgorithmInfo: AlgorithmInfo, + BuildTime: BuildTime, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1241,8 +1241,8 @@ func Test_info_Get(t *testing.T) { Line: 100, }, }, - NGTVersion: NGTVersion, - BuildTime: BuildTime, + AlgorithmInfo: AlgorithmInfo, + BuildTime: BuildTime, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1318,15 +1318,15 @@ func Test_info_prepare(t *testing.T) { want: info{ baseURL: "https://github.com/vdaas/vald/tree/main", detail: Detail{ - GitCommit: GitCommit, - Version: "", - BuildTime: BuildTime, - GoVersion: runtime.Version(), - GoOS: runtime.GOOS, - GoArch: runtime.GOARCH, - GoRoot: runtime.GOROOT(), - CGOEnabled: cgoUnknown, - NGTVersion: NGTVersion, + GitCommit: GitCommit, + Version: "", + BuildTime: BuildTime, + GoVersion: runtime.Version(), + GoOS: runtime.GOOS, + GoArch: runtime.GOARCH, + GoRoot: runtime.GOROOT(), + CGOEnabled: cgoUnknown, + AlgorithmInfo: AlgorithmInfo, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1348,15 +1348,15 @@ func Test_info_prepare(t *testing.T) { want: info{ baseURL: "https://github.com/vdaas/vald/tree/internal", detail: Detail{ - GitCommit: "internal", - Version: "", - BuildTime: BuildTime, - GoVersion: runtime.Version(), - GoOS: runtime.GOOS, - GoArch: runtime.GOARCH, - GoRoot: runtime.GOROOT(), - CGOEnabled: cgoUnknown, - NGTVersion: NGTVersion, + GitCommit: "internal", + Version: "", + BuildTime: BuildTime, + GoVersion: runtime.Version(), + GoOS: runtime.GOOS, + GoArch: runtime.GOARCH, + GoRoot: runtime.GOROOT(), + CGOEnabled: cgoUnknown, + AlgorithmInfo: AlgorithmInfo, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1378,15 +1378,15 @@ func Test_info_prepare(t *testing.T) { want: info{ baseURL: "https://github.com/vdaas/vald/tree/main", detail: Detail{ - GitCommit: GitCommit, - Version: "v1.0.0", - BuildTime: BuildTime, - GoVersion: runtime.Version(), - GoOS: runtime.GOOS, - GoArch: runtime.GOARCH, - GoRoot: runtime.GOROOT(), - CGOEnabled: cgoUnknown, - NGTVersion: NGTVersion, + GitCommit: GitCommit, + Version: "v1.0.0", + BuildTime: BuildTime, + GoVersion: runtime.Version(), + GoOS: runtime.GOOS, + GoArch: runtime.GOARCH, + GoRoot: runtime.GOROOT(), + CGOEnabled: cgoUnknown, + AlgorithmInfo: AlgorithmInfo, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1408,15 +1408,15 @@ func Test_info_prepare(t *testing.T) { want: info{ baseURL: "https://github.com/vdaas/vald/tree/main", detail: Detail{ - GitCommit: GitCommit, - Version: "", - BuildTime: "10s", - GoVersion: runtime.Version(), - GoOS: runtime.GOOS, - GoArch: runtime.GOARCH, - GoRoot: runtime.GOROOT(), - CGOEnabled: cgoUnknown, - NGTVersion: NGTVersion, + GitCommit: GitCommit, + Version: "", + BuildTime: "10s", + GoVersion: runtime.Version(), + GoOS: runtime.GOOS, + GoArch: runtime.GOARCH, + GoRoot: runtime.GOROOT(), + CGOEnabled: cgoUnknown, + AlgorithmInfo: AlgorithmInfo, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1438,15 +1438,15 @@ func Test_info_prepare(t *testing.T) { want: info{ baseURL: "https://github.com/vdaas/vald/tree/main", detail: Detail{ - GitCommit: GitCommit, - Version: "", - BuildTime: BuildTime, - GoVersion: "1.14", - GoOS: runtime.GOOS, - GoArch: runtime.GOARCH, - GoRoot: runtime.GOROOT(), - CGOEnabled: cgoUnknown, - NGTVersion: NGTVersion, + GitCommit: GitCommit, + Version: "", + BuildTime: BuildTime, + GoVersion: "1.14", + GoOS: runtime.GOOS, + GoArch: runtime.GOARCH, + GoRoot: runtime.GOROOT(), + CGOEnabled: cgoUnknown, + AlgorithmInfo: AlgorithmInfo, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1468,15 +1468,15 @@ func Test_info_prepare(t *testing.T) { want: info{ baseURL: "https://github.com/vdaas/vald/tree/main", detail: Detail{ - GitCommit: GitCommit, - Version: "", - BuildTime: BuildTime, - GoVersion: runtime.Version(), - GoOS: "linux", - GoArch: runtime.GOARCH, - GoRoot: runtime.GOROOT(), - CGOEnabled: cgoUnknown, - NGTVersion: NGTVersion, + GitCommit: GitCommit, + Version: "", + BuildTime: BuildTime, + GoVersion: runtime.Version(), + GoOS: "linux", + GoArch: runtime.GOARCH, + GoRoot: runtime.GOROOT(), + CGOEnabled: cgoUnknown, + AlgorithmInfo: AlgorithmInfo, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1498,15 +1498,15 @@ func Test_info_prepare(t *testing.T) { want: info{ baseURL: "https://github.com/vdaas/vald/tree/main", detail: Detail{ - GitCommit: GitCommit, - Version: "", - BuildTime: BuildTime, - GoVersion: runtime.Version(), - GoOS: runtime.GOOS, - GoArch: "amd", - GoRoot: runtime.GOROOT(), - CGOEnabled: cgoUnknown, - NGTVersion: NGTVersion, + GitCommit: GitCommit, + Version: "", + BuildTime: BuildTime, + GoVersion: runtime.Version(), + GoOS: runtime.GOOS, + GoArch: "amd", + GoRoot: runtime.GOROOT(), + CGOEnabled: cgoUnknown, + AlgorithmInfo: AlgorithmInfo, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1528,15 +1528,15 @@ func Test_info_prepare(t *testing.T) { want: info{ baseURL: "https://github.com/vdaas/vald/tree/main", detail: Detail{ - GitCommit: GitCommit, - Version: "", - BuildTime: BuildTime, - GoVersion: runtime.Version(), - GoOS: runtime.GOOS, - GoArch: runtime.GOARCH, - GoRoot: runtime.GOROOT(), - CGOEnabled: cgoTrue, - NGTVersion: NGTVersion, + GitCommit: GitCommit, + Version: "", + BuildTime: BuildTime, + GoVersion: runtime.Version(), + GoOS: runtime.GOOS, + GoArch: runtime.GOARCH, + GoRoot: runtime.GOROOT(), + CGOEnabled: cgoTrue, + AlgorithmInfo: AlgorithmInfo, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1558,15 +1558,15 @@ func Test_info_prepare(t *testing.T) { want: info{ baseURL: "https://github.com/vdaas/vald/tree/main", detail: Detail{ - GitCommit: GitCommit, - Version: "", - BuildTime: BuildTime, - GoVersion: runtime.Version(), - GoOS: runtime.GOOS, - GoArch: runtime.GOARCH, - GoRoot: runtime.GOROOT(), - CGOEnabled: cgoFalse, - NGTVersion: NGTVersion, + GitCommit: GitCommit, + Version: "", + BuildTime: BuildTime, + GoVersion: runtime.Version(), + GoOS: runtime.GOOS, + GoArch: runtime.GOARCH, + GoRoot: runtime.GOROOT(), + CGOEnabled: cgoFalse, + AlgorithmInfo: AlgorithmInfo, BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1578,25 +1578,25 @@ func Test_info_prepare(t *testing.T) { }, }, { - name: "set success with NGTVersion set", + name: "set success with AlgorithmInfo set", fields: fields{ detail: Detail{ - NGTVersion: "v1.11.5", + AlgorithmInfo: "v1.11.5", }, }, want: want{ want: info{ baseURL: "https://github.com/vdaas/vald/tree/main", detail: Detail{ - GitCommit: GitCommit, - Version: "", - BuildTime: BuildTime, - GoVersion: runtime.Version(), - GoOS: runtime.GOOS, - GoArch: runtime.GOARCH, - GoRoot: runtime.GOROOT(), - CGOEnabled: cgoUnknown, - NGTVersion: "v1.11.5", + GitCommit: GitCommit, + Version: "", + BuildTime: BuildTime, + GoVersion: runtime.Version(), + GoOS: runtime.GOOS, + GoArch: runtime.GOARCH, + GoRoot: runtime.GOROOT(), + CGOEnabled: cgoUnknown, + AlgorithmInfo: "v1.11.5", BuildCPUInfoFlags: func() []string { if len(BuildCPUInfoFlags) == 0 { return nil @@ -1626,7 +1626,7 @@ func Test_info_prepare(t *testing.T) { GoArch: runtime.GOARCH, GoRoot: runtime.GOROOT(), CGOEnabled: cgoUnknown, - NGTVersion: NGTVersion, + AlgorithmInfo: AlgorithmInfo, BuildCPUInfoFlags: []string{"avx512f"}, }, }, diff --git a/internal/k8s/reconciler.go b/internal/k8s/reconciler.go index ecd6391c131..41aff1b9247 100644 --- a/internal/k8s/reconciler.go +++ b/internal/k8s/reconciler.go @@ -32,6 +32,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client/config" "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/manager" + mserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" "sigs.k8s.io/controller-runtime/pkg/reconcile" ) @@ -88,9 +89,9 @@ func New(opts ...Option) (cl Controller, err error) { c.mgr, err = manager.New( cfg, manager.Options{ - Scheme: runtime.NewScheme(), - LeaderElection: c.leaderElection, - MetricsBindAddress: c.merticsAddr, + Scheme: runtime.NewScheme(), + LeaderElection: c.leaderElection, + Metrics: mserver.Options{BindAddress: c.merticsAddr}, }, ) if err != nil { diff --git a/internal/k8s/vald/benchmark/scenario/scenario.go b/internal/k8s/vald/benchmark/scenario/scenario.go index 19e9ee655da..eb1d7f89ac3 100644 --- a/internal/k8s/vald/benchmark/scenario/scenario.go +++ b/internal/k8s/vald/benchmark/scenario/scenario.go @@ -69,7 +69,6 @@ func (r *reconciler) Reconcile(ctx context.Context, _ reconcile.Request) (res re bs := new(v1.ValdBenchmarkScenarioList) err = r.mgr.GetClient().List(ctx, bs, r.lopts...) - if err != nil { if r.onError != nil { r.onError(err) diff --git a/internal/net/dialer.go b/internal/net/dialer.go index d747c2bd6f2..ff6571043a0 100644 --- a/internal/net/dialer.go +++ b/internal/net/dialer.go @@ -170,7 +170,7 @@ func (d *dialer) lookup(ctx context.Context, host string) (dc *dialerCache, err dc = &dialerCache{ ips: ips, } - log.Infof("lookup succeed %v", dc.ips) + log.Debugf("lookup succeed for %s, ips: %v", host, dc.ips) if d.enableDNSCache { d.dnsCache.Set(host, dc) } diff --git a/internal/net/grpc/admin/admin.go b/internal/net/grpc/admin/admin.go new file mode 100644 index 00000000000..66e320bc1bf --- /dev/null +++ b/internal/net/grpc/admin/admin.go @@ -0,0 +1,24 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Package admin provides grpc admin metrics registration API for providing grpc metrics endpoints +package admin + +import ( + "google.golang.org/grpc/admin" +) + +var Register = admin.Register diff --git a/internal/net/grpc/errdetails/errdetails.go b/internal/net/grpc/errdetails/errdetails.go index b3dc2550c6a..1b24f34fc61 100644 --- a/internal/net/grpc/errdetails/errdetails.go +++ b/internal/net/grpc/errdetails/errdetails.go @@ -333,7 +333,7 @@ func DebugInfoFromInfoDetail(v *info.Detail) *DebugInfo { "Name:", v.ServerName, ",", "GitCommit:", v.GitCommit, ",", "BuildTime:", v.BuildTime, ",", - "NGT_Version:", v.NGTVersion, ",", + "Algorithm_Info:", v.AlgorithmInfo, ",", "Go_Version:", v.GoVersion, ",", "GOARCH:", v.GoArch, ",", "GOOS:", v.GoOS, ",", diff --git a/internal/net/grpc/interceptor/server/logging/accesslog.go b/internal/net/grpc/interceptor/server/logging/accesslog.go index 488585a2b61..5da857a7586 100644 --- a/internal/net/grpc/interceptor/server/logging/accesslog.go +++ b/internal/net/grpc/interceptor/server/logging/accesslog.go @@ -88,9 +88,9 @@ func AccessLogInterceptor() grpc.UnaryServerInterceptor { if err != nil { entity.Error = err - log.Infod(rpcCompletedMessage, entity) + log.Warn(rpcCompletedMessage, entity) } else { - log.Infod(rpcCompletedMessage, entity) + log.Debug(rpcCompletedMessage, entity) } return resp, err @@ -136,9 +136,9 @@ func AccessLogStreamInterceptor() grpc.StreamServerInterceptor { if err != nil { entity.Error = err - log.Infod(rpcCompletedMessage, entity) + log.Warn(rpcCompletedMessage, entity) } else { - log.Infod(rpcCompletedMessage, entity) + log.Debug(rpcCompletedMessage, entity) } return err diff --git a/internal/net/grpc/interceptor/server/metric/metric.go b/internal/net/grpc/interceptor/server/metric/metric.go index d6c85149a2a..15ced6c53ee 100644 --- a/internal/net/grpc/interceptor/server/metric/metric.go +++ b/internal/net/grpc/interceptor/server/metric/metric.go @@ -36,7 +36,7 @@ const ( func MetricInterceptors() (grpc.UnaryServerInterceptor, grpc.StreamServerInterceptor, error) { meter := metrics.GetMeter() - latencyHistgram, err := meter.SyncFloat64().Histogram( + latencyHistgram, err := meter.Float64Histogram( latencyMetricsName, metrics.WithDescription("Server latency in milliseconds, by method"), metrics.WithUnit(metrics.Milliseconds), @@ -45,7 +45,7 @@ func MetricInterceptors() (grpc.UnaryServerInterceptor, grpc.StreamServerInterce return nil, nil, errors.Wrap(err, "failed to create latency metric") } - completedRPCCnt, err := meter.SyncInt64().Counter( + completedRPCCnt, err := meter.Int64Counter( completedRPCsMetricsName, metrics.WithDescription("Count of RPCs by method and status"), metrics.WithUnit(metrics.Milliseconds), @@ -56,8 +56,8 @@ func MetricInterceptors() (grpc.UnaryServerInterceptor, grpc.StreamServerInterce record := func(ctx context.Context, method string, err error, latency float64) { attrs := attributesFromError(method, err) - latencyHistgram.Record(ctx, latency, attrs...) - completedRPCCnt.Add(ctx, 1, attrs...) + latencyHistgram.Record(ctx, latency, metrics.WithAttributes(attrs...)) + completedRPCCnt.Add(ctx, 1, metrics.WithAttributes(attrs...)) } return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { now := time.Now() diff --git a/internal/observability/exporter/otlp/otlp.go b/internal/observability/exporter/otlp/otlp.go index b26cd5e04bb..6d906c4e43d 100644 --- a/internal/observability/exporter/otlp/otlp.go +++ b/internal/observability/exporter/otlp/otlp.go @@ -27,12 +27,11 @@ import ( "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc" "go.opentelemetry.io/otel/exporters/otlp/otlptrace" "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" - "go.opentelemetry.io/otel/metric/global" "go.opentelemetry.io/otel/propagation" "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/resource" "go.opentelemetry.io/otel/sdk/trace" - semconv "go.opentelemetry.io/otel/semconv/v1.12.0" + semconv "go.opentelemetry.io/otel/semconv/v1.24.0" ) // Metrics and Trace attribute keys. @@ -123,7 +122,8 @@ func (e *exp) initMeter(ctx context.Context) (err error) { e.metricsExporter, metric.WithInterval(e.mExportInterval), metric.WithTimeout(e.mExportTimeout), - ), e.metricsViews...), + )), + metric.WithView(e.metricsViews...), metric.WithResource(resource.NewWithAttributes( semconv.SchemaURL, e.attributes..., @@ -144,7 +144,7 @@ func (e *exp) Start(ctx context.Context) error { otel.SetTextMapPropagator( propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}), ) - global.SetMeterProvider(e.meterProvider) + otel.SetMeterProvider(e.meterProvider) return nil } diff --git a/internal/observability/metrics/agent/core/faiss/faiss.go b/internal/observability/metrics/agent/core/faiss/faiss.go new file mode 100644 index 00000000000..96d78950938 --- /dev/null +++ b/internal/observability/metrics/agent/core/faiss/faiss.go @@ -0,0 +1,266 @@ +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package faiss + +import ( + "context" + + "github.com/vdaas/vald/internal/observability/metrics" + "github.com/vdaas/vald/pkg/agent/core/faiss/service" + api "go.opentelemetry.io/otel/metric" + view "go.opentelemetry.io/otel/sdk/metric" +) + +const ( + indexCountMetricsName = "agent_core_faiss_index_count" + indexCountMetricsDescription = "Agent Faiss index count" + + uncommittedIndexCountMetricsName = "agent_core_faiss_uncommitted_index_count" + uncommittedIndexCountMetricsDescription = "Agent Faiss index count" + + insertVQueueCountMetricsName = "agent_core_faiss_insert_vqueue_count" + insertVQueueCountMetricsDescription = "Agent Faiss insert vqueue count" + + deleteVQueueCountMetricsName = "agent_core_faiss_delete_vqueue_count" + deleteVQueueCountMetricsDescription = "Agent Faiss delete vqueue count" + + completedCreateIndexTotalMetricsName = "agent_core_faiss_completed_create_index_total" + completedCreateIndexTotalMetricsDescription = "The cumulative count of completed create index execution" + + executedProactiveGCTotalMetricsName = "agent_core_faiss_executed_proactive_gc_total" + executedProactiveGCTotalMetricsDescription = "The cumulative count of proactive GC execution" + + isIndexingMetricsName = "agent_core_faiss_is_indexing" + isIndexingMetricsDescription = "Currently indexing or no" + + isSavingMetricsName = "agent_core_faiss_is_saving" + isSavingMetricsDescription = "Currently saving or not" + + trainCountMetricsName = "agent_core_faiss_train_count" + trainCountMetricsDescription = "Agent Faiss train count" +) + +type faissMetrics struct { + faiss service.Faiss +} + +func New(f service.Faiss) metrics.Metric { + return &faissMetrics{ + faiss: f, + } +} + +func (f *faissMetrics) View() ([]metrics.View, error) { + return []metrics.View{ + view.NewView( + view.Instrument{ + Name: indexCountMetricsName, + Description: indexCountMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: uncommittedIndexCountMetricsName, + Description: uncommittedIndexCountMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: insertVQueueCountMetricsName, + Description: insertVQueueCountMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: deleteVQueueCountMetricsName, + Description: deleteVQueueCountMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: completedCreateIndexTotalMetricsName, + Description: completedCreateIndexTotalMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: executedProactiveGCTotalMetricsName, + Description: executedProactiveGCTotalMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: isIndexingMetricsName, + Description: isIndexingMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: isSavingMetricsName, + Description: isSavingMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: trainCountMetricsName, + Description: trainCountMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + }, nil +} + +func (f *faissMetrics) Register(m metrics.Meter) error { + indexCount, err := m.Int64ObservableGauge( + indexCountMetricsName, + metrics.WithDescription(indexCountMetricsDescription), + metrics.WithUnit(metrics.Dimensionless), + ) + if err != nil { + return err + } + + uncommittedIndexCount, err := m.Int64ObservableGauge( + uncommittedIndexCountMetricsName, + metrics.WithDescription(uncommittedIndexCountMetricsDescription), + metrics.WithUnit(metrics.Dimensionless), + ) + if err != nil { + return err + } + + insertVQueueCount, err := m.Int64ObservableGauge( + insertVQueueCountMetricsName, + metrics.WithDescription(insertVQueueCountMetricsDescription), + metrics.WithUnit(metrics.Dimensionless), + ) + if err != nil { + return err + } + + deleteVQueueCount, err := m.Int64ObservableGauge( + deleteVQueueCountMetricsName, + metrics.WithDescription(deleteVQueueCountMetricsDescription), + metrics.WithUnit(metrics.Dimensionless), + ) + if err != nil { + return err + } + + completedCreateIndexTotal, err := m.Int64ObservableGauge( + completedCreateIndexTotalMetricsName, + metrics.WithDescription(completedCreateIndexTotalMetricsDescription), + metrics.WithUnit(metrics.Dimensionless), + ) + if err != nil { + return err + } + + executedProactiveGCTotal, err := m.Int64ObservableGauge( + executedProactiveGCTotalMetricsName, + metrics.WithDescription(executedProactiveGCTotalMetricsDescription), + metrics.WithUnit(metrics.Dimensionless), + ) + if err != nil { + return err + } + + isIndexing, err := m.Int64ObservableGauge( + isIndexingMetricsName, + metrics.WithDescription(isIndexingMetricsDescription), + metrics.WithUnit(metrics.Dimensionless), + ) + if err != nil { + return err + } + + isSaving, err := m.Int64ObservableGauge( + isSavingMetricsName, + metrics.WithDescription(isSavingMetricsDescription), + metrics.WithUnit(metrics.Dimensionless), + ) + if err != nil { + return err + } + + trainCount, err := m.Int64ObservableGauge( + trainCountMetricsName, + metrics.WithDescription(trainCountMetricsDescription), + metrics.WithUnit(metrics.Dimensionless), + ) + if err != nil { + return err + } + + _, err = m.RegisterCallback( + func(_ context.Context, o api.Observer) error { + var indexing int64 + if f.faiss.IsIndexing() { + indexing = 1 + } + var saving int64 + if f.faiss.IsSaving() { + saving = 1 + } + + o.ObserveInt64(indexCount, int64(f.faiss.Len())) + o.ObserveInt64(uncommittedIndexCount, int64(f.faiss.InsertVQueueBufferLen()+f.faiss.DeleteVQueueBufferLen())) + o.ObserveInt64(insertVQueueCount, int64(f.faiss.InsertVQueueBufferLen())) + o.ObserveInt64(deleteVQueueCount, int64(int64(f.faiss.DeleteVQueueBufferLen()))) + o.ObserveInt64(completedCreateIndexTotal, int64(f.faiss.NumberOfCreateIndexExecution())) + o.ObserveInt64(executedProactiveGCTotal, int64(f.faiss.NumberOfProactiveGCExecution())) + o.ObserveInt64(isIndexing, int64(indexing)) + o.ObserveInt64(isSaving, int64(saving)) + o.ObserveInt64(trainCount, int64(f.faiss.GetTrainSize())) + + return nil + }, + indexCount, + uncommittedIndexCount, + insertVQueueCount, + deleteVQueueCount, + completedCreateIndexTotal, + executedProactiveGCTotal, + isIndexing, + isSaving, + trainCount, + ) + return err +} diff --git a/internal/observability/metrics/agent/core/ngt/ngt.go b/internal/observability/metrics/agent/core/ngt/ngt.go index 52838825e1a..7a000152b60 100644 --- a/internal/observability/metrics/agent/core/ngt/ngt.go +++ b/internal/observability/metrics/agent/core/ngt/ngt.go @@ -18,8 +18,8 @@ import ( "github.com/vdaas/vald/internal/observability/metrics" "github.com/vdaas/vald/pkg/agent/core/ngt/service" - "go.opentelemetry.io/otel/sdk/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/view" + api "go.opentelemetry.io/otel/metric" + view "go.opentelemetry.io/otel/sdk/metric" ) const ( @@ -61,103 +61,85 @@ func New(n service.NGT) metrics.Metric { } } -func (n *ngtMetrics) View() ([]*metrics.View, error) { - indexCount, err := view.New( - view.MatchInstrumentName(indexCountMetricsName), - view.WithSetDescription(indexCountMetricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - uncommittedIndexCount, err := view.New( - view.MatchInstrumentName(uncommittedIndexCountMetricsName), - view.WithSetDescription(uncommittedIndexCountMetricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - insertVQueueCount, err := view.New( - view.MatchInstrumentName(insertVQueueCountMetricsName), - view.WithSetDescription(insertVQueueCountMetricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - deleteVQueueCount, err := view.New( - view.MatchInstrumentName(deleteVQueueCountMetricsName), - view.WithSetDescription(deleteVQueueCountMetricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - completedCreateIndexTotal, err := view.New( - view.MatchInstrumentName(completedCreateIndexTotalMetricsName), - view.WithSetDescription(completedCreateIndexTotalMetricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - executedProactiveGCTotal, err := view.New( - view.MatchInstrumentName(executedProactiveGCTotalMetricsName), - view.WithSetDescription(executedProactiveGCTotalMetricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - isIndexing, err := view.New( - view.MatchInstrumentName(isIndexingMetricsName), - view.WithSetDescription(isIndexingMetricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - isSaving, err := view.New( - view.MatchInstrumentName(isSavingMetricsName), - view.WithSetDescription(isSavingMetricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - brokenIndexCount, err := view.New( - view.MatchInstrumentName(brokenIndexStoreCountMetricsName), - view.WithSetDescription(brokenIndexStoreCountMetricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - return []*metrics.View{ - &indexCount, - &uncommittedIndexCount, - &insertVQueueCount, - &deleteVQueueCount, - &completedCreateIndexTotal, - &executedProactiveGCTotal, - &isIndexing, - &isSaving, - &brokenIndexCount, +func (n *ngtMetrics) View() ([]metrics.View, error) { + return []metrics.View{ + view.NewView( + view.Instrument{ + Name: indexCountMetricsName, + Description: indexCountMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: uncommittedIndexCountMetricsName, + Description: uncommittedIndexCountMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: insertVQueueCountMetricsName, + Description: insertVQueueCountMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: deleteVQueueCountMetricsName, + Description: deleteVQueueCountMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: completedCreateIndexTotalMetricsName, + Description: completedCreateIndexTotalMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: executedProactiveGCTotalMetricsName, + Description: executedProactiveGCTotalMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: isIndexingMetricsName, + Description: isIndexingMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: isSavingMetricsName, + Description: isSavingMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), }, nil } func (n *ngtMetrics) Register(m metrics.Meter) error { - indexCount, err := m.AsyncInt64().Gauge( + indexCount, err := m.Int64ObservableGauge( indexCountMetricsName, metrics.WithDescription(indexCountMetricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -166,7 +148,7 @@ func (n *ngtMetrics) Register(m metrics.Meter) error { return err } - uncommittedIndexCount, err := m.AsyncInt64().Gauge( + uncommittedIndexCount, err := m.Int64ObservableGauge( uncommittedIndexCountMetricsName, metrics.WithDescription(uncommittedIndexCountMetricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -175,7 +157,7 @@ func (n *ngtMetrics) Register(m metrics.Meter) error { return err } - insertVQueueCount, err := m.AsyncInt64().Gauge( + insertVQueueCount, err := m.Int64ObservableGauge( insertVQueueCountMetricsName, metrics.WithDescription(insertVQueueCountMetricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -184,7 +166,7 @@ func (n *ngtMetrics) Register(m metrics.Meter) error { return err } - deleteVQueueCount, err := m.AsyncInt64().Gauge( + deleteVQueueCount, err := m.Int64ObservableGauge( deleteVQueueCountMetricsName, metrics.WithDescription(deleteVQueueCountMetricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -193,7 +175,7 @@ func (n *ngtMetrics) Register(m metrics.Meter) error { return err } - completedCreateIndexTotal, err := m.AsyncInt64().Gauge( + completedCreateIndexTotal, err := m.Int64ObservableGauge( completedCreateIndexTotalMetricsName, metrics.WithDescription(completedCreateIndexTotalMetricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -202,7 +184,7 @@ func (n *ngtMetrics) Register(m metrics.Meter) error { return err } - executedProactiveGCTotal, err := m.AsyncInt64().Gauge( + executedProactiveGCTotal, err := m.Int64ObservableGauge( executedProactiveGCTotalMetricsName, metrics.WithDescription(executedProactiveGCTotalMetricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -211,7 +193,7 @@ func (n *ngtMetrics) Register(m metrics.Meter) error { return err } - isIndexing, err := m.AsyncInt64().Gauge( + isIndexing, err := m.Int64ObservableGauge( isIndexingMetricsName, metrics.WithDescription(isIndexingMetricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -220,7 +202,7 @@ func (n *ngtMetrics) Register(m metrics.Meter) error { return err } - isSaving, err := m.AsyncInt64().Gauge( + isSaving, err := m.Int64ObservableGauge( isSavingMetricsName, metrics.WithDescription(isSavingMetricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -229,47 +211,34 @@ func (n *ngtMetrics) Register(m metrics.Meter) error { return err } - brokenIndexCount, err := m.AsyncInt64().Gauge( - brokenIndexStoreCountMetricsName, - metrics.WithDescription(brokenIndexStoreCountMetricsDescription), - metrics.WithUnit(metrics.Dimensionless), - ) - if err != nil { - return err - } - - return m.RegisterCallback( - []metrics.AsynchronousInstrument{ - indexCount, - uncommittedIndexCount, - insertVQueueCount, - deleteVQueueCount, - completedCreateIndexTotal, - executedProactiveGCTotal, - isIndexing, - isSaving, - brokenIndexCount, - }, - func(ctx context.Context) { + _, err = m.RegisterCallback( + func(_ context.Context, o api.Observer) error { var indexing int64 if n.ngt.IsIndexing() { indexing = 1 } - var saving int64 if n.ngt.IsSaving() { saving = 1 } - - indexCount.Observe(ctx, int64(n.ngt.Len())) - uncommittedIndexCount.Observe(ctx, int64(n.ngt.InsertVQueueBufferLen()+n.ngt.DeleteVQueueBufferLen())) - insertVQueueCount.Observe(ctx, int64(n.ngt.InsertVQueueBufferLen())) - deleteVQueueCount.Observe(ctx, int64(int64(n.ngt.DeleteVQueueBufferLen()))) - completedCreateIndexTotal.Observe(ctx, int64(n.ngt.NumberOfCreateIndexExecution())) - executedProactiveGCTotal.Observe(ctx, int64(n.ngt.NumberOfProactiveGCExecution())) - isIndexing.Observe(ctx, int64(indexing)) - isSaving.Observe(ctx, int64(saving)) - brokenIndexCount.Observe(ctx, int64(n.ngt.BrokenIndexCount())) + o.ObserveInt64(indexCount, int64(n.ngt.Len())) + o.ObserveInt64(uncommittedIndexCount, int64(n.ngt.InsertVQueueBufferLen()+n.ngt.DeleteVQueueBufferLen())) + o.ObserveInt64(insertVQueueCount, int64(n.ngt.InsertVQueueBufferLen())) + o.ObserveInt64(deleteVQueueCount, int64(int64(n.ngt.DeleteVQueueBufferLen()))) + o.ObserveInt64(completedCreateIndexTotal, int64(n.ngt.NumberOfCreateIndexExecution())) + o.ObserveInt64(executedProactiveGCTotal, int64(n.ngt.NumberOfProactiveGCExecution())) + o.ObserveInt64(isIndexing, int64(indexing)) + o.ObserveInt64(isSaving, int64(saving)) + return nil }, - ) + indexCount, + uncommittedIndexCount, + insertVQueueCount, + deleteVQueueCount, + completedCreateIndexTotal, + executedProactiveGCTotal, + isIndexing, + isSaving, + ) + return err } diff --git a/internal/observability/metrics/agent/sidecar/sidecar.go b/internal/observability/metrics/agent/sidecar/sidecar.go index 256e89d4cdf..d87f2f98c99 100644 --- a/internal/observability/metrics/agent/sidecar/sidecar.go +++ b/internal/observability/metrics/agent/sidecar/sidecar.go @@ -21,8 +21,8 @@ import ( "github.com/vdaas/vald/internal/observability/metrics" "github.com/vdaas/vald/internal/sync" "github.com/vdaas/vald/pkg/agent/sidecar/service/observer" - "go.opentelemetry.io/otel/sdk/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/view" + api "go.opentelemetry.io/otel/metric" + view "go.opentelemetry.io/otel/sdk/metric" ) const ( @@ -58,45 +58,42 @@ func New() MetricsHook { } } -func (*sidecarMetrics) View() ([]*metrics.View, error) { - uploadTotal, err := view.New( - view.MatchInstrumentName(uploadTotalMetricsName), - view.WithSetDescription(uploadTotalMetricsDescription), - view.WithSetAggregation(aggregation.Sum{}), - ) - if err != nil { - return nil, err - } - - uploadBytes, err := view.New( - view.MatchInstrumentName(uploadBytesMetricsName), - view.WithSetDescription(uploadBytesMetricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - uploadLatency, err := view.New( - view.MatchInstrumentName(uploadLatencyMetricsName), - view.WithSetDescription(uploadLatencyMetricsDescription), - view.WithSetAggregation(aggregation.ExplicitBucketHistogram{ - Boundaries: metrics.RoughMillisecondsDistribution, - }), - ) - if err != nil { - return nil, err - } - - return []*metrics.View{ - &uploadTotal, - &uploadBytes, - &uploadLatency, +func (*sidecarMetrics) View() ([]metrics.View, error) { + return []metrics.View{ + view.NewView( + view.Instrument{ + Name: uploadTotalMetricsName, + Description: uploadTotalMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationSum{}, + }, + ), + view.NewView( + view.Instrument{ + Name: uploadBytesMetricsName, + Description: uploadBytesMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: uploadLatencyMetricsName, + Description: uploadLatencyMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationExplicitBucketHistogram{ + Boundaries: metrics.RoughMillisecondsDistribution, + }, + }, + ), }, nil } func (sm *sidecarMetrics) Register(m metrics.Meter) error { - uploadTotal, err := m.AsyncInt64().Counter( + uploadTotal, err := m.Int64ObservableCounter( uploadTotalMetricsName, metrics.WithDescription(uploadTotalMetricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -104,7 +101,7 @@ func (sm *sidecarMetrics) Register(m metrics.Meter) error { if err != nil { return err } - uploadBytes, err := m.AsyncInt64().Gauge( + uploadBytes, err := m.Int64ObservableGauge( uploadBytesMetricsName, metrics.WithDescription(uploadBytesMetricsDescription), metrics.WithUnit(metrics.Bytes), @@ -112,7 +109,7 @@ func (sm *sidecarMetrics) Register(m metrics.Meter) error { if err != nil { return err } - uploadLatency, err := m.AsyncFloat64().Gauge( + uploadLatency, err := m.Float64ObservableGauge( uploadLatencyMetricsName, metrics.WithDescription(uploadLatencyMetricsDescription), metrics.WithUnit(metrics.Milliseconds), @@ -121,35 +118,34 @@ func (sm *sidecarMetrics) Register(m metrics.Meter) error { return err } - return m.RegisterCallback( - []metrics.AsynchronousInstrument{ - uploadTotal, - uploadBytes, - uploadLatency, - }, - func(ctx context.Context) { + _, err = m.RegisterCallback( + func(_ context.Context, o api.Observer) error { sm.mu.Lock() defer sm.mu.Unlock() if sm.info == nil { - return + return nil } - attrs := []attribute.KeyValue{ + attrs := api.WithAttributes( attribute.String(sm.storageTypeKey, sm.info.StorageInfo.Type), attribute.String(sm.bucketNameKey, sm.info.BucketName), attribute.String(sm.filenameKey, sm.info.Filename), - } + ) + o.ObserveInt64(uploadTotal, 1, attrs) + o.ObserveInt64(uploadBytes, sm.info.Bytes, attrs) latencyMillis := float64(sm.info.EndTime.Sub(sm.info.StartTime)) / float64(time.Millisecond) - - uploadTotal.Observe(ctx, 1, attrs...) - uploadBytes.Observe(ctx, sm.info.Bytes, attrs...) - uploadLatency.Observe(ctx, latencyMillis, attrs...) - + o.ObserveFloat64(uploadLatency, latencyMillis, attrs) sm.info = nil + + return nil }, + uploadTotal, + uploadBytes, + uploadLatency, ) + return err } func (*sidecarMetrics) BeforeProcess(ctx context.Context, _ *observer.BackupInfo) (context.Context, error) { diff --git a/internal/observability/metrics/backoff/backoff.go b/internal/observability/metrics/backoff/backoff.go index c1fdbb5c441..fadc3df53f8 100644 --- a/internal/observability/metrics/backoff/backoff.go +++ b/internal/observability/metrics/backoff/backoff.go @@ -19,8 +19,8 @@ import ( "github.com/vdaas/vald/internal/backoff" "github.com/vdaas/vald/internal/observability/attribute" "github.com/vdaas/vald/internal/observability/metrics" - "go.opentelemetry.io/otel/sdk/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/view" + api "go.opentelemetry.io/otel/metric" + view "go.opentelemetry.io/otel/sdk/metric" ) const ( @@ -38,22 +38,22 @@ func New() metrics.Metric { } } -func (*backoffMetrics) View() ([]*metrics.View, error) { - retryCount, err := view.New( - view.MatchInstrumentName(metricsName), - view.WithSetDescription(metricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - return []*metrics.View{ - &retryCount, +func (*backoffMetrics) View() ([]metrics.View, error) { + return []metrics.View{ + view.NewView( + view.Instrument{ + Name: metricsName, + Description: metricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), }, nil } -func (bm *backoffMetrics) Register(m metrics.Meter) error { - retryCount, err := m.AsyncInt64().Gauge( +func (bm *backoffMetrics) Register(m metrics.Meter) (err error) { + retryCount, err := m.Int64ObservableGauge( metricsName, metrics.WithDescription(metricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -61,18 +61,17 @@ func (bm *backoffMetrics) Register(m metrics.Meter) error { if err != nil { return err } - return m.RegisterCallback( - []metrics.AsynchronousInstrument{ - retryCount, - }, - func(ctx context.Context) { + _, err = m.RegisterCallback( + func(ctx context.Context, o api.Observer) error { ms := backoff.Metrics(ctx) if len(ms) == 0 { - return + return nil } for name, cnt := range ms { - retryCount.Observe(ctx, cnt, attribute.String(bm.backoffNameKey, name)) + o.ObserveInt64(retryCount, cnt, api.WithAttributes(attribute.String(bm.backoffNameKey, name))) } - }, + return nil + }, retryCount, ) + return err } diff --git a/internal/observability/metrics/circuitbreaker/circuitbreaker.go b/internal/observability/metrics/circuitbreaker/circuitbreaker.go index 3bff4943d26..72a66893266 100644 --- a/internal/observability/metrics/circuitbreaker/circuitbreaker.go +++ b/internal/observability/metrics/circuitbreaker/circuitbreaker.go @@ -19,8 +19,8 @@ import ( "github.com/vdaas/vald/internal/circuitbreaker" "github.com/vdaas/vald/internal/observability/attribute" "github.com/vdaas/vald/internal/observability/metrics" - "go.opentelemetry.io/otel/sdk/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/view" + api "go.opentelemetry.io/otel/metric" + view "go.opentelemetry.io/otel/sdk/metric" ) const ( @@ -40,23 +40,22 @@ func New() metrics.Metric { } } -func (*breakerMetrics) View() ([]*metrics.View, error) { - breakerState, err := view.New( - view.MatchInstrumentName(metricsName), - view.WithSetDescription(metricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - return []*metrics.View{ - &breakerState, +func (*breakerMetrics) View() ([]metrics.View, error) { + return []metrics.View{ + view.NewView( + view.Instrument{ + Name: metricsName, + Description: metricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), }, nil } func (bm *breakerMetrics) Register(m metrics.Meter) error { - breakerState, err := m.AsyncInt64().Gauge( + breakerState, err := m.Int64ObservableGauge( metricsName, metrics.WithDescription(metricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -65,23 +64,23 @@ func (bm *breakerMetrics) Register(m metrics.Meter) error { return err } - return m.RegisterCallback( - []metrics.AsynchronousInstrument{ - breakerState, - }, - func(ctx context.Context) { + _, err = m.RegisterCallback( + func(ctx context.Context, o api.Observer) error { ms := circuitbreaker.Metrics(ctx) if len(ms) != 0 { for name, sts := range ms { if len(sts) != 0 { for st, cnt := range sts { - breakerState.Observe(ctx, cnt, - attribute.String(bm.breakerNameKey, name), - attribute.String(bm.stateKey, st.String())) + o.ObserveInt64(breakerState, cnt, + api.WithAttributes( + attribute.String(bm.breakerNameKey, name), + attribute.String(bm.stateKey, st.String()))) } } } } - }, + return nil + }, breakerState, ) + return err } diff --git a/internal/observability/metrics/gateway/mirror/mirror.go b/internal/observability/metrics/gateway/mirror/mirror.go index 4c6dd3757e4..6358010dfdb 100644 --- a/internal/observability/metrics/gateway/mirror/mirror.go +++ b/internal/observability/metrics/gateway/mirror/mirror.go @@ -19,8 +19,8 @@ import ( "github.com/vdaas/vald/internal/observability/attribute" "github.com/vdaas/vald/internal/observability/metrics" "github.com/vdaas/vald/pkg/gateway/mirror/service" - "go.opentelemetry.io/otel/sdk/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/view" + api "go.opentelemetry.io/otel/metric" + view "go.opentelemetry.io/otel/sdk/metric" ) const ( @@ -31,31 +31,31 @@ const ( ) type mirrorMetrics struct { - mirr service.Mirror + m service.Mirror } -func New(mirr service.Mirror) metrics.Metric { +func New(m service.Mirror) metrics.Metric { return &mirrorMetrics{ - mirr: mirr, + m: m, } } -func (*mirrorMetrics) View() ([]*metrics.View, error) { - target, err := view.New( - view.MatchInstrumentName(metricsName), - view.WithSetDescription(metricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - return []*metrics.View{ - &target, +func (*mirrorMetrics) View() ([]metrics.View, error) { + return []metrics.View{ + view.NewView( + view.Instrument{ + Name: metricsName, + Description: metricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), }, nil } func (mm *mirrorMetrics) Register(m metrics.Meter) error { - targetGauge, err := m.AsyncInt64().Gauge( + targetCount, err := m.Int64ObservableGauge( metricsName, metrics.WithDescription(metricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -63,15 +63,16 @@ func (mm *mirrorMetrics) Register(m metrics.Meter) error { if err != nil { return err } - return m.RegisterCallback( - []metrics.AsynchronousInstrument{ - targetGauge, - }, - func(ctx context.Context) { - mm.mirr.RangeMirrorAddr(func(addr string, _ any) bool { - targetGauge.Observe(ctx, 1, attribute.String(targetAddrKey, addr)) + + _, err = m.RegisterCallback( + func(_ context.Context, o api.Observer) error { + mm.m.RangeMirrorAddr(func(addr string, _ any) bool { + o.ObserveInt64(targetCount, 1, api.WithAttributes(attribute.String(targetAddrKey, addr))) return true }) + return nil }, + targetCount, ) + return err } diff --git a/internal/observability/metrics/grpc/grpc.go b/internal/observability/metrics/grpc/grpc.go index 8e503a97e3d..707ed4e6e72 100644 --- a/internal/observability/metrics/grpc/grpc.go +++ b/internal/observability/metrics/grpc/grpc.go @@ -15,8 +15,7 @@ package grpc import ( "github.com/vdaas/vald/internal/observability/metrics" - "go.opentelemetry.io/otel/sdk/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/view" + view "go.opentelemetry.io/otel/sdk/metric" ) const ( @@ -33,29 +32,28 @@ func New() metrics.Metric { return &grpcServerMetrics{} } -func (*grpcServerMetrics) View() ([]*metrics.View, error) { - latencyHistgram, err := view.New( - view.MatchInstrumentName(latencyMetricsName), - view.WithSetDescription(latencyMetricsDesctiption), - view.WithSetAggregation(aggregation.ExplicitBucketHistogram{ - Boundaries: metrics.DefaultMillisecondsDistribution, - }), - ) - if err != nil { - return nil, err - } - - completedRPCCnt, err := view.New( - view.MatchInstrumentName(completedRPCsMetricsName), - view.WithSetDescription(completedRPCsMetricsDescription), - view.WithSetAggregation(aggregation.Sum{}), - ) - if err != nil { - return nil, err - } - return []*metrics.View{ - &latencyHistgram, - &completedRPCCnt, +func (*grpcServerMetrics) View() ([]metrics.View, error) { + return []metrics.View{ + view.NewView( + view.Instrument{ + Name: latencyMetricsName, + Description: latencyMetricsDesctiption, + }, + view.Stream{ + Aggregation: view.AggregationExplicitBucketHistogram{ + Boundaries: metrics.DefaultMillisecondsDistribution, + }, + }, + ), + view.NewView( + view.Instrument{ + Name: completedRPCsMetricsName, + Description: completedRPCsMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationSum{}, + }, + ), }, nil } diff --git a/internal/observability/metrics/index/job/correction/correction.go b/internal/observability/metrics/index/job/correction/correction.go index c6b72f517c6..0ca14c595cc 100644 --- a/internal/observability/metrics/index/job/correction/correction.go +++ b/internal/observability/metrics/index/job/correction/correction.go @@ -18,8 +18,8 @@ import ( "github.com/vdaas/vald/internal/observability/metrics" "github.com/vdaas/vald/pkg/index/job/correction/service" - "go.opentelemetry.io/otel/sdk/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/view" + api "go.opentelemetry.io/otel/metric" + view "go.opentelemetry.io/otel/sdk/metric" ) const ( @@ -43,43 +43,40 @@ func New(c service.Corrector) metrics.Metric { } } -func (*correctionMetrics) View() ([]*metrics.View, error) { - checkedIndexCount, err := view.New( - view.MatchInstrumentName(checkedIndexCount), - view.WithSetDescription(checkedIndexCountDesc), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - oldIndexCount, err := view.New( - view.MatchInstrumentName(correctedOldIndexCount), - view.WithSetDescription(correctedOldIndexCountDesc), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - replicationCount, err := view.New( - view.MatchInstrumentName(correctedReplicationCount), - view.WithSetDescription(correctedReplicationCountDesc), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - return []*metrics.View{ - &checkedIndexCount, - &oldIndexCount, - &replicationCount, +func (*correctionMetrics) View() ([]metrics.View, error) { + return []metrics.View{ + view.NewView( + view.Instrument{ + Name: checkedIndexCount, + Description: checkedIndexCountDesc, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: correctedOldIndexCount, + Description: correctedOldIndexCountDesc, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: correctedReplicationCount, + Description: correctedReplicationCountDesc, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), }, nil } func (c *correctionMetrics) Register(m metrics.Meter) error { - checkedIndexCount, err := m.AsyncInt64().Gauge( + checkedIndexCount, err := m.Int64ObservableGauge( checkedIndexCount, metrics.WithDescription(checkedIndexCountDesc), metrics.WithUnit(metrics.Dimensionless), @@ -88,7 +85,7 @@ func (c *correctionMetrics) Register(m metrics.Meter) error { return err } - oldIndexCount, err := m.AsyncInt64().Gauge( + oldIndexCount, err := m.Int64ObservableGauge( correctedOldIndexCount, metrics.WithDescription(correctedOldIndexCountDesc), metrics.WithUnit(metrics.Dimensionless), @@ -97,7 +94,7 @@ func (c *correctionMetrics) Register(m metrics.Meter) error { return err } - replicationCount, err := m.AsyncInt64().Gauge( + replicationCount, err := m.Int64ObservableGauge( correctedReplicationCount, metrics.WithDescription(correctedReplicationCountDesc), metrics.WithUnit(metrics.Dimensionless), @@ -106,16 +103,16 @@ func (c *correctionMetrics) Register(m metrics.Meter) error { return err } - return m.RegisterCallback( - []metrics.AsynchronousInstrument{ - checkedIndexCount, - oldIndexCount, - replicationCount, - }, - func(ctx context.Context) { - checkedIndexCount.Observe(ctx, int64(c.correction.NumberOfCheckedIndex())) - oldIndexCount.Observe(ctx, int64(c.correction.NumberOfCorrectedOldIndex())) - replicationCount.Observe(ctx, int64(c.correction.NumberOfCorrectedReplication())) + _, err = m.RegisterCallback( + func(_ context.Context, o api.Observer) error { + o.ObserveInt64(checkedIndexCount, int64(c.correction.NumberOfCheckedIndex())) + o.ObserveInt64(oldIndexCount, int64(c.correction.NumberOfCorrectedOldIndex())) + o.ObserveInt64(replicationCount, int64(c.correction.NumberOfCorrectedReplication())) + return nil }, + checkedIndexCount, + oldIndexCount, + replicationCount, ) + return err } diff --git a/internal/observability/metrics/info/info.go b/internal/observability/metrics/info/info.go index b47a2a70cd9..3892992c924 100644 --- a/internal/observability/metrics/info/info.go +++ b/internal/observability/metrics/info/info.go @@ -21,8 +21,8 @@ import ( "github.com/vdaas/vald/internal/observability/attribute" "github.com/vdaas/vald/internal/observability/metrics" - "go.opentelemetry.io/otel/sdk/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/view" + api "go.opentelemetry.io/otel/metric" + view "go.opentelemetry.io/otel/sdk/metric" ) type info struct { @@ -83,23 +83,22 @@ func labelKVs(i interface{}) map[string]string { return kvs } -func (i *info) View() ([]*metrics.View, error) { - info, err := view.New( - view.MatchInstrumentName(i.name), - view.WithSetDescription(i.description), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - return []*metrics.View{ - &info, +func (i *info) View() ([]metrics.View, error) { + return []metrics.View{ + view.NewView( + view.Instrument{ + Name: i.name, + Description: i.description, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), }, nil } func (i *info) Register(m metrics.Meter) error { - info, err := m.AsyncInt64().Gauge( + info, err := m.Int64ObservableGauge( i.name, metrics.WithDescription(i.description), metrics.WithUnit(metrics.Dimensionless), @@ -107,16 +106,15 @@ func (i *info) Register(m metrics.Meter) error { if err != nil { return err } - return m.RegisterCallback( - []metrics.AsynchronousInstrument{ - info, - }, - func(ctx context.Context) { + _, err = m.RegisterCallback( + func(_ context.Context, o api.Observer) error { attrs := make([]attribute.KeyValue, 0, len(i.kvs)) for key, val := range i.kvs { attrs = append(attrs, attribute.String(key, val)) } - info.Observe(ctx, 1, attrs...) - }, + o.ObserveInt64(info, 1, api.WithAttributes(attrs...)) + return nil + }, info, ) + return err } diff --git a/internal/observability/metrics/manager/index/index.go b/internal/observability/metrics/manager/index/index.go index 9f7b47e1add..1a2b2a13351 100644 --- a/internal/observability/metrics/manager/index/index.go +++ b/internal/observability/metrics/manager/index/index.go @@ -18,8 +18,8 @@ import ( "github.com/vdaas/vald/internal/observability/metrics" "github.com/vdaas/vald/pkg/manager/index/service" - "go.opentelemetry.io/otel/sdk/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/view" + api "go.opentelemetry.io/otel/metric" + view "go.opentelemetry.io/otel/sdk/metric" ) const ( @@ -43,43 +43,40 @@ func New(i service.Indexer) metrics.Metric { } } -func (*indexerMetrics) View() ([]*metrics.View, error) { - uuidCount, err := view.New( - view.MatchInstrumentName(uuidCountMetricsName), - view.WithSetDescription(uuidCountMetricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - uncommittedUUIDCount, err := view.New( - view.MatchInstrumentName(uncommittedUUIDCountMetricsName), - view.WithSetDescription(uncommittedUUIDCountMetricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - isIndexing, err := view.New( - view.MatchInstrumentName(isIndexingMetricsName), - view.WithSetDescription(isIndexingMetricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - return []*metrics.View{ - &uuidCount, - &uncommittedUUIDCount, - &isIndexing, +func (*indexerMetrics) View() ([]metrics.View, error) { + return []metrics.View{ + view.NewView( + view.Instrument{ + Name: uuidCountMetricsName, + Description: uuidCountMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: uncommittedUUIDCountMetricsName, + Description: uncommittedUUIDCountMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: isIndexingMetricsName, + Description: isIndexingMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), }, nil } func (im *indexerMetrics) Register(m metrics.Meter) error { - uuidCount, err := m.AsyncInt64().Gauge( + uuidCount, err := m.Int64ObservableGauge( uuidCountMetricsName, metrics.WithDescription(uuidCountMetricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -88,7 +85,7 @@ func (im *indexerMetrics) Register(m metrics.Meter) error { return err } - uncommittedUUIDCount, err := m.AsyncInt64().Gauge( + uncommittedUUIDCount, err := m.Int64ObservableGauge( uncommittedUUIDCountMetricsName, metrics.WithDescription(uncommittedUUIDCountMetricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -97,7 +94,7 @@ func (im *indexerMetrics) Register(m metrics.Meter) error { return err } - isIndexing, err := m.AsyncInt64().Gauge( + isIndexing, err := m.Int64ObservableGauge( isIndexingMetricsName, metrics.WithDescription(isIndexingMetricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -106,20 +103,20 @@ func (im *indexerMetrics) Register(m metrics.Meter) error { return err } - return m.RegisterCallback( - []metrics.AsynchronousInstrument{ - uuidCount, - uncommittedUUIDCount, - isIndexing, - }, - func(ctx context.Context) { + _, err = m.RegisterCallback( + func(_ context.Context, o api.Observer) error { var indexing int64 if im.indexer.IsIndexing() { indexing = 1 } - uuidCount.Observe(ctx, int64(im.indexer.NumberOfUUIDs())) - uncommittedUUIDCount.Observe(ctx, int64(im.indexer.NumberOfUncommittedUUIDs())) - isIndexing.Observe(ctx, int64(indexing)) + o.ObserveInt64(uuidCount, int64(im.indexer.NumberOfUUIDs())) + o.ObserveInt64(uncommittedUUIDCount, int64(im.indexer.NumberOfUncommittedUUIDs())) + o.ObserveInt64(isIndexing, int64(indexing)) + return nil }, + uuidCount, + uncommittedUUIDCount, + isIndexing, ) + return err } diff --git a/internal/observability/metrics/mem/index/index.go b/internal/observability/metrics/mem/index/index.go new file mode 100644 index 00000000000..da9103bc837 --- /dev/null +++ b/internal/observability/metrics/mem/index/index.go @@ -0,0 +1,375 @@ +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package index + +import ( + "context" + "runtime" + "time" + + "github.com/vdaas/vald/internal/observability/metrics" + api "go.opentelemetry.io/otel/metric" + view "go.opentelemetry.io/otel/sdk/metric" +) + +const ( + allocMetricsName = "alloc_bytes" + allocMetricsDescription = "Currently allocated number of bytes on the heap" + + totalAllocMetricsName = "alloc_bytes_total" + totalAllocMetricsDescription = "Cumulative bytes allocated for heap objects" + + sysMetricsName = "sys_bytes" + sysMetricsDescription = "Total bytes of memory obtained from the OS" + + mallocsMetricsName = "mallocs_total" + mallocsMetricsDescription = "The cumulative count of heap objects allocated" + + freesMetricsName = "frees_total" + freesMetricsDescription = "The cumulative count of heap objects freed" + + heapAllocMetricsName = "heap_alloc_bytes" + heapAllocMetricsDescription = "Bytes of allocated heap object" + + heapSysMetricsName = "heap_sys_bytes" + heapSysMetricsDescription = "Bytes of heap memory obtained from the OS" + + heapIdleMetricsName = "heap_idle_bytes" + heapIdleMetricsDescription = "Bytes in idle (unused) spans" + + heapInuseMetricsName = "heap_inuse_bytes" + heapInuseMetricsDescription = "Bytes in in-use spans" + + heapReleasedMetricsName = "heap_released_bytes" + heapReleasedMetricsDescription = "Bytes of physical memory returned to the OS" + + stackInuseMetricsName = "stack_inuse_bytes" + stackInuseMetricsDescription = "Bytes in stack spans" + + stackSysMetricsName = "stack_sys_bytes" + stackSysMetricsDescription = "Bytes of stack memory obtained from the OS" + + pauseTotalMsMetricsName = "pause_ms_total" + pauseTotalMsMetricsDescription = "The cumulative milliseconds in GC" + + numGCMetricsName = "gc_count" + numGCMetricsDescription = "The number of completed GC cycles" +) + +type memoryMetrics struct{} + +func New() metrics.Metric { + return &memoryMetrics{} +} + +func (*memoryMetrics) View() ([]metrics.View, error) { + return []metrics.View{ + view.NewView( + view.Instrument{ + Name: allocMetricsName, + Description: allocMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: totalAllocMetricsDescription, + Description: totalAllocMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: sysMetricsName, + Description: sysMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: mallocsMetricsName, + Description: mallocsMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: freesMetricsName, + Description: freesMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: heapAllocMetricsName, + Description: heapAllocMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: heapSysMetricsName, + Description: heapSysMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: heapIdleMetricsName, + Description: heapIdleMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: heapInuseMetricsName, + Description: heapInuseMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: heapReleasedMetricsName, + Description: heapReleasedMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: stackInuseMetricsName, + Description: stackInuseMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: stackSysMetricsName, + Description: stackSysMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: pauseTotalMsMetricsName, + Description: pauseTotalMsMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + view.NewView( + view.Instrument{ + Name: numGCMetricsName, + Description: numGCMetricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), + }, nil +} + +// skipcq: GO-R1005 +func (*memoryMetrics) Register(m metrics.Meter) error { + alloc, err := m.Int64ObservableGauge( + allocMetricsName, + metrics.WithDescription(allocMetricsDescription), + metrics.WithUnit(metrics.Bytes), + ) + if err != nil { + return err + } + + totalAlloc, err := m.Int64ObservableGauge( + totalAllocMetricsDescription, + metrics.WithDescription(totalAllocMetricsDescription), + metrics.WithUnit(metrics.Bytes), + ) + if err != nil { + return err + } + + sys, err := m.Int64ObservableGauge( + sysMetricsName, + metrics.WithDescription(sysMetricsDescription), + metrics.WithUnit(metrics.Bytes), + ) + if err != nil { + return err + } + + mallocs, err := m.Int64ObservableGauge( + mallocsMetricsName, + metrics.WithDescription(mallocsMetricsDescription), + metrics.WithUnit(metrics.Dimensionless), + ) + if err != nil { + return err + } + + frees, err := m.Int64ObservableGauge( + freesMetricsName, + metrics.WithDescription(freesMetricsDescription), + metrics.WithUnit(metrics.Dimensionless), + ) + if err != nil { + return err + } + + heapAlloc, err := m.Int64ObservableGauge( + heapAllocMetricsName, + metrics.WithDescription(heapAllocMetricsDescription), + metrics.WithUnit(metrics.Bytes), + ) + if err != nil { + return err + } + + heapSys, err := m.Int64ObservableGauge( + heapSysMetricsName, + metrics.WithDescription(heapSysMetricsDescription), + metrics.WithUnit(metrics.Bytes), + ) + if err != nil { + return err + } + + heapIdle, err := m.Int64ObservableGauge( + heapIdleMetricsName, + metrics.WithDescription(heapIdleMetricsDescription), + metrics.WithUnit(metrics.Bytes), + ) + if err != nil { + return err + } + + heapInuse, err := m.Int64ObservableGauge( + heapInuseMetricsName, + metrics.WithDescription(heapInuseMetricsDescription), + metrics.WithUnit(metrics.Bytes), + ) + if err != nil { + return err + } + + heapReleased, err := m.Int64ObservableGauge( + heapReleasedMetricsName, + metrics.WithDescription(heapReleasedMetricsDescription), + metrics.WithUnit(metrics.Bytes), + ) + if err != nil { + return err + } + + stackInuse, err := m.Int64ObservableGauge( + stackInuseMetricsName, + metrics.WithDescription(stackInuseMetricsDescription), + metrics.WithUnit(metrics.Bytes), + ) + if err != nil { + return err + } + + stackSys, err := m.Int64ObservableGauge( + stackSysMetricsName, + metrics.WithDescription(stackSysMetricsDescription), + metrics.WithUnit(metrics.Bytes), + ) + if err != nil { + return err + } + + pauseTotalMs, err := m.Int64ObservableGauge( + pauseTotalMsMetricsName, + metrics.WithDescription(pauseTotalMsMetricsDescription), + metrics.WithUnit(metrics.Milliseconds), + ) + if err != nil { + return err + } + + numGC, err := m.Int64ObservableGauge( + numGCMetricsName, + metrics.WithDescription(numGCMetricsDescription), + metrics.WithUnit(metrics.Bytes), + ) + if err != nil { + return err + } + + _, err = m.RegisterCallback( + func(_ context.Context, o api.Observer) error { + var mstats runtime.MemStats + runtime.ReadMemStats(&mstats) + o.ObserveInt64(alloc, int64(mstats.Alloc)) + o.ObserveInt64(frees, int64(mstats.Frees)) + o.ObserveInt64(heapAlloc, int64(mstats.HeapAlloc)) + o.ObserveInt64(heapIdle, int64(mstats.HeapIdle)) + o.ObserveInt64(heapInuse, int64(mstats.HeapInuse)) + o.ObserveInt64(heapReleased, int64(mstats.HeapReleased)) + o.ObserveInt64(heapSys, int64(mstats.HeapSys)) + o.ObserveInt64(mallocs, int64(mstats.Mallocs)) + o.ObserveInt64(stackInuse, int64(mstats.StackInuse)) + o.ObserveInt64(stackSys, int64(mstats.StackSys)) + o.ObserveInt64(sys, int64(mstats.Sys)) + o.ObserveInt64(totalAlloc, int64(mstats.TotalAlloc)) + var ptMs int64 + if mstats.PauseTotalNs > 0 { + ptMs = int64(float64(mstats.PauseTotalNs) / float64(time.Millisecond)) + } + o.ObserveInt64(pauseTotalMs, ptMs) + o.ObserveInt64(numGC, int64(mstats.NextGC)) + return nil + }, + alloc, + frees, + heapAlloc, + heapIdle, + heapInuse, + heapReleased, + heapSys, + mallocs, + stackInuse, + stackSys, + sys, + totalAlloc, + pauseTotalMs, + numGC, + ) + return err +} diff --git a/internal/observability/metrics/mem/mem.go b/internal/observability/metrics/mem/mem.go index bcb6791b253..e2479ffec78 100644 --- a/internal/observability/metrics/mem/mem.go +++ b/internal/observability/metrics/mem/mem.go @@ -24,10 +24,8 @@ import ( "github.com/vdaas/vald/internal/conv" "github.com/vdaas/vald/internal/observability/metrics" - "go.opentelemetry.io/otel/metric/instrument/asyncint64" - "go.opentelemetry.io/otel/metric/unit" - "go.opentelemetry.io/otel/sdk/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/view" + api "go.opentelemetry.io/otel/metric" + view "go.opentelemetry.io/otel/sdk/metric" ) const ( @@ -156,7 +154,7 @@ const ( type metricsInfo struct { Name string Desc string - Unit metrics.Unit + Unit string Value func() int64 } @@ -404,7 +402,7 @@ func getProcStatusMetrics(pid int) ([]*metricsInfo, error) { m = append(m, &metricsInfo{ Name: vmpeakMetricsName, Desc: vmpeakMetricsDescription, - Unit: unit.Bytes, + Unit: metrics.Bytes, Value: func() int64 { return f * k }, @@ -416,7 +414,7 @@ func getProcStatusMetrics(pid int) ([]*metricsInfo, error) { m = append(m, &metricsInfo{ Name: vmsizeMetricsName, Desc: vmsizeMetricsDescription, - Unit: unit.Bytes, + Unit: metrics.Bytes, Value: func() int64 { return f * k }, @@ -428,7 +426,7 @@ func getProcStatusMetrics(pid int) ([]*metricsInfo, error) { m = append(m, &metricsInfo{ Name: vmhwmMetricsName, Desc: vmhwmMetricsDescription, - Unit: unit.Bytes, + Unit: metrics.Bytes, Value: func() int64 { return f * k }, @@ -440,7 +438,7 @@ func getProcStatusMetrics(pid int) ([]*metricsInfo, error) { m = append(m, &metricsInfo{ Name: vmrssMetricsName, Desc: vmrssMetricsDescription, - Unit: unit.Bytes, + Unit: metrics.Bytes, Value: func() int64 { return f * k }, @@ -452,7 +450,7 @@ func getProcStatusMetrics(pid int) ([]*metricsInfo, error) { m = append(m, &metricsInfo{ Name: vmdataMetricsName, Desc: vmdataMetricsDescription, - Unit: unit.Bytes, + Unit: metrics.Bytes, Value: func() int64 { return f * k }, @@ -464,7 +462,7 @@ func getProcStatusMetrics(pid int) ([]*metricsInfo, error) { m = append(m, &metricsInfo{ Name: vmstkMetricsName, Desc: vmstkMetricsDescription, - Unit: unit.Bytes, + Unit: metrics.Bytes, Value: func() int64 { return f * k }, @@ -476,7 +474,7 @@ func getProcStatusMetrics(pid int) ([]*metricsInfo, error) { m = append(m, &metricsInfo{ Name: vmexeMetricsName, Desc: vmexeMetricsDescription, - Unit: unit.Bytes, + Unit: metrics.Bytes, Value: func() int64 { return f * k }, @@ -488,7 +486,7 @@ func getProcStatusMetrics(pid int) ([]*metricsInfo, error) { m = append(m, &metricsInfo{ Name: vmlckMetricsName, Desc: vmlckMetricsDescription, - Unit: unit.Bytes, + Unit: metrics.Bytes, Value: func() int64 { return f * k }, @@ -500,7 +498,7 @@ func getProcStatusMetrics(pid int) ([]*metricsInfo, error) { m = append(m, &metricsInfo{ Name: vmlibMetricsName, Desc: vmlibMetricsDescription, - Unit: unit.Bytes, + Unit: metrics.Bytes, Value: func() int64 { return f * k }, @@ -512,7 +510,7 @@ func getProcStatusMetrics(pid int) ([]*metricsInfo, error) { m = append(m, &metricsInfo{ Name: vmpteMetricsName, Desc: vmpteMetricsDescription, - Unit: unit.Bytes, + Unit: metrics.Bytes, Value: func() int64 { return f * k }, @@ -524,7 +522,7 @@ func getProcStatusMetrics(pid int) ([]*metricsInfo, error) { m = append(m, &metricsInfo{ Name: vmswapMetricsName, Desc: vmswapMetricsDescription, - Unit: unit.Bytes, + Unit: metrics.Bytes, Value: func() int64 { return f * k }, @@ -536,7 +534,7 @@ func getProcStatusMetrics(pid int) ([]*metricsInfo, error) { m = append(m, &metricsInfo{ Name: vmpinMetricsName, Desc: vmpinMetricsDescription, - Unit: unit.Bytes, + Unit: metrics.Bytes, Value: func() int64 { return f * k }, @@ -557,23 +555,23 @@ func New() metrics.Metric { } } -func (mm *memMetrics) View() ([]*metrics.View, error) { +func (mm *memMetrics) View() ([]metrics.View, error) { mInfo := getMemstatsMetrics() if m, err := getProcStatusMetrics(mm.pid); err == nil { mInfo = append(mInfo, m...) } - views := make([]*metrics.View, 0, len(mInfo)) + views := make([]metrics.View, 0, len(mInfo)) for _, m := range mInfo { - v, err := view.New( - view.MatchInstrumentName(m.Name), - view.WithSetDescription(m.Desc), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - views = append(views, &v) + views = append(views, view.NewView( + view.Instrument{ + Name: m.Name, + Description: m.Desc, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + )) } return views, nil } @@ -584,33 +582,34 @@ func (mm *memMetrics) Register(m metrics.Meter) error { mInfo = append(mInfo, metrics...) } - instruments := make([]metrics.AsynchronousInstrument, 0, len(mInfo)) + instruments := make([]api.Int64Observable, 0, len(mInfo)) for _, info := range mInfo { - instrument, err := m.AsyncInt64().Gauge( + instrument, err := m.Int64ObservableGauge( info.Name, metrics.WithDescription(info.Desc), metrics.WithUnit(info.Unit), ) - if err != nil { - return err + if err == nil { + instruments = append(instruments, instrument) } - instruments = append(instruments, instrument) } - - return m.RegisterCallback( - instruments, - func(ctx context.Context) { + oinsts := make([]api.Observable, 0, len(instruments)) + for _, instrument := range instruments { + oinsts = append(oinsts, instrument) + } + _, err := m.RegisterCallback( + func(_ context.Context, o api.Observer) error { metrics := getMemstatsMetrics() if m, err := getProcStatusMetrics(mm.pid); err == nil { metrics = append(metrics, m...) } for i, instrument := range instruments { - g, ok := instrument.(asyncint64.Gauge) - if ok { - g.Observe(ctx, metrics[i].Value()) - } + o.ObserveInt64(instrument, metrics[i].Value()) } + return nil }, + oinsts..., ) + return err } diff --git a/internal/observability/metrics/metrics.go b/internal/observability/metrics/metrics.go index 6aa2b5a1d13..14fb7ff728f 100644 --- a/internal/observability/metrics/metrics.go +++ b/internal/observability/metrics/metrics.go @@ -14,16 +14,42 @@ package metrics import ( + "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/global" - "go.opentelemetry.io/otel/metric/instrument" - "go.opentelemetry.io/otel/metric/unit" - "go.opentelemetry.io/otel/sdk/metric/view" + view "go.opentelemetry.io/otel/sdk/metric" ) -const ValdOrg = "vald.vdaas.org" +type ( + View = view.View + + // Meter is type alias of metrics.Meter. + Meter = metric.Meter + // Metric represents an interface for metric. + Metric interface { + View() ([]View, error) + Register(Meter) error + } +) + +const ( + ValdOrg = "vald.vdaas.org" + // Units defined by OpenTelemetry. + // Dimensionless is a type alias of unit.Dimensionless. + Dimensionless = "1" + // Bytes is a type alias of unit.Bytes. + Bytes = "By" + // Milliseconds is a type alias of unit.Milliseconds. + Milliseconds = "ms" +) var ( + // WithUnit returns an metric.WithUnit option. + WithUnit = metric.WithUnit + // WithDescription returns an metric.WithDescription option. + WithDescription = metric.WithDescription + // WithAttributes returns an metric.WithAttributes option. + WithAttributes = metric.WithAttributes + RoughMillisecondsDistribution = []float64{ 1, 5, @@ -111,52 +137,7 @@ var ( } ) -// Meter is type alias of metrics.Meter. -type Meter = metric.Meter - // GetMeter returns the Meter object to record metrics. func GetMeter() Meter { - return global.MeterProvider().Meter(ValdOrg) -} - -// Unit is type alias of unit.Unit. -type Unit = unit.Unit - -// Units defined by OpenTelemetry. -const ( - // Dimensionless is a type alias of unit.Dimensionless. - Dimensionless = unit.Dimensionless - // Bytes is a type alias of unit.Bytes. - Bytes = unit.Bytes - // Milliseconds is a type alias of unit.Milliseconds. - Milliseconds = unit.Milliseconds -) - -type ( - // AsynchronousInstrument is type alias of instrument.Asynchronous. - AsynchronousInstrument = instrument.Asynchronous - // SynchronousInstrument is type alias of instrument.Synchronous. - SynchronousInstrument = instrument.Synchronous -) - -// WithUnit returns an instrument.WithUnit option. -func WithUnit(u Unit) instrument.Option { - return instrument.WithUnit(u) -} - -// WithDescription returns an instrument.WithDescription option. -func WithDescription(desc string) instrument.Option { - return instrument.WithDescription(desc) -} - -type View = view.View - -type Viewer interface { - View() ([]*View, error) -} - -// Metric represents an interface for metric. -type Metric interface { - Viewer - Register(Meter) error + return otel.GetMeterProvider().Meter(ValdOrg) } diff --git a/internal/observability/metrics/runtime/cgo/cgo.go b/internal/observability/metrics/runtime/cgo/cgo.go index 1df2e17fb8f..6df46a2a349 100644 --- a/internal/observability/metrics/runtime/cgo/cgo.go +++ b/internal/observability/metrics/runtime/cgo/cgo.go @@ -18,8 +18,8 @@ import ( "runtime" "github.com/vdaas/vald/internal/observability/metrics" - "go.opentelemetry.io/otel/sdk/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/view" + api "go.opentelemetry.io/otel/metric" + view "go.opentelemetry.io/otel/sdk/metric" ) const ( @@ -33,22 +33,22 @@ func New() metrics.Metric { return &cgo{} } -func (*cgo) View() ([]*metrics.View, error) { - count, err := view.New( - view.MatchInstrumentName(metricsName), - view.WithSetDescription(metricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - return []*metrics.View{ - &count, +func (*cgo) View() ([]metrics.View, error) { + return []metrics.View{ + view.NewView( + view.Instrument{ + Name: metricsName, + Description: metricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), }, nil } func (*cgo) Register(m metrics.Meter) error { - count, err := m.AsyncInt64().Gauge( + count, err := m.Int64ObservableGauge( metricsName, metrics.WithDescription(metricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -56,12 +56,11 @@ func (*cgo) Register(m metrics.Meter) error { if err != nil { return err } - return m.RegisterCallback( - []metrics.AsynchronousInstrument{ - count, - }, - func(ctx context.Context) { - count.Observe(ctx, int64(runtime.NumGoroutine())) - }, + _, err = m.RegisterCallback( + func(_ context.Context, o api.Observer) error { + o.ObserveInt64(count, runtime.NumCgoCall()) + return nil + }, count, ) + return err } diff --git a/internal/observability/metrics/runtime/goroutine/goroutine.go b/internal/observability/metrics/runtime/goroutine/goroutine.go index 7fe024d3c83..cb848c583fe 100644 --- a/internal/observability/metrics/runtime/goroutine/goroutine.go +++ b/internal/observability/metrics/runtime/goroutine/goroutine.go @@ -18,8 +18,8 @@ import ( "runtime" "github.com/vdaas/vald/internal/observability/metrics" - "go.opentelemetry.io/otel/sdk/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/view" + api "go.opentelemetry.io/otel/metric" + view "go.opentelemetry.io/otel/sdk/metric" ) const ( @@ -33,23 +33,22 @@ func New() metrics.Metric { return &goroutine{} } -func (*goroutine) View() ([]*metrics.View, error) { - count, err := view.New( - view.MatchInstrumentName(metricsName), - view.WithSetDescription(metricsDescription), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - - return []*metrics.View{ - &count, +func (*goroutine) View() ([]metrics.View, error) { + return []metrics.View{ + view.NewView( + view.Instrument{ + Name: metricsName, + Description: metricsDescription, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), }, nil } -func (*goroutine) Register(m metrics.Meter) error { - conter, err := m.AsyncInt64().Gauge( +func (*goroutine) Register(m metrics.Meter) (err error) { + counter, err := m.Int64ObservableGauge( metricsName, metrics.WithDescription(metricsDescription), metrics.WithUnit(metrics.Dimensionless), @@ -57,12 +56,11 @@ func (*goroutine) Register(m metrics.Meter) error { if err != nil { return err } - return m.RegisterCallback( - []metrics.AsynchronousInstrument{ - conter, - }, - func(ctx context.Context) { - conter.Observe(ctx, int64(runtime.NumGoroutine())) - }, + _, err = m.RegisterCallback( + func(_ context.Context, o api.Observer) error { + o.ObserveInt64(counter, int64(runtime.NumGoroutine())) + return nil + }, counter, ) + return err } diff --git a/internal/observability/metrics/version/version.go b/internal/observability/metrics/version/version.go index f595b88c041..4efbf6b18f8 100644 --- a/internal/observability/metrics/version/version.go +++ b/internal/observability/metrics/version/version.go @@ -22,8 +22,8 @@ import ( "github.com/vdaas/vald/internal/observability/attribute" "github.com/vdaas/vald/internal/observability/metrics" "github.com/vdaas/vald/internal/strings" - "go.opentelemetry.io/otel/sdk/metric/aggregation" - "go.opentelemetry.io/otel/sdk/metric/view" + api "go.opentelemetry.io/otel/metric" + view "go.opentelemetry.io/otel/sdk/metric" ) const ( @@ -76,22 +76,22 @@ func labelKVs(labels ...string) map[string]string { return info } -func (*version) View() ([]*metrics.View, error) { - otlv, err := view.New( - view.MatchInstrumentName(name), - view.WithSetDescription(description), - view.WithSetAggregation(aggregation.LastValue{}), - ) - if err != nil { - return nil, err - } - return []*metrics.View{ - &otlv, +func (*version) View() ([]metrics.View, error) { + return []metrics.View{ + view.NewView( + view.Instrument{ + Name: name, + Description: description, + }, + view.Stream{ + Aggregation: view.AggregationLastValue{}, + }, + ), }, nil } -func (v *version) Register(m metrics.Meter) error { - info, err := m.AsyncInt64().Gauge( +func (v *version) Register(m metrics.Meter) (err error) { + info, err := m.Int64ObservableGauge( name, metrics.WithDescription(description), metrics.WithUnit(metrics.Dimensionless), @@ -99,16 +99,15 @@ func (v *version) Register(m metrics.Meter) error { if err != nil { return err } - return m.RegisterCallback( - []metrics.AsynchronousInstrument{ - info, - }, - func(ctx context.Context) { + _, err = m.RegisterCallback( + func(_ context.Context, o api.Observer) error { attrs := make([]attribute.KeyValue, 0, len(v.kvs)) for key, val := range v.kvs { attrs = append(attrs, attribute.String(key, val)) } - info.Observe(ctx, 1, attrs...) - }, + o.ObserveInt64(info, 1, api.WithAttributes(attrs...)) + return nil + }, info, ) + return err } diff --git a/internal/observability/trace/status.go b/internal/observability/trace/status.go index 3957d1a43a4..48a9adfd835 100644 --- a/internal/observability/trace/status.go +++ b/internal/observability/trace/status.go @@ -21,7 +21,7 @@ import ( "github.com/vdaas/vald/internal/net/grpc/codes" "go.opentelemetry.io/otel/attribute" ocodes "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.12.0" + semconv "go.opentelemetry.io/otel/semconv/v1.24.0" ) type Attributes = []attribute.KeyValue diff --git a/internal/unit/unit.go b/internal/unit/unit.go index 8edff25f4c8..072e24501be 100644 --- a/internal/unit/unit.go +++ b/internal/unit/unit.go @@ -28,7 +28,6 @@ func ParseBytes(bs string) (bytes uint64, err error) { } bytes, err = bytefmt.ToBytes(bs) - if err != nil { return 0, errors.Join(err, errors.ErrParseUnitFailed(bs)) } diff --git a/k8s/agent/readreplica/deployment.yaml b/k8s/agent/faiss/configmap.yaml similarity index 100% rename from k8s/agent/readreplica/deployment.yaml rename to k8s/agent/faiss/configmap.yaml diff --git a/k8s/agent/configmap.yaml b/k8s/agent/ngt/configmap.yaml similarity index 98% rename from k8s/agent/configmap.yaml rename to k8s/agent/ngt/configmap.yaml index c30f7fce8f9..44b9f2b8df9 100644 --- a/k8s/agent/configmap.yaml +++ b/k8s/agent/ngt/configmap.yaml @@ -17,7 +17,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: vald-agent-ngt-config + name: vald-agent-config labels: app.kubernetes.io/name: vald helm.sh/chart: vald-v1.7.10 @@ -42,6 +42,7 @@ data: grpc: bidirectional_stream_concurrency: 20 connection_timeout: "" + enable_admin: true enable_reflection: true header_table_size: 0 initial_conn_window_size: 2097152 @@ -181,7 +182,7 @@ data: namespace: "_MY_POD_NAMESPACE_" pod_name: "_MY_POD_NAME_" node_name: "_MY_NODE_NAME_" - service_name: "vald-agent-ngt" + service_name: "vald-agent" metrics: enable_cgo: true enable_goroutine: true @@ -195,7 +196,7 @@ data: - go_version - go_os - go_arch - - ngt_version + - algorithm_info trace: enabled: false ngt: diff --git a/k8s/agent/pdb.yaml b/k8s/agent/pdb.yaml index 572db53b7a4..d1cab1d576c 100644 --- a/k8s/agent/pdb.yaml +++ b/k8s/agent/pdb.yaml @@ -17,7 +17,7 @@ apiVersion: policy/v1 kind: PodDisruptionBudget metadata: - name: vald-agent-ngt + name: vald-agent labels: app.kubernetes.io/name: vald helm.sh/chart: vald-v1.7.10 @@ -29,4 +29,4 @@ spec: maxUnavailable: 1 selector: matchLabels: - app: vald-agent-ngt + app: vald-agent diff --git a/k8s/agent/priorityclass.yaml b/k8s/agent/priorityclass.yaml index 07bef98d447..13b7b507a23 100644 --- a/k8s/agent/priorityclass.yaml +++ b/k8s/agent/priorityclass.yaml @@ -17,7 +17,7 @@ apiVersion: scheduling.k8s.io/v1 kind: PriorityClass metadata: - name: default-vald-agent-ngt-priority + name: default-vald-agent-priority labels: app.kubernetes.io/name: vald helm.sh/chart: vald-v1.7.10 diff --git a/k8s/agent/readreplica/networkpolicy.yaml b/k8s/agent/sidecar/configmap.yaml similarity index 100% rename from k8s/agent/readreplica/networkpolicy.yaml rename to k8s/agent/sidecar/configmap.yaml diff --git a/k8s/agent/readreplica/svc.yaml b/k8s/agent/sidecar/svc.yaml similarity index 100% rename from k8s/agent/readreplica/svc.yaml rename to k8s/agent/sidecar/svc.yaml diff --git a/k8s/agent/statefulset.yaml b/k8s/agent/statefulset.yaml index 50483a4beab..32f1dff7538 100644 --- a/k8s/agent/statefulset.yaml +++ b/k8s/agent/statefulset.yaml @@ -17,9 +17,9 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - name: vald-agent-ngt + name: vald-agent labels: - app: vald-agent-ngt + app: vald-agent app.kubernetes.io/name: vald helm.sh/chart: vald-v1.7.10 app.kubernetes.io/managed-by: Helm @@ -27,13 +27,13 @@ metadata: app.kubernetes.io/version: v1.7.10 app.kubernetes.io/component: agent spec: - serviceName: vald-agent-ngt + serviceName: vald-agent podManagementPolicy: Parallel replicas: 5 revisionHistoryLimit: 2 selector: matchLabels: - app: vald-agent-ngt + app: vald-agent updateStrategy: type: RollingUpdate rollingUpdate: @@ -42,7 +42,7 @@ spec: metadata: creationTimestamp: null labels: - app: vald-agent-ngt + app: vald-agent app.kubernetes.io/name: vald app.kubernetes.io/instance: release-name app.kubernetes.io/component: agent @@ -51,7 +51,7 @@ spec: profefe.com/port: "6060" profefe.com/service: vald-agent-ngt pyroscope.io/scrape: "true" - pyroscope.io/application-name: vald-agent-ngt + pyroscope.io/application-name: vald-agent pyroscope.io/profile-cpu-enabled: "true" pyroscope.io/profile-mem-enabled: "true" pyroscope.io/port: "6060" @@ -70,12 +70,12 @@ spec: - key: app operator: In values: - - vald-agent-ngt + - vald-agent topologyKey: kubernetes.io/hostname weight: 100 requiredDuringSchedulingIgnoredDuringExecution: [] containers: - - name: vald-agent-ngt + - name: vald-agent image: "vdaas/vald-agent-ngt:nightly" imagePullPolicy: Always livenessProbe: @@ -151,7 +151,7 @@ spec: fieldRef: fieldPath: metadata.namespace volumeMounts: - - name: vald-agent-ngt-config + - name: vald-agent-config mountPath: /etc/server/ dnsPolicy: ClusterFirst restartPolicy: Always @@ -164,9 +164,9 @@ spec: runAsUser: 65532 terminationGracePeriodSeconds: 120 volumes: - - name: vald-agent-ngt-config + - name: vald-agent-config configMap: defaultMode: 420 - name: vald-agent-ngt-config - priorityClassName: default-vald-agent-ngt-priority + name: vald-agent-config + priorityClassName: default-vald-agent-priority status: diff --git a/k8s/agent/svc.yaml b/k8s/agent/svc.yaml index bac37e9b627..73f1709a8ba 100644 --- a/k8s/agent/svc.yaml +++ b/k8s/agent/svc.yaml @@ -17,7 +17,7 @@ apiVersion: v1 kind: Service metadata: - name: vald-agent-ngt + name: vald-agent labels: app.kubernetes.io/name: vald helm.sh/chart: vald-v1.7.10 diff --git a/k8s/discoverer/configmap.yaml b/k8s/discoverer/configmap.yaml index e1b3592b004..762c87ec745 100644 --- a/k8s/discoverer/configmap.yaml +++ b/k8s/discoverer/configmap.yaml @@ -42,6 +42,7 @@ data: grpc: bidirectional_stream_concurrency: 20 connection_timeout: "" + enable_admin: true enable_reflection: true header_table_size: 0 initial_conn_window_size: 2097152 @@ -195,7 +196,7 @@ data: - go_version - go_os - go_arch - - ngt_version + - algorithm_info trace: enabled: false discoverer: @@ -215,7 +216,7 @@ data: pod_metrics: labels: {} fields: - containers.name: vald-agent-ngt + containers.name: vald-agent node_metrics: labels: {} fields: {} diff --git a/k8s/discoverer/deployment.yaml b/k8s/discoverer/deployment.yaml index 0c04b3aabd8..7a5509f597f 100644 --- a/k8s/discoverer/deployment.yaml +++ b/k8s/discoverer/deployment.yaml @@ -47,7 +47,7 @@ spec: app.kubernetes.io/instance: release-name app.kubernetes.io/component: discoverer annotations: - checksum/configmap: 6fd4f24bb970e1cbba59c4027add58cf9f9784f4f9465bbf040f6bd2f7149090 + checksum/configmap: c9f995e76822f6be0bf4202f3c897d26d451c3ce97ae7a02674de0e754cc44cc profefe.com/enable: "true" profefe.com/port: "6060" profefe.com/service: vald-discoverer diff --git a/k8s/agent/readreplica/pvc.yaml b/k8s/gateway/gateway/filter/configmap.yaml similarity index 100% rename from k8s/agent/readreplica/pvc.yaml rename to k8s/gateway/gateway/filter/configmap.yaml diff --git a/k8s/gateway/lb/daemonset.yaml b/k8s/gateway/gateway/filter/daemonset.yaml similarity index 100% rename from k8s/gateway/lb/daemonset.yaml rename to k8s/gateway/gateway/filter/daemonset.yaml diff --git a/k8s/agent/readreplica/snapshot.yaml b/k8s/gateway/gateway/filter/deployment.yaml similarity index 100% rename from k8s/agent/readreplica/snapshot.yaml rename to k8s/gateway/gateway/filter/deployment.yaml diff --git a/k8s/agent/sidecar-configmap.yaml b/k8s/gateway/gateway/filter/hpa.yaml similarity index 100% rename from k8s/agent/sidecar-configmap.yaml rename to k8s/gateway/gateway/filter/hpa.yaml diff --git a/k8s/gateway/lb/networkpolicy.yaml b/k8s/gateway/gateway/filter/networkpolicy.yaml similarity index 100% rename from k8s/gateway/lb/networkpolicy.yaml rename to k8s/gateway/gateway/filter/networkpolicy.yaml diff --git a/k8s/agent/sidecar-svc.yaml b/k8s/gateway/gateway/filter/pdb.yaml similarity index 100% rename from k8s/agent/sidecar-svc.yaml rename to k8s/gateway/gateway/filter/pdb.yaml diff --git a/k8s/gateway/lb/ing.yaml b/k8s/gateway/gateway/filter/priorityclass.yaml similarity index 100% rename from k8s/gateway/lb/ing.yaml rename to k8s/gateway/gateway/filter/priorityclass.yaml diff --git a/k8s/gateway/gateway/filter/svc.yaml b/k8s/gateway/gateway/filter/svc.yaml new file mode 100644 index 00000000000..ed97d539c09 --- /dev/null +++ b/k8s/gateway/gateway/filter/svc.yaml @@ -0,0 +1 @@ +--- diff --git a/k8s/gateway/gateway/ing.yaml b/k8s/gateway/gateway/ing.yaml new file mode 100644 index 00000000000..0410fd952ae --- /dev/null +++ b/k8s/gateway/gateway/ing.yaml @@ -0,0 +1,47 @@ +--- +# +# Copyright (C) 2019-2024 vdaas.org vald team +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# You may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + annotations: + nginx.ingress.kubernetes.io/grpc-backend: "true" + labels: + name: vald-lb-gateway-ingress + app: vald-lb-gateway-ingress + app.kubernetes.io/name: vald + helm.sh/chart: vald-v1.7.10 + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/instance: release-name + app.kubernetes.io/version: v1.7.10 + app.kubernetes.io/component: gateway-lb + name: release-name-ingress +spec: + defaultBackend: + service: + name: vald-lb-gateway + port: + name: grpc + rules: + - host: lb.gateway.vald.vdaas.org + http: + paths: + - backend: + service: + name: vald-lb-gateway + port: + name: grpc + pathType: ImplementationSpecific diff --git a/k8s/gateway/lb/configmap.yaml b/k8s/gateway/gateway/lb/configmap.yaml similarity index 98% rename from k8s/gateway/lb/configmap.yaml rename to k8s/gateway/gateway/lb/configmap.yaml index ff33867c31a..ea1bec138b9 100644 --- a/k8s/gateway/lb/configmap.yaml +++ b/k8s/gateway/gateway/lb/configmap.yaml @@ -42,6 +42,7 @@ data: grpc: bidirectional_stream_concurrency: 20 connection_timeout: "" + enable_admin: true enable_reflection: true header_table_size: 0 initial_conn_window_size: 2097152 @@ -195,16 +196,17 @@ data: - go_version - go_os - go_arch - - ngt_version + - algorithm_info trace: enabled: false gateway: agent_port: 8081 - agent_name: "vald-agent-ngt" - agent_dns: vald-agent-ngt.default.svc.cluster.local + agent_name: "vald-agent" + agent_dns: vald-agent.default.svc.cluster.local agent_namespace: "_MY_POD_NAMESPACE_" node_name: "" index_replica: 3 + read_replica_replicas: 1 discoverer: duration: 200ms client: diff --git a/k8s/gateway/gateway/lb/daemonset.yaml b/k8s/gateway/gateway/lb/daemonset.yaml new file mode 100644 index 00000000000..ed97d539c09 --- /dev/null +++ b/k8s/gateway/gateway/lb/daemonset.yaml @@ -0,0 +1 @@ +--- diff --git a/k8s/gateway/lb/deployment.yaml b/k8s/gateway/gateway/lb/deployment.yaml similarity index 96% rename from k8s/gateway/lb/deployment.yaml rename to k8s/gateway/gateway/lb/deployment.yaml index ab421c88721..4052eb6b889 100644 --- a/k8s/gateway/lb/deployment.yaml +++ b/k8s/gateway/gateway/lb/deployment.yaml @@ -46,7 +46,7 @@ spec: app.kubernetes.io/instance: release-name app.kubernetes.io/component: gateway-lb annotations: - checksum/configmap: e097634475f923d5a9386f1ab3de8cedb8f3ba1f598228f3cec985df760d78c9 + checksum/configmap: 53722a000662cc337e72e3986970ad49192f3f6d51b1922df8fd50e233738110 profefe.com/enable: "true" profefe.com/port: "6060" profefe.com/service: vald-lb-gateway @@ -75,7 +75,7 @@ spec: - -e - -c - | - until [ "$(wget --server-response --spider --quiet http://vald-agent-ngt.default.svc.cluster.local:3001/readiness 2>&1 | awk 'NR==1{print $2}')" == "200" ]; do + until [ "$(wget --server-response --spider --quiet http://vald-agent.default.svc.cluster.local:3001/readiness 2>&1 | awk 'NR==1{print $2}')" == "200" ]; do echo "waiting for agent to be ready..." sleep 2; done diff --git a/k8s/gateway/lb/hpa.yaml b/k8s/gateway/gateway/lb/hpa.yaml similarity index 100% rename from k8s/gateway/lb/hpa.yaml rename to k8s/gateway/gateway/lb/hpa.yaml diff --git a/k8s/gateway/gateway/lb/networkpolicy.yaml b/k8s/gateway/gateway/lb/networkpolicy.yaml new file mode 100644 index 00000000000..ed97d539c09 --- /dev/null +++ b/k8s/gateway/gateway/lb/networkpolicy.yaml @@ -0,0 +1 @@ +--- diff --git a/k8s/gateway/lb/pdb.yaml b/k8s/gateway/gateway/lb/pdb.yaml similarity index 100% rename from k8s/gateway/lb/pdb.yaml rename to k8s/gateway/gateway/lb/pdb.yaml diff --git a/k8s/gateway/lb/priorityclass.yaml b/k8s/gateway/gateway/lb/priorityclass.yaml similarity index 100% rename from k8s/gateway/lb/priorityclass.yaml rename to k8s/gateway/gateway/lb/priorityclass.yaml diff --git a/k8s/gateway/lb/svc.yaml b/k8s/gateway/gateway/lb/svc.yaml similarity index 100% rename from k8s/gateway/lb/svc.yaml rename to k8s/gateway/gateway/lb/svc.yaml diff --git a/k8s/gateway/gateway/mirror/clusterrole.yaml b/k8s/gateway/gateway/mirror/clusterrole.yaml new file mode 100644 index 00000000000..ed97d539c09 --- /dev/null +++ b/k8s/gateway/gateway/mirror/clusterrole.yaml @@ -0,0 +1 @@ +--- diff --git a/k8s/gateway/gateway/mirror/clusterrolebinding.yaml b/k8s/gateway/gateway/mirror/clusterrolebinding.yaml new file mode 100644 index 00000000000..ed97d539c09 --- /dev/null +++ b/k8s/gateway/gateway/mirror/clusterrolebinding.yaml @@ -0,0 +1 @@ +--- diff --git a/k8s/gateway/gateway/mirror/configmap.yaml b/k8s/gateway/gateway/mirror/configmap.yaml new file mode 100644 index 00000000000..ed97d539c09 --- /dev/null +++ b/k8s/gateway/gateway/mirror/configmap.yaml @@ -0,0 +1 @@ +--- diff --git a/k8s/gateway/gateway/mirror/daemonset.yaml b/k8s/gateway/gateway/mirror/daemonset.yaml new file mode 100644 index 00000000000..ed97d539c09 --- /dev/null +++ b/k8s/gateway/gateway/mirror/daemonset.yaml @@ -0,0 +1 @@ +--- diff --git a/k8s/gateway/gateway/mirror/deployment.yaml b/k8s/gateway/gateway/mirror/deployment.yaml new file mode 100644 index 00000000000..ed97d539c09 --- /dev/null +++ b/k8s/gateway/gateway/mirror/deployment.yaml @@ -0,0 +1 @@ +--- diff --git a/k8s/gateway/gateway/mirror/hpa.yaml b/k8s/gateway/gateway/mirror/hpa.yaml new file mode 100644 index 00000000000..ed97d539c09 --- /dev/null +++ b/k8s/gateway/gateway/mirror/hpa.yaml @@ -0,0 +1 @@ +--- diff --git a/k8s/gateway/gateway/mirror/networkpolicy.yaml b/k8s/gateway/gateway/mirror/networkpolicy.yaml new file mode 100644 index 00000000000..ed97d539c09 --- /dev/null +++ b/k8s/gateway/gateway/mirror/networkpolicy.yaml @@ -0,0 +1 @@ +--- diff --git a/k8s/gateway/gateway/mirror/pdb.yaml b/k8s/gateway/gateway/mirror/pdb.yaml new file mode 100644 index 00000000000..ed97d539c09 --- /dev/null +++ b/k8s/gateway/gateway/mirror/pdb.yaml @@ -0,0 +1 @@ +--- diff --git a/k8s/gateway/gateway/mirror/priorityclass.yaml b/k8s/gateway/gateway/mirror/priorityclass.yaml new file mode 100644 index 00000000000..ed97d539c09 --- /dev/null +++ b/k8s/gateway/gateway/mirror/priorityclass.yaml @@ -0,0 +1 @@ +--- diff --git a/k8s/gateway/gateway/mirror/serviceaccount.yaml b/k8s/gateway/gateway/mirror/serviceaccount.yaml new file mode 100644 index 00000000000..ed97d539c09 --- /dev/null +++ b/k8s/gateway/gateway/mirror/serviceaccount.yaml @@ -0,0 +1 @@ +--- diff --git a/k8s/gateway/gateway/mirror/svc.yaml b/k8s/gateway/gateway/mirror/svc.yaml new file mode 100644 index 00000000000..ed97d539c09 --- /dev/null +++ b/k8s/gateway/gateway/mirror/svc.yaml @@ -0,0 +1 @@ +--- diff --git a/k8s/manager/index/configmap.yaml b/k8s/manager/index/configmap.yaml index e3c0baaaf93..0b9552b3bf6 100644 --- a/k8s/manager/index/configmap.yaml +++ b/k8s/manager/index/configmap.yaml @@ -42,6 +42,7 @@ data: grpc: bidirectional_stream_concurrency: 20 connection_timeout: "" + enable_admin: true enable_reflection: true header_table_size: 0 initial_conn_window_size: 2097152 @@ -195,13 +196,13 @@ data: - go_version - go_os - go_arch - - ngt_version + - algorithm_info trace: enabled: false indexer: agent_port: 8081 - agent_name: "vald-agent-ngt" - agent_dns: vald-agent-ngt.default.svc.cluster.local + agent_name: "vald-agent" + agent_dns: vald-agent.default.svc.cluster.local agent_namespace: "_MY_POD_NAMESPACE_" node_name: "" discoverer: diff --git a/k8s/manager/index/deployment.yaml b/k8s/manager/index/deployment.yaml index f3bf7d2805e..acbef7dc59e 100644 --- a/k8s/manager/index/deployment.yaml +++ b/k8s/manager/index/deployment.yaml @@ -47,7 +47,7 @@ spec: app.kubernetes.io/instance: release-name app.kubernetes.io/component: manager-index annotations: - checksum/configmap: 6b725e1075416568b2458d912fea0c99f71f3fe3c06f6ce3f2cd62e4a6bb1127 + checksum/configmap: dcb302ec14b4ca3fdd994a01f97215a8da251348a76c1fdebe71a4c6ffd3863e profefe.com/enable: "true" profefe.com/port: "6060" profefe.com/service: vald-manager-index @@ -65,7 +65,7 @@ spec: - -e - -c - | - until [ "$(wget --server-response --spider --quiet http://vald-agent-ngt.default.svc.cluster.local:3001/readiness 2>&1 | awk 'NR==1{print $2}')" == "200" ]; do + until [ "$(wget --server-response --spider --quiet http://vald-agent.default.svc.cluster.local:3001/readiness 2>&1 | awk 'NR==1{print $2}')" == "200" ]; do echo "waiting for agent to be ready..." sleep 2; done diff --git a/k8s/metrics/grafana/dashboards/01-vald-agent.yaml b/k8s/metrics/grafana/dashboards/01-vald-agent.yaml index bcd37c9522a..ffa5e406a03 100644 --- a/k8s/metrics/grafana/dashboards/01-vald-agent.yaml +++ b/k8s/metrics/grafana/dashboards/01-vald-agent.yaml @@ -1066,7 +1066,7 @@ data: "calcs": [ "lastNotNull" ], - "fields": "/^ngt_version$/", + "fields": "/^algorithm_info$/", "values": false }, "text": {}, @@ -1080,7 +1080,7 @@ data: "uid": "prometheus" }, "editorMode": "code", - "expr": "label_replace(app_version_info{exported_kubernetes_namespace=\"$Namespace\", kubernetes_name=~\"$ReplicaSet\", target_pod=~\"$PodName\"}, \"ngt_version\", \"v$1\", \"ngt_version\", \"([^v].*)\")", + "expr": "label_replace(app_version_info{exported_kubernetes_namespace=\"$Namespace\", kubernetes_name=~\"$ReplicaSet\", target_pod=~\"$PodName\"}, \"algorithm_info\", \"v$1\", \"algorithm_info\", \"([^v].*)\")", "format": "table", "instant": true, "interval": "", diff --git a/k8s/operator/helm/clusterrole.yaml b/k8s/operator/helm/clusterrole.yaml index f9b6db87440..3e9d1860a59 100644 --- a/k8s/operator/helm/clusterrole.yaml +++ b/k8s/operator/helm/clusterrole.yaml @@ -35,6 +35,18 @@ rules: verbs: - create - patch + - apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - rbac.authorization.k8s.io resources: @@ -187,3 +199,24 @@ rules: - patch - update - watch + - apiGroups: + - snapshot.storage.k8s.io + resources: + - volumesnapshots + verbs: + - get + - list + - watch + - create + - delete + - patch + - apiGroups: + - "" + resources: + - persistentvolumeclaims + verbs: + - get + - list + - watch + - create + - delete diff --git a/k8s/operator/helm/crds/valdrelease.yaml b/k8s/operator/helm/crds/valdrelease.yaml index 543411bdbd0..fa8d749b294 100644 --- a/k8s/operator/helm/crds/valdrelease.yaml +++ b/k8s/operator/helm/crds/valdrelease.yaml @@ -116,6 +116,11 @@ spec: items: type: object x-kubernetes-preserve-unknown-fields: true + algorithm: + type: string + enum: + - ngt + - faiss annotations: type: object x-kubernetes-preserve-unknown-fields: true @@ -317,7 +322,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -392,12 +397,23 @@ spec: type: string enabled: type: boolean + hpa: + type: object + properties: + enabled: + type: boolean + targetCPUUtilizationPercentage: + type: integer label_key: type: string + maxReplicas: + type: integer + minimum: 1 + minReplicas: + type: integer + minimum: 1 name: type: string - replica: - type: integer service: type: object properties: @@ -758,6 +774,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -1248,7 +1266,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -1618,6 +1636,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -2098,7 +2118,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -2459,6 +2479,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -2918,7 +2940,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -3316,6 +3338,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -4279,7 +4303,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -4677,6 +4701,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -5314,6 +5340,181 @@ spec: type: boolean duration: type: string + read_client: + 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 index_replica: type: integer minimum: 1 @@ -5438,7 +5639,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -5836,6 +6037,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -6053,10 +6256,7 @@ spec: items: type: object x-kubernetes-preserve-unknown-fields: true - manager: - type: object - properties: - index: + mirror: type: object properties: affinity: @@ -6107,42 +6307,1108 @@ spec: annotations: type: object x-kubernetes-preserve-unknown-fields: true - corrector: + clusterRole: type: object properties: - agent_namespace: + enabled: + type: boolean + name: type: string - discoverer: + clusterRoleBinding: + type: object + properties: + enabled: + type: boolean + name: + type: string + enabled: + type: boolean + env: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + externalTrafficPolicy: + type: string + gateway_config: + type: object + properties: + client: type: object properties: - agent_client_options: + addrs: + type: array + items: + type: string + backoff: 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: + 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 + colocation: + type: string + discovery_duration: + type: string + gateway_addr: + type: string + group: + type: string + namespace: + 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 + pod_name: + type: string + register_duration: + type: string + self_mirror_addr: + type: string + hpa: + type: object + properties: + enabled: + type: boolean + targetCPUUtilizationPercentage: + type: integer + image: + type: object + properties: + pullPolicy: + type: string + enum: + - Always + - Never + - IfNotPresent + repository: + type: string + tag: + type: string + ingress: + type: object + properties: + annotations: + type: object + x-kubernetes-preserve-unknown-fields: true + defaultBackend: + type: object + properties: + enabled: + type: boolean + enabled: + type: boolean + host: + type: string + pathType: + type: string + servicePort: + type: string + initContainers: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + internalTrafficPolicy: + type: string + kind: + type: string + enum: + - Deployment + - DaemonSet + logging: + type: object + properties: + format: + type: string + enum: + - raw + - json + level: + type: string + enum: + - debug + - info + - warn + - error + - fatal + logger: + type: string + enum: + - glg + - zap + maxReplicas: + type: integer + minimum: 0 + maxUnavailable: + type: string + minReplicas: + type: integer + minimum: 0 + name: + type: string + nodeName: + type: string + nodeSelector: + type: object + x-kubernetes-preserve-unknown-fields: true + observability: + type: object + properties: + enabled: + type: boolean + metrics: + type: object + properties: + enable_cgo: + type: boolean + enable_goroutine: + type: boolean + enable_memory: + type: boolean + enable_version_info: + type: boolean + version_info_labels: + type: array + items: + type: string + enum: + - vald_version + - server_name + - git_commit + - build_time + - go_version + - go_os + - go_arch + - cgo_enabled + - algorithm_info + - build_cpu_info_flags + otlp: + type: object + properties: + attribute: + type: object + properties: + namespace: + type: string + node_name: + type: string + pod_name: + type: string + service_name: + type: string + collector_endpoint: + type: string + metrics_export_interval: + type: string + metrics_export_timeout: + type: string + trace_batch_timeout: + type: string + trace_export_timeout: + type: string + trace_max_export_batch_size: + type: integer + trace_max_queue_size: + type: integer + trace: + type: object + properties: + enabled: + type: boolean + podAnnotations: + type: object + x-kubernetes-preserve-unknown-fields: true + podPriority: + type: object + properties: + enabled: + type: boolean + value: + type: integer + podSecurityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + progressDeadlineSeconds: + type: integer + resources: + type: object + properties: + limits: + type: object + x-kubernetes-preserve-unknown-fields: true + requests: + type: object + x-kubernetes-preserve-unknown-fields: true + revisionHistoryLimit: + type: integer + minimum: 0 + rollingUpdate: + type: object + properties: + maxSurge: + type: string + maxUnavailable: + type: string + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + server_config: + type: object + properties: + full_shutdown_duration: + type: string + healths: + type: object + properties: + liveness: + type: object + properties: + enabled: + type: boolean + host: + type: string + livenessProbe: + type: object + properties: + failureThreshold: + type: integer + httpGet: + type: object + properties: + path: + type: string + port: + type: string + scheme: + type: string + initialDelaySeconds: + type: integer + periodSeconds: + type: integer + successThreshold: + type: integer + timeoutSeconds: + type: integer + port: + type: integer + maximum: 65535 + minimum: 0 + server: + type: object + properties: + http: + type: object + properties: + handler_timeout: + type: string + idle_timeout: + type: string + read_header_timeout: + type: string + read_timeout: + type: string + shutdown_duration: + type: string + write_timeout: + type: string + mode: + type: string + network: + type: string + enum: + - tcp + - tcp4 + - tcp6 + - udp + - udp4 + - udp6 + - unix + - unixgram + - unixpacket + probe_wait_time: + 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 + socket_path: + type: string + servicePort: + type: integer + maximum: 65535 + minimum: 0 + readiness: + type: object + properties: + enabled: + type: boolean + host: + type: string + port: + type: integer + maximum: 65535 + minimum: 0 + readinessProbe: + type: object + properties: + failureThreshold: + type: integer + httpGet: + type: object + properties: + path: + type: string + port: + type: string + scheme: + type: string + initialDelaySeconds: + type: integer + periodSeconds: + type: integer + successThreshold: + type: integer + timeoutSeconds: + type: integer + server: + type: object + properties: + http: + type: object + properties: + handler_timeout: + type: string + idle_timeout: + type: string + read_header_timeout: + type: string + read_timeout: + type: string + shutdown_duration: + type: string + write_timeout: + type: string + mode: + type: string + network: + type: string + enum: + - tcp + - tcp4 + - tcp6 + - udp + - udp4 + - udp6 + - unix + - unixgram + - unixpacket + probe_wait_time: + 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 + socket_path: + type: string + servicePort: + type: integer + maximum: 65535 + minimum: 0 + startup: + type: object + properties: + enabled: + type: boolean + port: + type: integer + maximum: 65535 + minimum: 0 + startupProbe: + type: object + properties: + failureThreshold: + type: integer + httpGet: + type: object + properties: + path: + type: string + port: + type: string + scheme: + type: string + initialDelaySeconds: + type: integer + periodSeconds: + type: integer + successThreshold: + type: integer + timeoutSeconds: + type: integer + metrics: + type: object + properties: + pprof: + type: object + properties: + enabled: + type: boolean + host: + type: string + port: + type: integer + maximum: 65535 + minimum: 0 + server: + type: object + properties: + http: + type: object + properties: + handler_timeout: + type: string + idle_timeout: + type: string + read_header_timeout: + type: string + read_timeout: + type: string + shutdown_duration: + type: string + write_timeout: + type: string + mode: + type: string + network: + type: string + enum: + - tcp + - tcp4 + - tcp6 + - udp + - udp4 + - udp6 + - unix + - unixgram + - unixpacket + probe_wait_time: + 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 + socket_path: + type: string + servicePort: + type: integer + maximum: 65535 + minimum: 0 + servers: + type: object + properties: + grpc: + type: object + properties: + enabled: + type: boolean + host: + type: string + port: + type: integer + maximum: 65535 + minimum: 0 + server: + type: object + properties: + grpc: + type: object + properties: + bidirectional_stream_concurrency: + type: integer + connection_timeout: + type: string + enable_admin: + type: boolean + enable_reflection: + type: boolean + header_table_size: + type: integer + initial_conn_window_size: + type: integer + initial_window_size: + type: integer + interceptors: + type: array + items: + type: string + enum: + - RecoverInterceptor + - AccessLogInterceptor + - TraceInterceptor + - MetricInterceptor + keepalive: + type: object + properties: + max_conn_age: + type: string + max_conn_age_grace: + type: string + max_conn_idle: + type: string + min_time: + type: string + permit_without_stream: + type: boolean + time: + type: string + timeout: + type: string + max_header_list_size: + type: integer + max_receive_message_size: + type: integer + max_send_message_size: + type: integer + read_buffer_size: + type: integer + write_buffer_size: + type: integer + mode: + type: string + network: + type: string + enum: + - tcp + - tcp4 + - tcp6 + - udp + - udp4 + - udp6 + - unix + - unixgram + - unixpacket + probe_wait_time: + type: string + restart: + type: boolean + 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 + socket_path: + type: string + servicePort: + type: integer + maximum: 65535 + minimum: 0 + rest: + type: object + properties: + enabled: + type: boolean + host: + type: string + port: + type: integer + maximum: 65535 + minimum: 0 + server: + type: object + properties: + http: + type: object + properties: + handler_timeout: + type: string + idle_timeout: + type: string + read_header_timeout: + type: string + read_timeout: + type: string + shutdown_duration: + type: string + write_timeout: + type: string + mode: + type: string + network: + type: string + enum: + - tcp + - tcp4 + - tcp6 + - udp + - udp4 + - udp6 + - unix + - unixgram + - unixpacket + probe_wait_time: + 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 + socket_path: + type: string + servicePort: + type: integer + maximum: 65535 + minimum: 0 + tls: + type: object + properties: + ca: + type: string + cert: + type: string + enabled: + type: boolean + insecure_skip_verify: + type: boolean + key: + type: string + service: + type: object + properties: + annotations: + type: object + x-kubernetes-preserve-unknown-fields: true + labels: + type: object + x-kubernetes-preserve-unknown-fields: true + serviceAccount: + type: object + properties: + enabled: + type: boolean + name: + type: string + serviceType: + type: string + enum: + - ClusterIP + - LoadBalancer + - NodePort + terminationGracePeriodSeconds: + type: integer + minimum: 0 + time_zone: + type: string + tolerations: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + topologySpreadConstraints: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + version: + type: string + pattern: ^v[0-9]+\.[0-9]+\.[0-9]$ + volumeMounts: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + volumes: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + manager: + type: object + properties: + index: + type: object + properties: + affinity: + type: object + properties: + nodeAffinity: + type: object + properties: + preferredDuringSchedulingIgnoredDuringExecution: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + requiredDuringSchedulingIgnoredDuringExecution: + type: object + properties: + nodeSelectorTerms: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + podAffinity: + type: object + properties: + preferredDuringSchedulingIgnoredDuringExecution: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + requiredDuringSchedulingIgnoredDuringExecution: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + podAntiAffinity: + type: object + properties: + preferredDuringSchedulingIgnoredDuringExecution: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + requiredDuringSchedulingIgnoredDuringExecution: + type: array + items: + type: object + x-kubernetes-preserve-unknown-fields: true + annotations: + type: object + x-kubernetes-preserve-unknown-fields: true + corrector: + type: object + properties: + agent_namespace: + type: string + discoverer: + type: object + properties: + agent_client_options: + 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: @@ -6528,7 +7794,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -6891,6 +8157,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -7500,7 +8768,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -7863,6 +9131,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -8518,7 +9788,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -8644,7 +9914,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -9013,6 +10283,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -9642,7 +10914,7 @@ spec: - go_os - go_arch - cgo_enabled - - ngt_version + - algorithm_info - build_cpu_info_flags otlp: type: object @@ -10005,6 +11277,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: @@ -10521,6 +11795,8 @@ spec: type: integer connection_timeout: type: string + enable_admin: + type: boolean enable_reflection: type: boolean header_table_size: diff --git a/pkg/agent/core/faiss/config/config.go b/pkg/agent/core/faiss/config/config.go new file mode 100644 index 00000000000..a8319db60bc --- /dev/null +++ b/pkg/agent/core/faiss/config/config.go @@ -0,0 +1,77 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Package setting stores all server application settings +package config + +import ( + "github.com/vdaas/vald/internal/config" + "github.com/vdaas/vald/internal/errors" +) + +// GlobalConfig is type alias for config.GlobalConfig. +type GlobalConfig = config.GlobalConfig + +// Data represent a application setting data content (config.yaml). +// In K8s environment, this configuration is stored in K8s ConfigMap. +type Data struct { + GlobalConfig `json:",inline" yaml:",inline"` + + // Server represent all server configurations + Server *config.Servers `json:"server_config" yaml:"server_config"` + + // Observability represent observability configurations + Observability *config.Observability `json:"observability" yaml:"observability"` + + // Faiss represent faiss core configuration + Faiss *config.Faiss `json:"faiss" yaml:"faiss"` +} + +// NewConfig returns the Data struct or error from the given file path. +func NewConfig(path string) (cfg *Data, err error) { + cfg = new(Data) + + err = config.Read(path, &cfg) + if err != nil { + return nil, err + } + + if cfg != nil { + cfg.Bind() + } else { + return nil, errors.ErrInvalidConfig + } + + if cfg.Server != nil { + cfg.Server = cfg.Server.Bind() + } else { + return nil, errors.ErrInvalidConfig + } + + if cfg.Observability != nil { + cfg.Observability = cfg.Observability.Bind() + } else { + cfg.Observability = new(config.Observability).Bind() + } + + if cfg.Faiss != nil { + cfg.Faiss = cfg.Faiss.Bind() + } else { + return nil, errors.ErrInvalidConfig + } + + return cfg, nil +} diff --git a/pkg/agent/core/faiss/handler/doc.go b/pkg/agent/core/faiss/handler/doc.go new file mode 100644 index 00000000000..104280dbd15 --- /dev/null +++ b/pkg/agent/core/faiss/handler/doc.go @@ -0,0 +1,17 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package handler diff --git a/pkg/agent/core/faiss/handler/grpc/handler.go b/pkg/agent/core/faiss/handler/grpc/handler.go new file mode 100644 index 00000000000..d88c48063bb --- /dev/null +++ b/pkg/agent/core/faiss/handler/grpc/handler.go @@ -0,0 +1,95 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Package grpc provides grpc server logic +package grpc + +import ( + "reflect" + + agent "github.com/vdaas/vald/apis/grpc/v1/agent/core" + "github.com/vdaas/vald/apis/grpc/v1/payload" + "github.com/vdaas/vald/apis/grpc/v1/vald" + "github.com/vdaas/vald/internal/errors" + "github.com/vdaas/vald/internal/log" + "github.com/vdaas/vald/internal/sync/errgroup" + "github.com/vdaas/vald/pkg/agent/core/faiss/service" +) + +type Server interface { + agent.AgentServer + vald.Server +} + +type server struct { + name string + ip string + faiss service.Faiss + eg errgroup.Group + streamConcurrency int + agent.UnimplementedAgentServer + vald.UnimplementedValdServer +} + +const ( + apiName = "vald/agent/core/faiss" + faissResourceType = "vald/internal/core/algorithm" +) + +var errFaiss = new(errors.FaissError) + +func New(opts ...Option) (Server, error) { + s := new(server) + + for _, opt := range append(defaultOptions, opts...) { + if err := opt(s); err != nil { + werr := errors.ErrOptionFailed(err, reflect.ValueOf(opt)) + + e := new(errors.ErrCriticalOption) + if errors.As(err, &e) { + log.Error(werr) + return nil, werr + } + log.Warn(werr) + } + } + return s, nil +} + +func (s *server) newLocations(uuids ...string) (locs *payload.Object_Locations) { + if len(uuids) == 0 { + return nil + } + locs = &payload.Object_Locations{ + Locations: make([]*payload.Object_Location, 0, len(uuids)), + } + for _, uuid := range uuids { + locs.Locations = append(locs.GetLocations(), &payload.Object_Location{ + Name: s.name, + Uuid: uuid, + Ips: []string{s.ip}, + }) + } + return locs +} + +func (s *server) newLocation(uuid string) *payload.Object_Location { + locs := s.newLocations(uuid) + if locs != nil && locs.GetLocations() != nil && len(locs.GetLocations()) > 0 { + return locs.Locations[0] + } + return nil +} diff --git a/pkg/agent/core/faiss/handler/grpc/index.go b/pkg/agent/core/faiss/handler/grpc/index.go new file mode 100644 index 00000000000..03d5eb2813d --- /dev/null +++ b/pkg/agent/core/faiss/handler/grpc/index.go @@ -0,0 +1,180 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package grpc + +import ( + "context" + "fmt" + + "github.com/vdaas/vald/apis/grpc/v1/payload" + "github.com/vdaas/vald/internal/errors" + "github.com/vdaas/vald/internal/info" + "github.com/vdaas/vald/internal/log" + "github.com/vdaas/vald/internal/net/grpc/errdetails" + "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/trace" +) + +func (s *server) CreateIndex(ctx context.Context, c *payload.Control_CreateIndexRequest) (res *payload.Empty, err error) { + ctx, span := trace.StartSpan(ctx, apiName+".CreateIndex") + defer func() { + if span != nil { + span.End() + } + }() + res = new(payload.Empty) + err = s.faiss.CreateIndex(ctx) + if err != nil { + if errors.Is(err, errors.ErrUncommittedIndexNotFound) { + err = status.WrapWithFailedPrecondition(fmt.Sprintf("CreateIndex API failed"), err, + &errdetails.RequestInfo{ + ServingData: errdetails.Serialize(c), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.CreateIndex", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, + &errdetails.PreconditionFailure{ + Violations: []*errdetails.PreconditionFailureViolation{ + { + Type: "uncommitted index is empty", + Subject: "failed to CreateIndex operation caused by empty uncommitted indices", + }, + }, + }, info.Get()) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeFailedPrecondition(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err + } + log.Error(err) + err = status.WrapWithInternal(fmt.Sprintf("CreateIndex API failed"), err, + &errdetails.RequestInfo{ + ServingData: errdetails.Serialize(c), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.CreateIndex", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Error(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err + } + return res, nil +} + +func (s *server) SaveIndex(ctx context.Context, _ *payload.Empty) (res *payload.Empty, err error) { + ctx, span := trace.StartSpan(ctx, apiName+".SaveIndex") + defer func() { + if span != nil { + span.End() + } + }() + res = new(payload.Empty) + err = s.faiss.SaveIndex(ctx) + if err != nil { + log.Error(err) + err = status.WrapWithInternal("SaveIndex API failed to save indices", err, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.SaveIndex", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Error(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err + } + return res, nil +} + +func (s *server) CreateAndSaveIndex(ctx context.Context, c *payload.Control_CreateIndexRequest) (res *payload.Empty, err error) { + ctx, span := trace.StartSpan(ctx, apiName+".CreateAndSaveIndex") + defer func() { + if span != nil { + span.End() + } + }() + res = new(payload.Empty) + err = s.faiss.CreateAndSaveIndex(ctx) + if err != nil { + if errors.Is(err, errors.ErrUncommittedIndexNotFound) { + err = status.WrapWithFailedPrecondition(fmt.Sprintf("CreateAndSaveIndex API failed to create indexes pool_size = %d", c.GetPoolSize()), err, + &errdetails.RequestInfo{ + ServingData: errdetails.Serialize(c), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.CreateAndSaveIndex", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, + &errdetails.PreconditionFailure{ + Violations: []*errdetails.PreconditionFailureViolation{ + { + Type: "uncommitted index is empty", + Subject: "failed to CreateAndSaveIndex operation caused by empty uncommitted indices", + }, + }, + }, info.Get()) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeFailedPrecondition(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err + } + err = status.WrapWithInternal(fmt.Sprintf("CreateAndSaveIndex API failed to create indexes pool_size = %d", c.GetPoolSize()), err, + &errdetails.RequestInfo{ + ServingData: errdetails.Serialize(c), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.CreateAndSaveIndex", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Error(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInternal(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err + } + return res, nil +} + +func (s *server) IndexInfo(ctx context.Context, c *payload.Empty) (res *payload.Info_Index_Count, err error) { + _, span := trace.StartSpan(ctx, apiName+".IndexInfo") + defer func() { + if span != nil { + span.End() + } + }() + + return &payload.Info_Index_Count{ + Stored: uint32(s.faiss.Len()), + Uncommitted: uint32(s.faiss.InsertVQueueBufferLen() + s.faiss.DeleteVQueueBufferLen()), + Indexing: s.faiss.IsIndexing(), + Saving: s.faiss.IsSaving(), + }, nil +} diff --git a/pkg/agent/core/faiss/handler/grpc/insert.go b/pkg/agent/core/faiss/handler/grpc/insert.go new file mode 100644 index 00000000000..356afc06326 --- /dev/null +++ b/pkg/agent/core/faiss/handler/grpc/insert.go @@ -0,0 +1,141 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package grpc + +import ( + "context" + "fmt" + + "github.com/vdaas/vald/apis/grpc/v1/payload" + "github.com/vdaas/vald/apis/grpc/v1/vald" + "github.com/vdaas/vald/internal/errors" + "github.com/vdaas/vald/internal/info" + "github.com/vdaas/vald/internal/log" + "github.com/vdaas/vald/internal/net/grpc/codes" + "github.com/vdaas/vald/internal/net/grpc/errdetails" + "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/trace" + "go.opentelemetry.io/otel/attribute" +) + +func (s *server) Insert(ctx context.Context, req *payload.Insert_Request) (res *payload.Object_Location, err error) { + _, span := trace.StartSpan(ctx, apiName+"/"+vald.InsertRPCName) + defer func() { + if span != nil { + span.End() + } + }() + vec := req.GetVector() + if len(vec.GetVector()) != s.faiss.GetDimensionSize() { + err = errors.ErrIncompatibleDimensionSize(len(vec.GetVector()), int(s.faiss.GetDimensionSize())) + err = status.WrapWithInvalidArgument("Insert API Incompatible Dimension Size detected", + err, + &errdetails.RequestInfo{ + RequestId: vec.GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vector dimension size", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Insert", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err + } + + err = s.faiss.InsertWithTime(vec.GetId(), vec.GetVector(), req.GetConfig().GetTimestamp()) + if err != nil { + var attrs []attribute.KeyValue + + if errors.Is(err, errors.ErrUUIDAlreadyExists(vec.GetId())) { + err = status.WrapWithAlreadyExists(fmt.Sprintf("Insert API uuid %s already exists", vec.GetId()), err, + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Insert", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + attrs = trace.StatusCodeAlreadyExists(err.Error()) + } else if errors.Is(err, errors.ErrUUIDNotFound(0)) { + err = status.WrapWithInvalidArgument(fmt.Sprintf("Insert API empty uuid \"%s\" was given", vec.GetId()), err, + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "uuid", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Insert", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + attrs = trace.StatusCodeInvalidArgument(err.Error()) + } else { + var ( + st *status.Status + msg string + ) + st, msg, err = status.ParseError(err, codes.Internal, + "failed to parse Insert gRPC error response", + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Insert", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + attrs = trace.FromGRPCStatus(st.Code(), msg) + } + if span != nil { + span.RecordError(err) + span.SetAttributes(attrs...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err + } + return s.newLocation(vec.GetId()), nil +} + +func (s *server) StreamInsert(stream vald.Insert_StreamInsertServer) (err error) { + return s.UnimplementedValdServer.UnimplementedInsertServer.StreamInsert(stream) +} + +func (s *server) MultiInsert(ctx context.Context, reqs *payload.Insert_MultiRequest) (res *payload.Object_Locations, err error) { + return s.UnimplementedValdServer.UnimplementedInsertServer.MultiInsert(ctx, reqs) +} diff --git a/pkg/agent/core/faiss/handler/grpc/linear_search.go b/pkg/agent/core/faiss/handler/grpc/linear_search.go new file mode 100644 index 00000000000..b871582f288 --- /dev/null +++ b/pkg/agent/core/faiss/handler/grpc/linear_search.go @@ -0,0 +1,48 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package grpc + +import ( + "context" + + "github.com/vdaas/vald/apis/grpc/v1/payload" + "github.com/vdaas/vald/apis/grpc/v1/vald" +) + +func (s *server) LinearSearch(ctx context.Context, req *payload.Search_Request) (res *payload.Search_Response, err error) { + return s.UnimplementedValdServer.UnimplementedSearchServer.LinearSearch(ctx, req) +} + +func (s *server) LinearSearchByID(ctx context.Context, req *payload.Search_IDRequest) (res *payload.Search_Response, err error) { + return s.UnimplementedValdServer.UnimplementedSearchServer.LinearSearchByID(ctx, req) +} + +func (s *server) StreamLinearSearch(stream vald.Search_StreamLinearSearchServer) (err error) { + return s.UnimplementedValdServer.UnimplementedSearchServer.StreamLinearSearch(stream) +} + +func (s *server) StreamLinearSearchByID(stream vald.Search_StreamLinearSearchByIDServer) (err error) { + return s.UnimplementedValdServer.UnimplementedSearchServer.StreamLinearSearchByID(stream) +} + +func (s *server) MultiLinearSearch(ctx context.Context, reqs *payload.Search_MultiRequest) (res *payload.Search_Responses, errs error) { + return s.UnimplementedValdServer.UnimplementedSearchServer.MultiLinearSearch(ctx, reqs) +} + +func (s *server) MultiLinearSearchByID(ctx context.Context, reqs *payload.Search_MultiIDRequest) (res *payload.Search_Responses, errs error) { + return s.UnimplementedValdServer.UnimplementedSearchServer.MultiLinearSearchByID(ctx, reqs) +} diff --git a/pkg/agent/core/faiss/handler/grpc/object.go b/pkg/agent/core/faiss/handler/grpc/object.go new file mode 100644 index 00000000000..ff5d43596f7 --- /dev/null +++ b/pkg/agent/core/faiss/handler/grpc/object.go @@ -0,0 +1,96 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package grpc + +import ( + "context" + "fmt" + + "github.com/vdaas/vald/apis/grpc/v1/payload" + "github.com/vdaas/vald/apis/grpc/v1/vald" + "github.com/vdaas/vald/internal/errors" + "github.com/vdaas/vald/internal/log" + "github.com/vdaas/vald/internal/net/grpc/errdetails" + "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/trace" +) + +func (s *server) Exists(ctx context.Context, uid *payload.Object_ID) (res *payload.Object_ID, err error) { + _, span := trace.StartSpan(ctx, apiName+"/"+vald.ExistsRPCName) + defer func() { + if span != nil { + span.End() + } + }() + uuid := uid.GetId() + if len(uuid) == 0 { + err = errors.ErrInvalidUUID(uuid) + err = status.WrapWithInvalidArgument(fmt.Sprintf("Exists API invalid argument for uuid \"%s\" detected", uuid), err, + &errdetails.RequestInfo{ + RequestId: uuid, + ServingData: errdetails.Serialize(uid), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "uuid", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Exists", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + log.Warn(err) + return nil, err + } + if _, ok := s.faiss.Exists(uuid); !ok { + err = errors.ErrObjectIDNotFound(uid.GetId()) + err = status.WrapWithNotFound(fmt.Sprintf("Exists API meta %s's uuid not found", uid.GetId()), err, + &errdetails.RequestInfo{ + RequestId: uid.GetId(), + ServingData: errdetails.Serialize(uid), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Exists", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, + uid.GetId()) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeNotFound(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err + } + return uid, nil +} + +func (s *server) GetObject(ctx context.Context, id *payload.Object_VectorRequest) (res *payload.Object_Vector, err error) { + return s.UnimplementedValdServer.UnimplementedObjectServer.GetObject(ctx, id) +} + +func (s *server) StreamGetObject(stream vald.Object_StreamGetObjectServer) (err error) { + return s.UnimplementedValdServer.UnimplementedObjectServer.StreamGetObject(stream) +} diff --git a/pkg/agent/core/faiss/handler/grpc/option.go b/pkg/agent/core/faiss/handler/grpc/option.go new file mode 100644 index 00000000000..439889b7bfa --- /dev/null +++ b/pkg/agent/core/faiss/handler/grpc/option.go @@ -0,0 +1,100 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Package grpc provides grpc server logic +package grpc + +import ( + "os" + "runtime" + + "github.com/vdaas/vald/internal/errors" + "github.com/vdaas/vald/internal/log" + "github.com/vdaas/vald/internal/net" + "github.com/vdaas/vald/internal/sync/errgroup" + "github.com/vdaas/vald/pkg/agent/core/faiss/service" +) + +// Option represents the functional option for server. +type Option func(*server) error + +var defaultOptions = []Option{ + WithName(func() string { + name, err := os.Hostname() + if err != nil { + log.Warn(err) + } + return name + }()), + WithIP(net.LoadLocalIP()), + WithStreamConcurrency(runtime.GOMAXPROCS(-1) * 10), + WithErrGroup(errgroup.Get()), +} + +// WithIP returns the option to set the IP for server. +func WithIP(ip string) Option { + return func(s *server) error { + if len(ip) == 0 { + return errors.NewErrInvalidOption("ip", ip) + } + s.ip = ip + return nil + } +} + +// WithName returns the option to set the name for server. +func WithName(name string) Option { + return func(s *server) error { + if len(name) == 0 { + return errors.NewErrInvalidOption("name", name) + } + s.name = name + return nil + } +} + +// WithFaiss returns the option to set the Faiss service for server. +func WithFaiss(f service.Faiss) Option { + return func(s *server) error { + if f == nil { + return errors.NewErrInvalidOption("faiss", f) + } + s.faiss = f + return nil + } +} + +// WithStreamConcurrency returns the option to set the stream concurrency for server. +func WithStreamConcurrency(c int) Option { + return func(s *server) error { + if c <= 0 { + return errors.NewErrInvalidOption("streamConcurrency", c) + } + s.streamConcurrency = c + return nil + } +} + +// WithErrGroup returns the option to set the error group for server. +func WithErrGroup(eg errgroup.Group) Option { + return func(s *server) error { + if eg == nil { + return errors.NewErrInvalidOption("errGroup", eg) + } + s.eg = eg + return nil + } +} diff --git a/pkg/agent/core/faiss/handler/grpc/remove.go b/pkg/agent/core/faiss/handler/grpc/remove.go new file mode 100644 index 00000000000..9cbaea4496a --- /dev/null +++ b/pkg/agent/core/faiss/handler/grpc/remove.go @@ -0,0 +1,134 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package grpc + +import ( + "context" + "fmt" + + "github.com/vdaas/vald/apis/grpc/v1/payload" + "github.com/vdaas/vald/apis/grpc/v1/vald" + "github.com/vdaas/vald/internal/errors" + "github.com/vdaas/vald/internal/info" + "github.com/vdaas/vald/internal/log" + "github.com/vdaas/vald/internal/net/grpc/errdetails" + "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/trace" + "go.opentelemetry.io/otel/attribute" +) + +func (s *server) Remove(ctx context.Context, req *payload.Remove_Request) (res *payload.Object_Location, err error) { + _, span := trace.StartSpan(ctx, apiName+"/"+vald.RemoveRPCName) + defer func() { + if span != nil { + span.End() + } + }() + id := req.GetId() + uuid := id.GetId() + if len(uuid) == 0 { + err = errors.ErrInvalidUUID(uuid) + err = status.WrapWithInvalidArgument(fmt.Sprintf("Remove API invalid argument for uuid \"%s\" detected", uuid), err, + &errdetails.RequestInfo{ + RequestId: uuid, + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "uuid", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Remove", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + log.Warn(err) + return nil, err + } + err = s.faiss.DeleteWithTime(uuid, req.GetConfig().GetTimestamp()) + if err != nil { + var attrs []attribute.KeyValue + if errors.Is(err, errors.ErrObjectIDNotFound(uuid)) { + err = status.WrapWithNotFound(fmt.Sprintf("Remove API uuid %s not found", uuid), err, + &errdetails.RequestInfo{ + RequestId: uuid, + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Remove", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + attrs = trace.StatusCodeNotFound(err.Error()) + } else if errors.Is(err, errors.ErrUUIDNotFound(0)) { + err = status.WrapWithInvalidArgument(fmt.Sprintf("Remove API invalid argument for uuid \"%s\" detected", uuid), err, + &errdetails.RequestInfo{ + RequestId: uuid, + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "uuid", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Remove", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + attrs = trace.StatusCodeInvalidArgument(err.Error()) + } else { + err = status.WrapWithInternal("Remove API failed", err, + &errdetails.RequestInfo{ + RequestId: uuid, + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Remove", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Error(err) + attrs = trace.StatusCodeInternal(err.Error()) + } + if span != nil { + span.RecordError(err) + span.SetAttributes(attrs...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err + } + return s.newLocation(uuid), nil +} + +func (s *server) StreamRemove(stream vald.Remove_StreamRemoveServer) (err error) { + return s.UnimplementedValdServer.UnimplementedRemoveServer.StreamRemove(stream) +} + +func (s *server) MultiRemove(ctx context.Context, reqs *payload.Remove_MultiRequest) (res *payload.Object_Locations, err error) { + return s.UnimplementedValdServer.UnimplementedRemoveServer.MultiRemove(ctx, reqs) +} diff --git a/pkg/agent/core/faiss/handler/grpc/search.go b/pkg/agent/core/faiss/handler/grpc/search.go new file mode 100644 index 00000000000..bbe5a45c4de --- /dev/null +++ b/pkg/agent/core/faiss/handler/grpc/search.go @@ -0,0 +1,179 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package grpc + +import ( + "context" + "fmt" + + "github.com/vdaas/vald/apis/grpc/v1/payload" + "github.com/vdaas/vald/apis/grpc/v1/vald" + "github.com/vdaas/vald/internal/errors" + "github.com/vdaas/vald/internal/info" + "github.com/vdaas/vald/internal/log" + "github.com/vdaas/vald/internal/net/grpc/errdetails" + "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/trace" + "go.opentelemetry.io/otel/attribute" +) + +func (s *server) Search(ctx context.Context, req *payload.Search_Request) (res *payload.Search_Response, err error) { + _, span := trace.StartSpan(ctx, apiName+"/"+vald.SearchRPCName) + defer func() { + if span != nil { + span.End() + } + }() + if len(req.GetVector()) != s.faiss.GetDimensionSize() { + err = errors.ErrIncompatibleDimensionSize(len(req.GetVector()), int(s.faiss.GetDimensionSize())) + err = status.WrapWithInvalidArgument("Search API Incompatible Dimension Size detected", + err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vector dimension size", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Search", + }) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err + } + res, err = s.faiss.Search( + req.GetConfig().GetNum(), + 1, + req.GetVector()) + if err == nil && res == nil { + return nil, nil + } + if err != nil || res == nil { + var attrs []attribute.KeyValue + switch { + case errors.Is(err, errors.ErrCreateIndexingIsInProgress): + err = status.WrapWithAborted("Search API aborted to process search request due to createing indices is in progress", err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Search", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Debug(err) + attrs = trace.StatusCodeAborted(err.Error()) + case errors.Is(err, errors.ErrEmptySearchResult), + err == nil && res == nil, + 0 < req.GetConfig().GetMinNum() && len(res.GetResults()) < int(req.GetConfig().GetMinNum()): + err = status.WrapWithNotFound(fmt.Sprintf("Search API requestID %s's search result not found", req.GetConfig().GetRequestId()), err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Search", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Debug(err) + attrs = trace.StatusCodeNotFound(err.Error()) + case errors.As(err, &errFaiss): + log.Errorf("faiss core process returned error: %v", err) + err = status.WrapWithInternal("Search API failed to process search request due to faiss core process returned error", err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Search/core.faiss", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Error(err) + attrs = trace.StatusCodeInternal(err.Error()) + case errors.Is(err, errors.ErrIncompatibleDimensionSize(len(req.GetVector()), int(s.faiss.GetDimensionSize()))): + err = status.WrapWithInvalidArgument("Search API Incompatible Dimension Size detected", + err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vector dimension size", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Search", + }) + log.Warn(err) + attrs = trace.StatusCodeInvalidArgument(err.Error()) + default: + err = status.WrapWithInternal("Search API failed to process search request", err, + &errdetails.RequestInfo{ + RequestId: req.GetConfig().GetRequestId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Search", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Error(err) + attrs = trace.StatusCodeInternal(err.Error()) + } + if span != nil { + span.RecordError(err) + span.SetAttributes(attrs...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err + } + res.RequestId = req.GetConfig().GetRequestId() + return res, nil +} + +func (s *server) SearchByID(ctx context.Context, req *payload.Search_IDRequest) (res *payload.Search_Response, err error) { + return s.UnimplementedValdServer.UnimplementedSearchServer.SearchByID(ctx, req) +} + +func (s *server) StreamSearch(stream vald.Search_StreamSearchServer) (err error) { + return s.UnimplementedValdServer.UnimplementedSearchServer.StreamSearch(stream) +} + +func (s *server) StreamSearchByID(stream vald.Search_StreamSearchByIDServer) (err error) { + return s.UnimplementedValdServer.UnimplementedSearchServer.StreamSearchByID(stream) +} + +func (s *server) MultiSearch(ctx context.Context, reqs *payload.Search_MultiRequest) (res *payload.Search_Responses, errs error) { + return s.UnimplementedValdServer.UnimplementedSearchServer.MultiSearch(ctx, reqs) +} + +func (s *server) MultiSearchByID(ctx context.Context, reqs *payload.Search_MultiIDRequest) (res *payload.Search_Responses, errs error) { + return s.UnimplementedValdServer.UnimplementedSearchServer.MultiSearchByID(ctx, reqs) +} diff --git a/pkg/agent/core/faiss/handler/grpc/update.go b/pkg/agent/core/faiss/handler/grpc/update.go new file mode 100644 index 00000000000..ca5b4f371db --- /dev/null +++ b/pkg/agent/core/faiss/handler/grpc/update.go @@ -0,0 +1,173 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package grpc + +import ( + "context" + "fmt" + + "github.com/vdaas/vald/apis/grpc/v1/payload" + "github.com/vdaas/vald/apis/grpc/v1/vald" + "github.com/vdaas/vald/internal/errors" + "github.com/vdaas/vald/internal/info" + "github.com/vdaas/vald/internal/log" + "github.com/vdaas/vald/internal/net/grpc/errdetails" + "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/internal/observability/trace" + "go.opentelemetry.io/otel/attribute" +) + +func (s *server) Update(ctx context.Context, req *payload.Update_Request) (res *payload.Object_Location, err error) { + _, span := trace.StartSpan(ctx, apiName+"/"+vald.UpdateRPCName) + defer func() { + if span != nil { + span.End() + } + }() + + vec := req.GetVector() + if len(vec.GetVector()) != s.faiss.GetDimensionSize() { + err = errors.ErrIncompatibleDimensionSize(len(vec.GetVector()), int(s.faiss.GetDimensionSize())) + err = status.WrapWithInvalidArgument("Update API Incompatible Dimension Size detected", + err, + &errdetails.RequestInfo{ + RequestId: vec.GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "vector dimension size", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Update", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + if span != nil { + span.RecordError(err) + span.SetAttributes(trace.StatusCodeInvalidArgument(err.Error())...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err + } + + uuid := vec.GetId() + if len(uuid) == 0 { + err = errors.ErrInvalidUUID(uuid) + err = status.WrapWithInvalidArgument(fmt.Sprintf("Update API invalid argument for uuid \"%s\" detected", uuid), err, + &errdetails.RequestInfo{ + RequestId: uuid, + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "uuid", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Update", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + return nil, err + } + + err = s.faiss.UpdateWithTime(uuid, vec.GetVector(), req.GetConfig().GetTimestamp()) + if err != nil { + var attrs []attribute.KeyValue + if errors.Is(err, errors.ErrObjectIDNotFound(vec.GetId())) { + err = status.WrapWithNotFound(fmt.Sprintf("Update API uuid %s not found", vec.GetId()), err, + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Update", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + attrs = trace.StatusCodeNotFound(err.Error()) + } else if errors.Is(err, errors.ErrUUIDNotFound(0)) || errors.Is(err, errors.ErrInvalidDimensionSize(len(vec.GetVector()), s.faiss.GetDimensionSize())) { + err = status.WrapWithInvalidArgument(fmt.Sprintf("Update API invalid argument for uuid \"%s\" vec \"%v\" detected", vec.GetId(), vec.GetVector()), err, + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.BadRequest{ + FieldViolations: []*errdetails.BadRequestFieldViolation{ + { + Field: "uuid or vector", + Description: err.Error(), + }, + }, + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Update", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + attrs = trace.StatusCodeInvalidArgument(err.Error()) + } else if errors.Is(err, errors.ErrUUIDAlreadyExists(vec.GetId())) { + err = status.WrapWithAlreadyExists(fmt.Sprintf("Update API uuid %s's same data already exists", vec.GetId()), err, + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Update", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }) + log.Warn(err) + attrs = trace.StatusCodeAlreadyExists(err.Error()) + } else { + err = status.WrapWithInternal("Update API failed", err, + &errdetails.RequestInfo{ + RequestId: req.GetVector().GetId(), + ServingData: errdetails.Serialize(req), + }, + &errdetails.ResourceInfo{ + ResourceType: faissResourceType + "/faiss.Update", + ResourceName: fmt.Sprintf("%s: %s(%s)", apiName, s.name, s.ip), + }, info.Get()) + log.Error(err) + attrs = trace.StatusCodeInternal(err.Error()) + } + if span != nil { + span.RecordError(err) + span.SetAttributes(attrs...) + span.SetStatus(trace.StatusError, err.Error()) + } + return nil, err + } + + return s.newLocation(vec.GetId()), nil +} + +func (s *server) StreamUpdate(stream vald.Update_StreamUpdateServer) (err error) { + return s.UnimplementedValdServer.UnimplementedUpdateServer.StreamUpdate(stream) +} + +func (s *server) MultiUpdate(ctx context.Context, reqs *payload.Update_MultiRequest) (res *payload.Object_Locations, err error) { + return s.UnimplementedValdServer.UnimplementedUpdateServer.MultiUpdate(ctx, reqs) +} diff --git a/pkg/agent/core/faiss/handler/grpc/upsert.go b/pkg/agent/core/faiss/handler/grpc/upsert.go new file mode 100644 index 00000000000..38675e58c97 --- /dev/null +++ b/pkg/agent/core/faiss/handler/grpc/upsert.go @@ -0,0 +1,36 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package grpc + +import ( + "context" + + "github.com/vdaas/vald/apis/grpc/v1/payload" + "github.com/vdaas/vald/apis/grpc/v1/vald" +) + +func (s *server) Upsert(ctx context.Context, req *payload.Upsert_Request) (loc *payload.Object_Location, err error) { + return s.UnimplementedValdServer.UnimplementedUpsertServer.Upsert(ctx, req) +} + +func (s *server) StreamUpsert(stream vald.Upsert_StreamUpsertServer) (err error) { + return s.UnimplementedValdServer.UnimplementedUpsertServer.StreamUpsert(stream) +} + +func (s *server) MultiUpsert(ctx context.Context, reqs *payload.Upsert_MultiRequest) (res *payload.Object_Locations, err error) { + return s.UnimplementedValdServer.UnimplementedUpsertServer.MultiUpsert(ctx, reqs) +} diff --git a/pkg/agent/core/faiss/handler/rest/handler.go b/pkg/agent/core/faiss/handler/rest/handler.go new file mode 100644 index 00000000000..108e8087156 --- /dev/null +++ b/pkg/agent/core/faiss/handler/rest/handler.go @@ -0,0 +1,175 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Package rest provides rest api logic +package rest + +import ( + "net/http" + + "github.com/vdaas/vald/apis/grpc/v1/payload" + "github.com/vdaas/vald/internal/net/http/dump" + "github.com/vdaas/vald/internal/net/http/json" + "github.com/vdaas/vald/pkg/agent/core/faiss/handler/grpc" +) + +type Handler interface { + Index(w http.ResponseWriter, r *http.Request) (int, error) + Exists(w http.ResponseWriter, r *http.Request) (int, error) + Search(w http.ResponseWriter, r *http.Request) (int, error) + SearchByID(w http.ResponseWriter, r *http.Request) (int, error) + LinearSearch(w http.ResponseWriter, r *http.Request) (int, error) + LinearSearchByID(w http.ResponseWriter, r *http.Request) (int, error) + Insert(w http.ResponseWriter, r *http.Request) (int, error) + MultiInsert(w http.ResponseWriter, r *http.Request) (int, error) + Update(w http.ResponseWriter, r *http.Request) (int, error) + MultiUpdate(w http.ResponseWriter, r *http.Request) (int, error) + Remove(w http.ResponseWriter, r *http.Request) (int, error) + MultiRemove(w http.ResponseWriter, r *http.Request) (int, error) + CreateIndex(w http.ResponseWriter, r *http.Request) (int, error) + SaveIndex(w http.ResponseWriter, r *http.Request) (int, error) + CreateAndSaveIndex(w http.ResponseWriter, r *http.Request) (int, error) + GetObject(w http.ResponseWriter, r *http.Request) (int, error) +} + +type handler struct { + agent grpc.Server +} + +func New(opts ...Option) Handler { + h := new(handler) + + for _, opt := range append(defaultOptions, opts...) { + opt(h) + } + return h +} + +func (h *handler) Index(w http.ResponseWriter, r *http.Request) (int, error) { + data := make(map[string]interface{}) + return json.Handler(w, r, &data, func() (interface{}, error) { + return dump.Request(nil, data, r) + }) +} + +func (h *handler) Search(w http.ResponseWriter, r *http.Request) (code int, err error) { + var req *payload.Search_Request + return json.Handler(w, r, &req, func() (interface{}, error) { + return h.agent.Search(r.Context(), req) + }) +} + +func (h *handler) SearchByID(w http.ResponseWriter, r *http.Request) (code int, err error) { + var req *payload.Search_IDRequest + return json.Handler(w, r, &req, func() (interface{}, error) { + return h.agent.SearchByID(r.Context(), req) + }) +} + +func (h *handler) LinearSearch(w http.ResponseWriter, r *http.Request) (code int, err error) { + var req *payload.Search_Request + return json.Handler(w, r, &req, func() (interface{}, error) { + return h.agent.LinearSearch(r.Context(), req) + }) +} + +func (h *handler) LinearSearchByID(w http.ResponseWriter, r *http.Request) (code int, err error) { + var req *payload.Search_IDRequest + return json.Handler(w, r, &req, func() (interface{}, error) { + return h.agent.LinearSearchByID(r.Context(), req) + }) +} + +func (h *handler) Insert(w http.ResponseWriter, r *http.Request) (code int, err error) { + var req *payload.Insert_Request + return json.Handler(w, r, &req, func() (interface{}, error) { + return h.agent.Insert(r.Context(), req) + }) +} + +func (h *handler) MultiInsert(w http.ResponseWriter, r *http.Request) (code int, err error) { + var req *payload.Insert_MultiRequest + return json.Handler(w, r, &req, func() (interface{}, error) { + return h.agent.MultiInsert(r.Context(), req) + }) +} + +func (h *handler) Update(w http.ResponseWriter, r *http.Request) (code int, err error) { + var req *payload.Update_Request + return json.Handler(w, r, &req, func() (interface{}, error) { + return h.agent.Update(r.Context(), req) + }) +} + +func (h *handler) MultiUpdate(w http.ResponseWriter, r *http.Request) (code int, err error) { + var req *payload.Update_MultiRequest + return json.Handler(w, r, &req, func() (interface{}, error) { + return h.agent.MultiUpdate(r.Context(), req) + }) +} + +func (h *handler) Remove(w http.ResponseWriter, r *http.Request) (code int, err error) { + var req *payload.Remove_Request + return json.Handler(w, r, &req, func() (interface{}, error) { + return h.agent.Remove(r.Context(), req) + }) +} + +func (h *handler) MultiRemove(w http.ResponseWriter, r *http.Request) (code int, err error) { + var req *payload.Remove_MultiRequest + return json.Handler(w, r, &req, func() (interface{}, error) { + return h.agent.MultiRemove(r.Context(), req) + }) +} + +func (h *handler) CreateIndex(w http.ResponseWriter, r *http.Request) (code int, err error) { + var req *payload.Control_CreateIndexRequest + return json.Handler(w, r, &req, func() (interface{}, error) { + return h.agent.CreateIndex(r.Context(), req) + }) +} + +func (h *handler) SaveIndex(w http.ResponseWriter, r *http.Request) (code int, err error) { + var req *payload.Empty + return json.Handler(w, r, &req, func() (interface{}, error) { + return h.agent.SaveIndex(r.Context(), req) + }) +} + +func (h *handler) CreateAndSaveIndex(w http.ResponseWriter, r *http.Request) (code int, err error) { + var req *payload.Control_CreateIndexRequest + return json.Handler(w, r, &req, func() (interface{}, error) { + _, err = h.agent.CreateIndex(r.Context(), req) + if err != nil { + return nil, err + } + return h.agent.SaveIndex(r.Context(), nil) + }) +} + +func (h *handler) GetObject(w http.ResponseWriter, r *http.Request) (code int, err error) { + var req *payload.Object_VectorRequest + return json.Handler(w, r, &req, func() (interface{}, error) { + return h.agent.GetObject(r.Context(), req) + }) +} + +func (h *handler) Exists(w http.ResponseWriter, r *http.Request) (code int, err error) { + var req *payload.Object_ID + return json.Handler(w, r, &req, func() (interface{}, error) { + return h.agent.Exists(r.Context(), req) + }) +} diff --git a/pkg/agent/core/faiss/handler/rest/option.go b/pkg/agent/core/faiss/handler/rest/option.go new file mode 100644 index 00000000000..40f46059e99 --- /dev/null +++ b/pkg/agent/core/faiss/handler/rest/option.go @@ -0,0 +1,30 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Package rest provides rest api logic +package rest + +import "github.com/vdaas/vald/pkg/agent/core/faiss/handler/grpc" + +type Option func(*handler) + +var defaultOptions = []Option{} + +func WithAgent(a grpc.Server) Option { + return func(h *handler) { + h.agent = a + } +} diff --git a/internal/core/algorithm/ngt/model.go b/pkg/agent/core/faiss/model/faiss.go similarity index 75% rename from internal/core/algorithm/ngt/model.go rename to pkg/agent/core/faiss/model/faiss.go index 68947e4c201..7964be47b37 100644 --- a/internal/core/algorithm/ngt/model.go +++ b/pkg/agent/core/faiss/model/faiss.go @@ -14,12 +14,10 @@ // limitations under the License. // -// Package ngt provides implementation of Go API for https://github.com/yahoojapan/NGT -package ngt +// Package model defines object structure +package model -// SearchResult is struct for comfortable use in Go. -type SearchResult struct { - ID uint32 +type Distance struct { + ID string Distance float32 - Error error } diff --git a/pkg/agent/core/faiss/router/option.go b/pkg/agent/core/faiss/router/option.go new file mode 100644 index 00000000000..502e3f6555e --- /dev/null +++ b/pkg/agent/core/faiss/router/option.go @@ -0,0 +1,51 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Package router provides implementation of Go API for routing http Handler wrapped by rest.Func +package router + +import ( + "github.com/vdaas/vald/internal/sync/errgroup" + "github.com/vdaas/vald/pkg/agent/core/faiss/handler/rest" +) + +// Option represents the functional option for router. +type Option func(*router) + +var defaultOptions = []Option{ + WithTimeout("3s"), +} + +// WithHandler returns the option to set the handler for the router. +func WithHandler(h rest.Handler) Option { + return func(r *router) { + r.handler = h + } +} + +// WithTimeout returns the option to set the timeout for the router. +func WithTimeout(timeout string) Option { + return func(r *router) { + r.timeout = timeout + } +} + +// WithErrGroup returns the option to set the error group for the router. +func WithErrGroup(eg errgroup.Group) Option { + return func(r *router) { + r.eg = eg + } +} diff --git a/pkg/agent/core/faiss/router/router.go b/pkg/agent/core/faiss/router/router.go new file mode 100644 index 00000000000..ae8b36cd192 --- /dev/null +++ b/pkg/agent/core/faiss/router/router.go @@ -0,0 +1,170 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Package router provides implementation of Go API for routing http Handler wrapped by rest.Func +package router + +import ( + "net/http" + + "github.com/vdaas/vald/internal/net/http/middleware" + "github.com/vdaas/vald/internal/net/http/routing" + "github.com/vdaas/vald/internal/sync/errgroup" + "github.com/vdaas/vald/pkg/agent/core/faiss/handler/rest" +) + +type router struct { + handler rest.Handler + eg errgroup.Group + timeout string +} + +// New returns REST route&method information from handler interface. +func New(opts ...Option) http.Handler { + r := new(router) + + for _, opt := range append(defaultOptions, opts...) { + opt(r) + } + + h := r.handler + + return routing.New( + routing.WithMiddleware( + middleware.NewTimeout( + middleware.WithTimeout(r.timeout), + middleware.WithErrorGroup(r.eg), + )), + routing.WithRoutes([]routing.Route{ + { + "Index", + []string{ + http.MethodGet, + }, + "/", + h.Index, + }, + { + "Search", + []string{ + http.MethodPost, + }, + "/search", + h.Search, + }, + { + "Search By ID", + []string{ + http.MethodPost, + }, + "/id/search", + h.SearchByID, + }, + { + "LinearSearch", + []string{ + http.MethodPost, + }, + "/linearsearch", + h.LinearSearch, + }, + { + "LinearSearch By ID", + []string{ + http.MethodPost, + }, + "/id/linearsearch", + h.LinearSearchByID, + }, + { + "Insert", + []string{ + http.MethodPost, + }, + "/insert", + h.Insert, + }, + { + "Multiple Insert", + []string{ + http.MethodPost, + }, + "/insert/multi", + h.MultiInsert, + }, + { + "Update", + []string{ + http.MethodPost, + http.MethodPatch, + http.MethodPut, + }, + "/update", + h.Update, + }, + { + "Multiple Update", + []string{ + http.MethodPost, + http.MethodPatch, + http.MethodPut, + }, + "/update/multi", + h.MultiUpdate, + }, + { + "Remove", + []string{ + http.MethodDelete, + }, + "/delete", + h.Remove, + }, + { + "Multiple Remove", + []string{ + http.MethodDelete, + http.MethodPost, + }, + "/delete/multi", + h.MultiRemove, + }, + { + "Create Index", + []string{ + http.MethodPost, + }, + "/index/create", + h.CreateIndex, + }, + { + "Save Index", + []string{ + http.MethodGet, + }, + "/index/save", + h.SaveIndex, + }, + { + "GetObject", + []string{ + http.MethodGet, + }, + "/object/{id}", + h.GetObject, + }, + }...)) +} diff --git a/pkg/agent/core/faiss/service/faiss.go b/pkg/agent/core/faiss/service/faiss.go new file mode 100644 index 00000000000..3f8a85c7442 --- /dev/null +++ b/pkg/agent/core/faiss/service/faiss.go @@ -0,0 +1,1306 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Package service manages the main logic of server. +package service + +import ( + "context" + "encoding/gob" + "io/fs" + "math" + "os" + "path/filepath" + "reflect" + "runtime" + "sync/atomic" + "time" + + "github.com/vdaas/vald/apis/grpc/v1/payload" + "github.com/vdaas/vald/internal/config" + "github.com/vdaas/vald/internal/core/algorithm" + core "github.com/vdaas/vald/internal/core/algorithm/faiss" + "github.com/vdaas/vald/internal/errors" + "github.com/vdaas/vald/internal/file" + "github.com/vdaas/vald/internal/log" + "github.com/vdaas/vald/internal/observability/trace" + "github.com/vdaas/vald/internal/safety" + "github.com/vdaas/vald/internal/strings" + "github.com/vdaas/vald/internal/sync" + "github.com/vdaas/vald/internal/sync/errgroup" + "github.com/vdaas/vald/pkg/agent/internal/kvs" + "github.com/vdaas/vald/pkg/agent/internal/metadata" + "github.com/vdaas/vald/pkg/agent/internal/vqueue" +) + +type ( + Faiss interface { + Start(ctx context.Context) <-chan error + Train(nb int, xb []float32) error + Insert(uuid string, xb []float32) error + InsertWithTime(uuid string, vec []float32, t int64) error + Update(uuid string, vec []float32) error + UpdateWithTime(uuid string, vec []float32, t int64) error + CreateIndex(ctx context.Context) error + SaveIndex(ctx context.Context) error + CreateAndSaveIndex(ctx context.Context) error + Search(k, nq uint32, xq []float32) (*payload.Search_Response, error) + Delete(uuid string) error + DeleteWithTime(uuid string, t int64) error + Exists(uuid string) (uint32, bool) + IsIndexing() bool + IsSaving() bool + NumberOfCreateIndexExecution() uint64 + NumberOfProactiveGCExecution() uint64 + Len() uint64 + InsertVQueueBufferLen() uint64 + DeleteVQueueBufferLen() uint64 + GetDimensionSize() int + GetTrainSize() int + Close(ctx context.Context) error + } + + faiss struct { + core core.Faiss + eg errgroup.Group + kvs kvs.BidiMap + fmu sync.Mutex + fmap map[string]int64 // failure map for index + vq vqueue.Queue + addVecs []float32 + addIds []int64 + isTrained bool + trainSize int + icnt uint64 + + // statuses + indexing atomic.Value + saving atomic.Value + cimu sync.Mutex // create index mutex + lastNocie uint64 // last number of create index execution this value prevent unnecessary saveindex + + // counters + nocie uint64 // number of create index execution + nogce uint64 // number of proactive GC execution + wfci uint64 // wait for create indexing + + // configurations + inMem bool // in-memory mode + dim int // dimension size + nlist int // the number of Voronoi cells + m int // number of subquantizers + alen int // auto indexing length + dur time.Duration // auto indexing check duration + sdur time.Duration // auto save index check duration + lim time.Duration // auto indexing time limit + minLit time.Duration // minimum load index timeout + maxLit time.Duration // maximum load index timeout + litFactor time.Duration // load index timeout factor + enableProactiveGC bool // if this value is true, agent component will purge GC memory more proactive + enableCopyOnWrite bool // if this value is true, agent component will write backup file using Copy on Write and saves old files to the old directory + path string // index path + smu sync.Mutex // save index lock + tmpPath atomic.Value // temporary index path for Copy on Write + oldPath string // old volume path + basePath string // index base directory for CoW + cowmu sync.Mutex // copy on write move lock + dcd bool // disable commit daemon + idelay time.Duration // initial delay duration + kvsdbConcurrency int // kvsdb concurrency + } +) + +const ( + kvsFileName = "faiss-meta.kvsdb" + kvsTimestampFileName = "faiss-timestamp.kvsdb" + noTimeStampFile = -1 + + oldIndexDirName = "backup" + originIndexDirName = "origin" + + // ref: https://github.com/facebookresearch/faiss/wiki/FAQ#can-i-ignore-warning-clustering-xxx-points-to-yyy-centroids + // ref: https://github.com/facebookresearch/faiss/blob/main/faiss/Clustering.cpp#L38 + minPointsPerCentroid int = 39 +) + +func New(cfg *config.Faiss, opts ...Option) (Faiss, error) { + var ( + f = &faiss{ + fmap: make(map[string]int64), + dim: cfg.Dimension, + nlist: cfg.Nlist, + m: cfg.M, + enableProactiveGC: cfg.EnableProactiveGC, + enableCopyOnWrite: cfg.EnableCopyOnWrite, + kvsdbConcurrency: cfg.KVSDB.Concurrency, + } + err error + ) + + for _, opt := range append(defaultOptions, opts...) { + if err := opt(f); err != nil { + return nil, errors.ErrOptionFailed(err, reflect.ValueOf(opt)) + } + } + + if len(f.path) == 0 { + f.inMem = true + } + + if f.enableCopyOnWrite && !f.inMem && len(f.path) != 0 { + sep := string(os.PathSeparator) + f.path, err = filepath.Abs(strings.ReplaceAll(f.path, sep+sep, sep)) + if err != nil { + log.Warn(err) + } + + f.basePath = f.path + f.oldPath = file.Join(f.basePath, oldIndexDirName) + f.path = file.Join(f.basePath, originIndexDirName) + err = file.MkdirAll(f.oldPath, fs.ModePerm) + if err != nil { + log.Warn(err) + } + err = file.MkdirAll(f.path, fs.ModePerm) + if err != nil { + log.Warn(err) + } + err = f.mktmp() + if err != nil { + return nil, err + } + } + + err = f.initFaiss( + core.WithDimension(cfg.Dimension), + core.WithNlist(cfg.Nlist), + core.WithM(cfg.M), + core.WithNbitsPerIdx(cfg.NbitsPerIdx), + core.WithMetricType(cfg.MetricType), + ) + if err != nil { + return nil, err + } + + if f.dur == 0 || f.alen == 0 { + f.dcd = true + } + + if f.vq == nil { + f.vq, err = vqueue.New() + if err != nil { + return nil, err + } + } + + f.indexing.Store(false) + f.saving.Store(false) + + return f, nil +} + +func (f *faiss) initFaiss(opts ...core.Option) error { + var err error + + if f.kvs == nil { + f.kvs = kvs.New(kvs.WithConcurrency(f.kvsdbConcurrency)) + } + + if f.inMem { + log.Debug("vald agent starts with in-memory mode") + f.core, err = core.New(opts...) + return err + } + + ctx := context.Background() + err = f.load(ctx, f.path, opts...) + var current uint64 + if err != nil { + if !f.enableCopyOnWrite { + log.Debug("failed to load vald index from %s\t error: %v", f.path, err) + if f.kvs == nil { + f.kvs = kvs.New(kvs.WithConcurrency(f.kvsdbConcurrency)) + } else if f.kvs.Len() > 0 { + f.kvs.Close() + f.kvs = kvs.New(kvs.WithConcurrency(f.kvsdbConcurrency)) + } + + if f.core != nil { + f.core.Close() + f.core = nil + } + f.core, err = core.New(append(opts, core.WithIndexPath(f.path))...) + return err + } + + if errors.Is(err, errors.ErrIndicesAreTooFewComparedToMetadata) && f.kvs != nil { + current = f.kvs.Len() + log.Warnf( + "load vald primary index success from %s\t error: %v\tbut index data are too few %d compared to metadata count now trying to load from old copied index data from %s and compare them", + f.path, + err, + current, + f.oldPath, + ) + } else { + log.Warnf("failed to load vald primary index from %s\t error: %v\ttrying to load from old copied index data from %s", f.path, err, f.oldPath) + } + } else { + return nil + } + + err = f.load(ctx, f.oldPath, opts...) + if err == nil { + if current != 0 && f.kvs.Len() < current { + log.Warnf( + "load vald secondary index success from %s\t error: %v\tbut index data are too few %d compared to primary data now trying to load from primary index data again from %s and start up with them", + f.oldPath, + err, + f.kvs.Len(), + f.oldPath, + ) + + err = f.load(ctx, f.path, opts...) + if err == nil { + return nil + } + } else { + return nil + } + } + + log.Warnf("failed to load vald secondary index from %s and %s\t error: %v\ttrying to load from non-CoW index data from %s for backwards compatibility", f.path, f.oldPath, err, f.basePath) + err = f.load(ctx, f.basePath, opts...) + if err == nil { + file.CopyDir(ctx, f.basePath, f.path) + return nil + } + + tpath := f.tmpPath.Load().(string) + log.Warnf( + "failed to load vald backwards index from %s and %s and %s\t error: %v\tvald agent couldn't find any index from agent volume in %s trying to start as new index from %s", + f.path, + f.oldPath, + f.basePath, + err, + f.basePath, + tpath, + ) + + if f.core != nil { + f.core.Close() + f.core = nil + } + f.core, err = core.New(append(opts, core.WithIndexPath(tpath))...) + if err != nil { + return err + } + + if f.kvs == nil { + f.kvs = kvs.New(kvs.WithConcurrency(f.kvsdbConcurrency)) + } else if f.kvs.Len() > 0 { + f.kvs.Close() + f.kvs = kvs.New(kvs.WithConcurrency(f.kvsdbConcurrency)) + } + + return nil +} + +func (f *faiss) load(ctx context.Context, path string, opts ...core.Option) error { + exist, fi, err := file.ExistsWithDetail(path) + switch { + case !exist, fi == nil, fi != nil && fi.Size() == 0, err != nil && errors.Is(err, fs.ErrNotExist): + err = errors.Wrapf(errors.ErrIndexFileNotFound, "index file does not exists,\tpath: %s,\terr: %v", path, err) + return err + case err != nil && errors.Is(err, fs.ErrPermission): + if fi != nil { + err = errors.Wrap(errors.ErrFailedToOpenFile(err, path, 0, fi.Mode()), "invalid permission for loading index path") + } + return err + case exist && fi != nil && fi.IsDir(): + if fi.Mode().IsDir() && !strings.HasSuffix(path, string(os.PathSeparator)) { + path += string(os.PathSeparator) + } + files, err := filepath.Glob(file.Join(filepath.Dir(path), "*")) + if err != nil || len(files) == 0 { + err = errors.Wrapf(errors.ErrIndexFileNotFound, "index path exists but no file does not exists in the directory,\tpath: %s,\tfiles: %v\terr: %v", path, files, err) + return err + } + if strings.HasSuffix(path, string(os.PathSeparator)) { + path = strings.TrimSuffix(path, string(os.PathSeparator)) + } + } + + metadataPath := file.Join(path, metadata.AgentMetadataFileName) + log.Debugf("index path: %s exists, now starting to check metadata from %s", path, metadataPath) + exist, fi, err = file.ExistsWithDetail(metadataPath) + switch { + case !exist, fi == nil, fi != nil && fi.Size() == 0, err != nil && errors.Is(err, fs.ErrNotExist): + err = errors.Wrapf(errors.ErrIndexFileNotFound, "metadata file does not exists,\tpath: %s,\terr: %v", metadataPath, err) + return err + case err != nil && errors.Is(err, fs.ErrPermission): + if fi != nil { + err = errors.Wrap(errors.ErrFailedToOpenFile(err, metadataPath, 0, fi.Mode()), "invalid permission for loading metadata") + } + return err + } + + log.Debugf("index path: %s and metadata: %s exists, now starting to load metadata", path, metadataPath) + agentMetadata, err := metadata.Load(metadataPath) + if err != nil && errors.Is(err, fs.ErrNotExist) || agentMetadata == nil || agentMetadata.Faiss == nil || agentMetadata.Faiss.IndexCount == 0 { + err = errors.Wrapf(err, "cannot read metadata from path: %s\tmetadata: %s", path, agentMetadata) + return err + } + + kvsFilePath := file.Join(path, kvsFileName) + log.Debugf("index path: %s and metadata: %s exists and successfully load metadata, now starting to load kvs data from %s", path, metadataPath, kvsFilePath) + exist, fi, err = file.ExistsWithDetail(kvsFilePath) + switch { + case !exist, fi == nil, fi != nil && fi.Size() == 0, err != nil && errors.Is(err, fs.ErrNotExist): + err = errors.Wrapf(errors.ErrIndexFileNotFound, "kvsdb file does not exists,\tpath: %s,\terr: %v", kvsFilePath, err) + return err + case err != nil && errors.Is(err, fs.ErrPermission): + if fi != nil { + err = errors.ErrFailedToOpenFile(err, kvsFilePath, 0, fi.Mode()) + } + err = errors.Wrapf(err, "invalid permission for loading kvsdb file from %s", kvsFilePath) + return err + } + + kvsTimestampFilePath := file.Join(path, kvsTimestampFileName) + log.Debugf("now starting to load kvs timestamp data from %s", kvsTimestampFilePath) + exist, fi, err = file.ExistsWithDetail(kvsTimestampFilePath) + switch { + case !exist, fi == nil, fi != nil && fi.Size() == 0, err != nil && errors.Is(err, fs.ErrNotExist): + log.Warnf("timestamp kvsdb file does not exists,\tpath: %s,\terr: %v", kvsTimestampFilePath, err) + case err != nil && errors.Is(err, fs.ErrPermission): + if fi != nil { + err = errors.ErrFailedToOpenFile(err, kvsTimestampFilePath, 0, fi.Mode()) + } + log.Warnf("invalid permission for loading timestamp kvsdb file from %s", kvsTimestampFilePath) + } + + var timeout time.Duration + if agentMetadata != nil && agentMetadata.Faiss != nil { + log.Debugf("the backup index size is %d. starting to load...", agentMetadata.Faiss.IndexCount) + timeout = time.Duration( + math.Min( + math.Max( + float64(agentMetadata.Faiss.IndexCount)*float64(f.litFactor), + float64(f.minLit), + ), + float64(f.maxLit), + ), + ) + } else { + log.Debugf("cannot inspect the backup index size. starting to load default value.") + timeout = time.Duration(math.Min(float64(f.minLit), float64(f.maxLit))) + } + + log.Debugf( + "index path: %s and metadata: %s and kvsdb file: %s and timestamp kvsdb file: %s exists and successfully load metadata, now starting to load full index and kvs data in concurrent", + path, + metadataPath, + kvsFilePath, + kvsTimestampFilePath, + ) + + ctx, cancel := context.WithTimeout(ctx, timeout) + defer cancel() + eg, _ := errgroup.New(ctx) + eg.Go(safety.RecoverFunc(func() (err error) { + if f.core != nil { + f.core.Close() + f.core = nil + } + f.core, err = core.Load(append(opts, core.WithIndexPath(path))...) + if err != nil { + err = errors.Wrapf(err, "failed to load faiss index from path: %s", path) + return err + } + return nil + })) + + eg.Go(safety.RecoverFunc(func() (err error) { + err = f.loadKVS(ctx, path, timeout) + if err != nil { + err = errors.Wrapf(err, "failed to load kvsdb data from path: %s, %s", kvsFilePath, kvsTimestampFilePath) + return err + } + if f.kvs != nil && float64(agentMetadata.Faiss.IndexCount/2) > float64(f.kvs.Len()) { + return errors.ErrIndicesAreTooFewComparedToMetadata + } + return nil + })) + + ech := make(chan error, 1) + // NOTE: when it exceeds the timeout while loading, + // it should exit this function and leave this goroutine running. + f.eg.Go(safety.RecoverFunc(func() error { + defer close(ech) + ech <- safety.RecoverFunc(func() (err error) { + err = eg.Wait() + if err != nil { + log.Error(err) + return err + } + cancel() + return nil + })() + return nil + })) + + select { + case err := <-ech: + return err + case <-ctx.Done(): + if errors.Is(ctx.Err(), context.DeadlineExceeded) { + log.Errorf("cannot load index backup data from %s within the timeout %s. the process is going to be killed.", path, timeout) + err := metadata.Store(metadataPath, + &metadata.Metadata{ + IsInvalid: true, + Faiss: &metadata.Faiss{ + IndexCount: 0, + }, + }, + ) + if err != nil { + return err + } + return errors.ErrIndexLoadTimeout + } + } + + return nil +} + +func (f *faiss) loadKVS(ctx context.Context, path string, timeout time.Duration) (err error) { + ctx, cancel := context.WithTimeout(ctx, timeout) + defer cancel() + eg, _ := errgroup.New(ctx) + + m := make(map[string]uint32) + mt := make(map[string]int64) + + eg.Go(safety.RecoverFunc(func() (err error) { + gob.Register(map[string]uint32{}) + var fi *os.File + fi, err = file.Open( + file.Join(path, kvsFileName), + os.O_RDONLY|os.O_SYNC, + fs.ModePerm, + ) + if err != nil { + return err + } + defer func() { + if fi != nil { + derr := fi.Close() + if derr != nil { + err = errors.Wrap(err, derr.Error()) + } + } + }() + err = gob.NewDecoder(fi).Decode(&m) + if err != nil { + log.Errorf("error decoding kvsdb file,\terr: %v", err) + return err + } + return nil + })) + + eg.Go(safety.RecoverFunc(func() (err error) { + gob.Register(map[string]int64{}) + var ft *os.File + ft, err = file.Open( + file.Join(path, kvsTimestampFileName), + os.O_RDONLY|os.O_SYNC, + fs.ModePerm, + ) + if err != nil { + log.Warnf("error opening timestamp kvsdb file,\terr: %v", err) + } + defer func() { + if ft != nil { + derr := ft.Close() + if derr != nil { + err = errors.Wrap(err, derr.Error()) + } + } + }() + err = gob.NewDecoder(ft).Decode(&mt) + if err != nil { + log.Warnf("error decoding timestamp kvsdb file,\terr: %v", err) + } + return nil + })) + + err = eg.Wait() + if err != nil { + return err + } + + if f.kvs == nil { + f.kvs = kvs.New(kvs.WithConcurrency(f.kvsdbConcurrency)) + } else if f.kvs.Len() > 0 { + f.kvs.Close() + f.kvs = kvs.New(kvs.WithConcurrency(f.kvsdbConcurrency)) + } + for k, id := range m { + if ts, ok := mt[k]; ok { + f.kvs.Set(k, id, ts) + } else { + // NOTE: SaveIndex do not write ngt-timestamp.kvsdb with timestamp 0. + f.kvs.Set(k, id, 0) + f.fmap[k] = int64(id) + } + } + for k := range mt { + if _, ok := m[k]; !ok { + f.fmap[k] = noTimeStampFile + } + } + + return nil +} + +func (f *faiss) mktmp() error { + if !f.enableCopyOnWrite { + return nil + } + + path, err := file.MkdirTemp(file.Join(os.TempDir(), "vald")) + if err != nil { + log.Warnf("failed to create temporary index file path directory %s:\terr: %v", path, err) + return err + } + + f.tmpPath.Store(path) + + return nil +} + +func (f *faiss) Start(ctx context.Context) <-chan error { + if f.dcd { + return nil + } + + ech := make(chan error, 2) + f.eg.Go(safety.RecoverFunc(func() (err error) { + defer close(ech) + if f.dur <= 0 { + f.dur = math.MaxInt64 + } + if f.sdur <= 0 { + f.sdur = math.MaxInt64 + } + if f.lim <= 0 { + f.lim = math.MaxInt64 + } + + if f.idelay > 0 { + timer := time.NewTimer(f.idelay) + select { + case <-ctx.Done(): + timer.Stop() + return ctx.Err() + case <-timer.C: + } + timer.Stop() + } + + tick := time.NewTicker(f.dur) + sTick := time.NewTicker(f.sdur) + limit := time.NewTicker(f.lim) + defer tick.Stop() + defer sTick.Stop() + defer limit.Stop() + for { + err = nil + select { + case <-ctx.Done(): + err = f.CreateIndex(ctx) + if err != nil && !errors.Is(err, errors.ErrUncommittedIndexNotFound) { + ech <- err + return errors.Wrap(ctx.Err(), err.Error()) + } + return ctx.Err() + case <-tick.C: + if f.vq.IVQLen() >= f.alen { + err = f.CreateIndex(ctx) + } + case <-limit.C: + err = f.CreateAndSaveIndex(ctx) + case <-sTick.C: + err = f.SaveIndex(ctx) + } + if err != nil && err != errors.ErrUncommittedIndexNotFound { + ech <- err + runtime.Gosched() + err = nil + } + } + })) + + return ech +} + +func (f *faiss) Train(nb int, xb []float32) error { + err := f.core.Train(nb, xb) + if err != nil { + log.Errorf("failed to faiss train", err) + return err + } + + return nil +} + +func (f *faiss) Insert(uuid string, vec []float32) error { + return f.insert(uuid, vec, time.Now().UnixNano(), true) +} + +func (f *faiss) InsertWithTime(uuid string, vec []float32, t int64) error { + if t <= 0 { + t = time.Now().UnixNano() + } + + return f.insert(uuid, vec, t, true) +} + +func (f *faiss) insert(uuid string, xb []float32, t int64, validation bool) error { + if len(uuid) == 0 { + err := errors.ErrUUIDNotFound(0) + return err + } + + if validation { + _, ok := f.Exists(uuid) + if ok { + return errors.ErrUUIDAlreadyExists(uuid) + } + } + + return f.vq.PushInsert(uuid, xb, t) +} + +func (f *faiss) Update(uuid string, vec []float32) error { + return f.update(uuid, vec, time.Now().UnixNano()) +} + +func (f *faiss) UpdateWithTime(uuid string, vec []float32, t int64) error { + if t <= 0 { + t = time.Now().UnixNano() + } + return f.update(uuid, vec, t) +} + +func (f *faiss) update(uuid string, vec []float32, t int64) (err error) { + if err = f.readyForUpdate(uuid, vec); err != nil { + return err + } + + err = f.delete(uuid, t, true) // `true` is to return NotFound error with non-existent ID + if err != nil { + return err + } + + t++ + return f.insert(uuid, vec, t, false) +} + +func (f *faiss) readyForUpdate(uuid string, vec []float32) (err error) { + if len(uuid) == 0 { + return errors.ErrUUIDNotFound(0) + } + + if len(vec) != f.GetDimensionSize() { + return errors.ErrInvalidDimensionSize(len(vec), f.GetDimensionSize()) + } + + // not impl GetObject() + + return nil +} + +func (f *faiss) CreateIndex(ctx context.Context) error { + ctx, span := trace.StartSpan(ctx, "vald/agent-faiss/service/Faiss.CreateIndex") + defer func() { + if span != nil { + span.End() + } + }() + + ic := f.vq.IVQLen() + f.vq.DVQLen() + (len(f.addVecs) / f.dim) + if ic == 0 { + return errors.ErrUncommittedIndexNotFound + } + + wf := atomic.AddUint64(&f.wfci, 1) + if wf > 1 { + atomic.AddUint64(&f.wfci, ^uint64(0)) + log.Debugf("concurrent create index waiting detected this request will be ignored, concurrent: %d", wf) + return nil + } + + err := func() error { + ticker := time.NewTicker(time.Millisecond * 100) + defer ticker.Stop() + // wait for not indexing & not saving + for f.IsIndexing() || f.IsSaving() { + runtime.Gosched() + select { + case <-ctx.Done(): + atomic.AddUint64(&f.wfci, ^uint64(0)) + return ctx.Err() + case <-ticker.C: + } + } + atomic.AddUint64(&f.wfci, ^uint64(0)) + return nil + }() + if err != nil { + return err + } + + f.cimu.Lock() + defer f.cimu.Unlock() + f.indexing.Store(true) + defer f.indexing.Store(false) + defer f.gc() + now := time.Now().UnixNano() + ic = f.vq.IVQLen() + f.vq.DVQLen() + (len(f.addVecs) / f.dim) + if ic == 0 { + return errors.ErrUncommittedIndexNotFound + } + + log.Infof("create index operation started, uncommitted indexes = %d", ic) + log.Debug("create index delete phase started") + f.vq.RangePopDelete(ctx, now, func(uuid string) bool { + log.Debugf("start delete operation for kvsdb id: %s", uuid) + oid, ok := f.kvs.Delete(uuid) + if !ok { + log.Warn(errors.ErrObjectIDNotFound(uuid)) + return true + } + log.Debugf("start remove operation for faiss index id: %s, oid: %d", uuid, oid) + ntotal, err := f.core.Remove(1, []int64{int64(oid)}) + if err != nil { + log.Errorf("failed to remove oid: %d from faiss index. error: %v", oid, err) + f.fmu.Lock() + f.fmap[uuid] = int64(oid) + f.fmu.Unlock() + } + log.Debugf("removed from faiss index and kvsdb id: %s, oid: %d, index size: %d", uuid, oid, ntotal) + return true + }) + log.Debug("create index delete phase finished") + + f.gc() + + log.Debug("create index insert phase started") + f.vq.RangePopInsert(ctx, now, func(uuid string, vector []float32, timestamp int64) bool { + log.Debugf("start stack operation for faiss index id: %s, icnt: %d", uuid, uint32(f.icnt)) + f.addVecs = append(f.addVecs, vector...) + f.addIds = append(f.addIds, int64(f.icnt)) + + log.Debugf("start insert operation for kvsdb id: %s, icnt: %d", uuid, uint32(f.icnt)) + f.kvs.Set(uuid, uint32(f.icnt), timestamp) + atomic.AddUint64(&f.icnt, 1) + + f.fmu.Lock() + _, ok := f.fmap[uuid] + if ok { + delete(f.fmap, uuid) + } + f.fmu.Unlock() + log.Debugf("finished to insert index and kvsdb id: %s, icnt: %d", uuid, uint32(f.icnt)) + return true + }) + + var max int + if f.nlist > int(math.Pow(2, float64(f.m))) { + max = f.nlist + } else { + max = int(math.Pow(2, float64(f.m))) + } + if !f.isTrained && len(f.addVecs)/f.dim >= max*minPointsPerCentroid { + log.Debug("faiss train phase started") + log.Debugf("max * minPointsPerCentroid: %d", max*minPointsPerCentroid) + err := f.core.Train(len(f.addVecs)/f.dim, f.addVecs) + if err != nil { + log.Errorf("failed to faiss train", err) + return err + } + f.isTrained = true + f.trainSize = len(f.addVecs) / f.dim + log.Debug("faiss train phase finished") + } + if f.isTrained && len(f.addVecs) > 0 { + log.Debug("faiss add phase started") + ntotal, err := f.core.Add(len(f.addVecs)/f.dim, f.addVecs, f.addIds) + if err != nil { + log.Errorf("failed to faiss add", err) + return err + } + f.addVecs = nil + f.addIds = nil + log.Debugf("is trained: %v, index size: %d", f.isTrained, ntotal) + log.Debug("faiss add phase finished") + } + log.Debug("create index insert phase finished") + + atomic.AddUint64(&f.nocie, 1) + log.Info("create index operation finished") + + return nil +} + +func (f *faiss) SaveIndex(ctx context.Context) error { + ctx, span := trace.StartSpan(ctx, "vald/agent-faiss/service/Faiss.SaveIndex") + defer func() { + if span != nil { + span.End() + } + }() + + if !f.inMem { + return f.saveIndex(ctx) + } + + return nil +} + +func (f *faiss) saveIndex(ctx context.Context) error { + nocie := atomic.LoadUint64(&f.nocie) + if atomic.LoadUint64(&f.lastNocie) == nocie || !f.isTrained { + return nil + } + atomic.SwapUint64(&f.lastNocie, nocie) + + err := func() error { + ticker := time.NewTicker(time.Second) + defer ticker.Stop() + // wait for not indexing & not saving + for f.IsIndexing() || f.IsSaving() { + runtime.Gosched() + select { + case <-ctx.Done(): + return ctx.Err() + case <-ticker.C: + } + } + return nil + }() + if err != nil { + return err + } + + f.saving.Store(true) + defer f.gc() + defer f.saving.Store(false) + + // no cleanup invalid index + + eg, ectx := errgroup.New(ctx) + // we want to ensure the acutal kvs size between kvsdb and metadata, + // so we create this counter to count the actual kvs size instead of using kvs.Len() + var ( + kvsLen uint64 + path string + ) + + if f.enableCopyOnWrite { + path = f.tmpPath.Load().(string) + } else { + path = f.path + } + + f.smu.Lock() + defer f.smu.Unlock() + + eg.Go(safety.RecoverFunc(func() (err error) { + if f.kvs.Len() > 0 && path != "" { + m := make(map[string]uint32, f.Len()) + mt := make(map[string]int64, f.Len()) + var mu sync.Mutex + + f.kvs.Range(ectx, func(key string, id uint32, ts int64) bool { + mu.Lock() + m[key] = id + mt[key] = ts + mu.Unlock() + atomic.AddUint64(&kvsLen, 1) + return true + }) + + var fi *os.File + fi, err = file.Open( + file.Join(path, kvsFileName), + os.O_WRONLY|os.O_CREATE|os.O_TRUNC, + fs.ModePerm, + ) + if err != nil { + return err + } + defer func() { + if fi != nil { + derr := fi.Close() + if derr != nil { + err = errors.Wrap(err, derr.Error()) + } + } + }() + + gob.Register(map[string]uint32{}) + err = gob.NewEncoder(fi).Encode(&m) + if err != nil { + return err + } + + err = fi.Sync() + if err != nil { + return err + } + + m = make(map[string]uint32) + + var ft *os.File + ft, err = file.Open( + file.Join(path, kvsTimestampFileName), + os.O_WRONLY|os.O_CREATE|os.O_TRUNC, + fs.ModePerm, + ) + if err != nil { + return err + } + defer func() { + if ft != nil { + derr := ft.Close() + if derr != nil { + err = errors.Wrap(err, derr.Error()) + } + } + }() + + gob.Register(map[string]int64{}) + err = gob.NewEncoder(ft).Encode(&mt) + if err != nil { + return err + } + + err = ft.Sync() + if err != nil { + return err + } + + mt = make(map[string]int64) + } + + return nil + })) + + eg.Go(safety.RecoverFunc(func() (err error) { + f.fmu.Lock() + fl := len(f.fmap) + f.fmu.Unlock() + + if fl > 0 && path != "" { + var fi *os.File + fi, err = file.Open( + file.Join(path, "invalid-"+kvsFileName), + os.O_WRONLY|os.O_CREATE|os.O_TRUNC, + fs.ModePerm, + ) + if err != nil { + return err + } + defer func() { + if fi != nil { + derr := fi.Close() + if derr != nil { + err = errors.Wrap(err, derr.Error()) + } + } + }() + + gob.Register(map[string]int64{}) + f.fmu.Lock() + err = gob.NewEncoder(fi).Encode(&f.fmap) + f.fmu.Unlock() + if err != nil { + return err + } + + err = fi.Sync() + if err != nil { + return err + } + } + + return nil + })) + + eg.Go(safety.RecoverFunc(func() error { + return f.core.SaveIndexWithPath(path) + })) + + err = eg.Wait() + if err != nil { + return err + } + + err = metadata.Store( + file.Join(path, metadata.AgentMetadataFileName), + &metadata.Metadata{ + IsInvalid: false, + Faiss: &metadata.Faiss{ + IndexCount: kvsLen, + }, + }, + ) + if err != nil { + return err + } + + return f.moveAndSwitchSavedData(ctx) +} + +func (f *faiss) moveAndSwitchSavedData(ctx context.Context) error { + if !f.enableCopyOnWrite { + return nil + } + + var err error + f.cowmu.Lock() + defer f.cowmu.Unlock() + + err = file.MoveDir(ctx, f.path, f.oldPath) + if err != nil { + log.Warnf("failed to backup backup data from %s to %s error: %v", f.path, f.oldPath, err) + } + + path := f.tmpPath.Load().(string) + err = file.MoveDir(ctx, path, f.path) + if err != nil { + log.Warnf("failed to move temporary index data from %s to %s error: %v, trying to rollback secondary backup data from %s to %s", path, f.path, f.oldPath, f.path, err) + return file.MoveDir(ctx, f.oldPath, f.path) + } + defer log.Warnf("finished to copy index from %s => %s => %s", path, f.path, f.oldPath) + + return f.mktmp() +} + +func (f *faiss) CreateAndSaveIndex(ctx context.Context) error { + ctx, span := trace.StartSpan(ctx, "vald/agent-faiss/service/Faiss.CreateAndSaveIndex") + defer func() { + if span != nil { + span.End() + } + }() + + err := f.CreateIndex(ctx) + if err != nil && + !errors.Is(err, errors.ErrUncommittedIndexNotFound) && + !errors.Is(err, context.Canceled) && + !errors.Is(err, context.DeadlineExceeded) { + return err + } + + return f.SaveIndex(ctx) +} + +func (f *faiss) Search(k, nq uint32, xq []float32) (res *payload.Search_Response, err error) { + if f.IsIndexing() { + return nil, errors.ErrCreateIndexingIsInProgress + } + + sr, err := f.core.Search(int(k), int(nq), xq) + if err != nil { + if f.IsIndexing() { + return nil, errors.ErrCreateIndexingIsInProgress + } + if errors.Is(err, errors.ErrSearchResultEmptyButNoDataStored) && f.Len() == 0 { + return nil, nil + } + log.Errorf("cgo error detected during search: faiss api returned error %v", err) + return nil, err + } + + return f.toSearchResponse(sr) +} + +func (f *faiss) Delete(uuid string) (err error) { + return f.delete(uuid, time.Now().UnixNano(), true) +} + +func (f *faiss) DeleteWithTime(uuid string, t int64) (err error) { + if t <= 0 { + t = time.Now().UnixNano() + } + + return f.delete(uuid, t, true) +} + +func (f *faiss) delete(uuid string, t int64, validation bool) error { + if len(uuid) == 0 { + return errors.ErrUUIDNotFound(0) + } + + if validation { + _, _, ok := f.kvs.Get(uuid) + if !ok && !f.vq.IVExists(uuid) { + return errors.ErrObjectIDNotFound(uuid) + } + } + + return f.vq.PushDelete(uuid, t) +} + +func (f *faiss) Exists(uuid string) (uint32, bool) { + var ( + oid uint32 + ok bool + ) + + ok = f.vq.IVExists(uuid) + if !ok { + oid, _, ok = f.kvs.Get(uuid) + if !ok { + log.Debugf("Exists\tuuid: %s's data not found in kvsdb and insert vqueue\terror: %v", uuid, errors.ErrObjectIDNotFound(uuid)) + return 0, false + } + if f.vq.DVExists(uuid) { + log.Debugf("Exists\tuuid: %s's data found in kvsdb and not found in insert vqueue, but delete vqueue data exists. the object will be delete soon\terror: %v", + uuid, errors.ErrObjectIDNotFound(uuid)) + return 0, false + } + } + + return oid, ok +} + +func (f *faiss) IsIndexing() bool { + i, ok := f.indexing.Load().(bool) + return i && ok +} + +func (f *faiss) IsSaving() bool { + s, ok := f.saving.Load().(bool) + return s && ok +} + +func (f *faiss) NumberOfCreateIndexExecution() uint64 { + return atomic.LoadUint64(&f.nocie) +} + +func (f *faiss) NumberOfProactiveGCExecution() uint64 { + return atomic.LoadUint64(&f.nogce) +} + +func (f *faiss) gc() { + if f.enableProactiveGC { + runtime.GC() + atomic.AddUint64(&f.nogce, 1) + } +} + +func (f *faiss) Len() uint64 { + return f.kvs.Len() +} + +func (f *faiss) InsertVQueueBufferLen() uint64 { + return uint64(f.vq.IVQLen()) +} + +func (f *faiss) DeleteVQueueBufferLen() uint64 { + return uint64(f.vq.DVQLen()) +} + +func (f *faiss) GetDimensionSize() int { + return f.dim +} + +func (f *faiss) GetTrainSize() int { + return f.trainSize +} + +func (f *faiss) Close(ctx context.Context) error { + err := f.kvs.Close() + if len(f.path) != 0 { + cerr := f.CreateIndex(ctx) + if cerr != nil && + !errors.Is(err, errors.ErrUncommittedIndexNotFound) && + !errors.Is(err, context.Canceled) && + !errors.Is(err, context.DeadlineExceeded) { + if err != nil { + err = errors.Wrap(cerr, err.Error()) + } else { + err = cerr + } + } + + serr := f.SaveIndex(ctx) + if serr != nil && + !errors.Is(err, errors.ErrUncommittedIndexNotFound) && + !errors.Is(err, context.Canceled) && + !errors.Is(err, context.DeadlineExceeded) { + if err != nil { + err = errors.Wrap(serr, err.Error()) + } else { + err = serr + } + } + } + + f.core.Close() + + return nil +} + +func (f *faiss) toSearchResponse(sr []algorithm.SearchResult) (res *payload.Search_Response, err error) { + if len(sr) == 0 { + if f.Len() == 0 { + return nil, nil + } + return nil, errors.ErrEmptySearchResult + } + + res = &payload.Search_Response{ + Results: make([]*payload.Object_Distance, 0, len(sr)), + } + for _, d := range sr { + if err = d.Error; d.ID == 0 && err != nil { + log.Warnf("an error occurred while searching: %v", err) + continue + } + key, _, ok := f.kvs.GetInverse(d.ID) + if ok { + res.Results = append(res.GetResults(), &payload.Object_Distance{ + Id: key, + Distance: d.Distance, + }) + } else { + log.Warn("not found", d.ID, d.Distance) + } + } + if len(res.GetResults()) == 0 { + if f.Len() == 0 { + return nil, nil + } + return nil, errors.ErrEmptySearchResult + } + return res, nil +} diff --git a/pkg/agent/core/faiss/service/option.go b/pkg/agent/core/faiss/service/option.go new file mode 100644 index 00000000000..6f06556c357 --- /dev/null +++ b/pkg/agent/core/faiss/service/option.go @@ -0,0 +1,271 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package service + +import ( + "math" + "math/big" + "os" + "time" + + "github.com/vdaas/vald/internal/file" + "github.com/vdaas/vald/internal/rand" + "github.com/vdaas/vald/internal/strings" + "github.com/vdaas/vald/internal/sync/errgroup" + "github.com/vdaas/vald/internal/timeutil" +) + +// Option represent the functional option for faiss +type Option func(f *faiss) error + +var defaultOptions = []Option{ + WithErrGroup(errgroup.Get()), + WithAutoIndexCheckDuration("30m"), + WithAutoSaveIndexDuration("35m"), + WithAutoIndexDurationLimit("24h"), + WithAutoIndexLength(100), + WithInitialDelayMaxDuration("3m"), + WithMinLoadIndexTimeout("3m"), + WithMaxLoadIndexTimeout("10m"), + WithLoadIndexTimeoutFactor("1ms"), + WithProactiveGC(true), +} + +// WithErrGroup returns the functional option to set the error group. +func WithErrGroup(eg errgroup.Group) Option { + return func(f *faiss) error { + if eg != nil { + f.eg = eg + } + + return nil + } +} + +// WithEnableInMemoryMode returns the functional option to set the in memory mode flag. +func WithEnableInMemoryMode(enabled bool) Option { + return func(f *faiss) error { + f.inMem = enabled + + return nil + } +} + +// WithIndexPath returns the functional option to set the index path of the Faiss. +func WithIndexPath(path string) Option { + return func(f *faiss) error { + if path == "" { + return nil + } + f.path = file.Join(strings.TrimSuffix(path, string(os.PathSeparator))) + return nil + } +} + +// WithAutoIndexCheckDuration returns the functional option to set the index check duration. +func WithAutoIndexCheckDuration(dur string) Option { + return func(f *faiss) error { + if dur == "" { + return nil + } + + d, err := timeutil.Parse(dur) + if err != nil { + return err + } + + f.dur = d + + return nil + } +} + +// WithAutoSaveIndexDuration returns the functional option to set the auto save index duration. +func WithAutoSaveIndexDuration(dur string) Option { + return func(f *faiss) error { + if dur == "" { + return nil + } + + d, err := timeutil.Parse(dur) + if err != nil { + return err + } + + f.sdur = d + + return nil + } +} + +// WithAutoIndexDurationLimit returns the functional option to set the auto index duration limit. +func WithAutoIndexDurationLimit(dur string) Option { + return func(f *faiss) error { + if dur == "" { + return nil + } + + d, err := timeutil.Parse(dur) + if err != nil { + return err + } + + f.lim = d + + return nil + } +} + +// WithAutoIndexLength returns the functional option to set the auto index length. +func WithAutoIndexLength(l int) Option { + return func(f *faiss) error { + f.alen = l + + return nil + } +} + +const ( + defaultDurationLimit float64 = 1.1 + defaultRandDuration int64 = 1 +) + +var ( + bigMaxFloat64 = big.NewFloat(math.MaxFloat64) + bigMinFloat64 = big.NewFloat(math.SmallestNonzeroFloat64) + bigMaxInt64 = big.NewInt(math.MaxInt64) + bigMinInt64 = big.NewInt(math.MinInt64) +) + +// WithInitialDelayMaxDuration returns the functional option to set the initial delay duration. +func WithInitialDelayMaxDuration(dur string) Option { + return func(f *faiss) error { + if dur == "" { + return nil + } + + d, err := timeutil.Parse(dur) + if err != nil { + return err + } + + var dt time.Duration + switch { + case d <= time.Nanosecond: + return nil + case d <= time.Microsecond: + dt = time.Nanosecond + case d <= time.Millisecond: + dt = time.Microsecond + case d <= time.Second: + dt = time.Millisecond + default: + dt = time.Second + } + + dbs := math.Round(float64(d) / float64(dt)) + bdbs := big.NewFloat(dbs) + if dbs <= 0 || bigMaxFloat64.Cmp(bdbs) <= 0 || bigMinFloat64.Cmp(bdbs) >= 0 { + dbs = defaultDurationLimit + } + + rnd := int64(rand.LimitedUint32(uint64(dbs))) + brnd := big.NewInt(rnd) + if rnd <= 0 || bigMaxInt64.Cmp(brnd) <= 0 || bigMinInt64.Cmp(brnd) >= 0 { + rnd = defaultRandDuration + } + + delay := time.Duration(rnd) * dt + if delay <= 0 || delay >= math.MaxInt64 || delay <= math.MinInt64 { + return WithInitialDelayMaxDuration(dur)(f) + } + + f.idelay = delay + + return nil + } +} + +// WithMinLoadIndexTimeout returns the functional option to set the minimal load index timeout. +func WithMinLoadIndexTimeout(dur string) Option { + return func(f *faiss) error { + if dur == "" { + return nil + } + + d, err := timeutil.Parse(dur) + if err != nil { + return err + } + + f.minLit = d + + return nil + } +} + +// WithMaxLoadIndexTimeout returns the functional option to set the maximum load index timeout. +func WithMaxLoadIndexTimeout(dur string) Option { + return func(f *faiss) error { + if dur == "" { + return nil + } + + d, err := timeutil.Parse(dur) + if err != nil { + return err + } + + f.maxLit = d + + return nil + } +} + +// WithLoadIndexTimeoutFactor returns the functional option to set the factor of load index timeout. +func WithLoadIndexTimeoutFactor(dur string) Option { + return func(f *faiss) error { + if dur == "" { + return nil + } + + d, err := timeutil.Parse(dur) + if err != nil { + return err + } + + f.litFactor = d + + return nil + } +} + +// WithProactiveGC returns the functional option to set the proactive GC enable flag. +func WithProactiveGC(enabled bool) Option { + return func(f *faiss) error { + f.enableProactiveGC = enabled + return nil + } +} + +// WithCopyOnWrite returns the functional option to set the CoW enable flag. +func WithCopyOnWrite(enabled bool) Option { + return func(f *faiss) error { + f.enableCopyOnWrite = enabled + return nil + } +} diff --git a/pkg/agent/core/faiss/usecase/agentd.go b/pkg/agent/core/faiss/usecase/agentd.go new file mode 100644 index 00000000000..229e767c56a --- /dev/null +++ b/pkg/agent/core/faiss/usecase/agentd.go @@ -0,0 +1,193 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +package usecase + +import ( + "context" + + agent "github.com/vdaas/vald/apis/grpc/v1/agent/core" + vald "github.com/vdaas/vald/apis/grpc/v1/vald" + iconf "github.com/vdaas/vald/internal/config" + "github.com/vdaas/vald/internal/net/grpc" + "github.com/vdaas/vald/internal/observability" + faissmetrics "github.com/vdaas/vald/internal/observability/metrics/agent/core/faiss" + infometrics "github.com/vdaas/vald/internal/observability/metrics/info" + "github.com/vdaas/vald/internal/runner" + "github.com/vdaas/vald/internal/safety" + "github.com/vdaas/vald/internal/servers/server" + "github.com/vdaas/vald/internal/servers/starter" + "github.com/vdaas/vald/internal/sync/errgroup" + "github.com/vdaas/vald/pkg/agent/core/faiss/config" + handler "github.com/vdaas/vald/pkg/agent/core/faiss/handler/grpc" + "github.com/vdaas/vald/pkg/agent/core/faiss/handler/rest" + "github.com/vdaas/vald/pkg/agent/core/faiss/router" + "github.com/vdaas/vald/pkg/agent/core/faiss/service" +) + +type run struct { + eg errgroup.Group + cfg *config.Data + faiss service.Faiss + server starter.Server + observability observability.Observability +} + +func New(cfg *config.Data) (r runner.Runner, err error) { + faiss, err := service.New( + cfg.Faiss, + service.WithErrGroup(errgroup.Get()), + service.WithEnableInMemoryMode(cfg.Faiss.EnableInMemoryMode), + service.WithIndexPath(cfg.Faiss.IndexPath), + service.WithAutoIndexCheckDuration(cfg.Faiss.AutoIndexCheckDuration), + service.WithAutoSaveIndexDuration(cfg.Faiss.AutoSaveIndexDuration), + service.WithAutoIndexDurationLimit(cfg.Faiss.AutoIndexDurationLimit), + service.WithAutoIndexLength(cfg.Faiss.AutoIndexLength), + service.WithInitialDelayMaxDuration(cfg.Faiss.InitialDelayMaxDuration), + service.WithMinLoadIndexTimeout(cfg.Faiss.MinLoadIndexTimeout), + service.WithMaxLoadIndexTimeout(cfg.Faiss.MaxLoadIndexTimeout), + service.WithLoadIndexTimeoutFactor(cfg.Faiss.LoadIndexTimeoutFactor), + service.WithProactiveGC(cfg.Faiss.EnableProactiveGC), + service.WithCopyOnWrite(cfg.Faiss.EnableCopyOnWrite), + ) + if err != nil { + return nil, err + } + + g, err := handler.New( + handler.WithFaiss(faiss), + handler.WithStreamConcurrency(cfg.Server.GetGRPCStreamConcurrency()), + ) + if err != nil { + return nil, err + } + + eg := errgroup.Get() + + grpcServerOptions := []server.Option{ + server.WithGRPCRegistFunc(func(srv *grpc.Server) { + agent.RegisterAgentServer(srv, g) + vald.RegisterValdServer(srv, g) + }), + server.WithPreStartFunc(func() error { + return nil + }), + server.WithPreStopFunction(func() error { + return nil + }), + } + + var obs observability.Observability + if cfg.Observability != nil && cfg.Observability.Enabled { + obs, err = observability.NewWithConfig( + cfg.Observability, + faissmetrics.New(faiss), + infometrics.New("agent_core_faiss_info", "Agent Faiss info", *cfg.Faiss), + ) + if err != nil { + return nil, err + } + } + + srv, err := starter.New( + starter.WithConfig(cfg.Server), + starter.WithREST(func(sc *iconf.Server) []server.Option { + return []server.Option{ + server.WithHTTPHandler( + router.New( + router.WithTimeout(sc.HTTP.HandlerTimeout), + router.WithErrGroup(eg), + router.WithHandler( + rest.New( + rest.WithAgent(g), + ), + ), + ), + ), + } + }), + starter.WithGRPC(func(sc *iconf.Server) []server.Option { + return grpcServerOptions + }), + ) + if err != nil { + return nil, err + } + + return &run{ + eg: eg, + faiss: faiss, + cfg: cfg, + server: srv, + observability: obs, + }, nil +} + +func (r *run) PreStart(ctx context.Context) error { + if r.observability != nil { + return r.observability.PreStart(ctx) + } + + return nil +} + +func (r *run) Start(ctx context.Context) (<-chan error, error) { + ech := make(chan error, 3) + var oech, nech, sech <-chan error + r.eg.Go(safety.RecoverFunc(func() (err error) { + defer close(ech) + if r.observability != nil { + oech = r.observability.Start(ctx) + } + nech = r.faiss.Start(ctx) + sech = r.server.ListenAndServe(ctx) + for { + select { + case <-ctx.Done(): + return ctx.Err() + case err = <-oech: + case err = <-nech: + case err = <-sech: + } + if err != nil { + select { + case <-ctx.Done(): + return ctx.Err() + case ech <- err: + } + } + } + })) + + return ech, nil +} + +func (r *run) PreStop(ctx context.Context) error { + return nil +} + +func (r *run) Stop(ctx context.Context) error { + if r.observability != nil { + r.observability.Stop(ctx) + } + + return r.server.Shutdown(ctx) +} + +func (r *run) PostStop(ctx context.Context) error { + r.faiss.Close(ctx) + return nil +} diff --git a/pkg/agent/core/ngt/config/config.go b/pkg/agent/core/ngt/config/config.go index b840e52f9e4..ee7f3e858d2 100644 --- a/pkg/agent/core/ngt/config/config.go +++ b/pkg/agent/core/ngt/config/config.go @@ -45,7 +45,6 @@ func NewConfig(path string) (cfg *Data, err error) { cfg = new(Data) err = config.Read(path, &cfg) - if err != nil { return nil, err } diff --git a/pkg/agent/core/ngt/handler/grpc/insert.go b/pkg/agent/core/ngt/handler/grpc/insert.go index 8a1c22567cb..7d4b43420e8 100644 --- a/pkg/agent/core/ngt/handler/grpc/insert.go +++ b/pkg/agent/core/ngt/handler/grpc/insert.go @@ -167,7 +167,6 @@ func (s *server) StreamInsert(stream vald.Insert_StreamInsertServer) (err error) }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamInsert gRPC error response") if span != nil { diff --git a/pkg/agent/core/ngt/handler/grpc/linear_search.go b/pkg/agent/core/ngt/handler/grpc/linear_search.go index eef1a2b293a..75814126ffe 100644 --- a/pkg/agent/core/ngt/handler/grpc/linear_search.go +++ b/pkg/agent/core/ngt/handler/grpc/linear_search.go @@ -334,7 +334,6 @@ func (s *server) StreamLinearSearch(stream vald.Search_StreamLinearSearchServer) }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamLinearSearch gRPC error response") diff --git a/pkg/agent/core/ngt/handler/grpc/object.go b/pkg/agent/core/ngt/handler/grpc/object.go index 7ad9ee03d77..ea7ec38b3d9 100644 --- a/pkg/agent/core/ngt/handler/grpc/object.go +++ b/pkg/agent/core/ngt/handler/grpc/object.go @@ -165,7 +165,6 @@ func (s *server) StreamGetObject(stream vald.Object_StreamGetObjectServer) (err }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamGetObject gRPC error response") if span != nil { diff --git a/pkg/agent/core/ngt/handler/grpc/remove.go b/pkg/agent/core/ngt/handler/grpc/remove.go index b319fb10a8d..faece5f5aa7 100644 --- a/pkg/agent/core/ngt/handler/grpc/remove.go +++ b/pkg/agent/core/ngt/handler/grpc/remove.go @@ -161,7 +161,6 @@ func (s *server) StreamRemove(stream vald.Remove_StreamRemoveServer) (err error) }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamRemove gRPC error response") if span != nil { diff --git a/pkg/agent/core/ngt/handler/grpc/search.go b/pkg/agent/core/ngt/handler/grpc/search.go index 984bb187321..23825ee16d9 100644 --- a/pkg/agent/core/ngt/handler/grpc/search.go +++ b/pkg/agent/core/ngt/handler/grpc/search.go @@ -338,7 +338,6 @@ func (s *server) StreamSearch(stream vald.Search_StreamSearchServer) (err error) }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamSearch gRPC error response") diff --git a/pkg/agent/core/ngt/handler/grpc/update.go b/pkg/agent/core/ngt/handler/grpc/update.go index cfe0a2fb118..9edec200f62 100644 --- a/pkg/agent/core/ngt/handler/grpc/update.go +++ b/pkg/agent/core/ngt/handler/grpc/update.go @@ -195,7 +195,6 @@ func (s *server) StreamUpdate(stream vald.Update_StreamUpdateServer) (err error) }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamUpdate gRPC error response") if span != nil { diff --git a/pkg/agent/core/ngt/handler/grpc/upsert.go b/pkg/agent/core/ngt/handler/grpc/upsert.go index c932fe8750b..e1b39609dc3 100644 --- a/pkg/agent/core/ngt/handler/grpc/upsert.go +++ b/pkg/agent/core/ngt/handler/grpc/upsert.go @@ -168,7 +168,6 @@ func (s *server) StreamUpsert(stream vald.Upsert_StreamUpsertServer) (err error) }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse StreamUpsert gRPC error response") if span != nil { diff --git a/pkg/agent/core/ngt/service/ngt.go b/pkg/agent/core/ngt/service/ngt.go index 004b7db2530..7c7ecfb450b 100644 --- a/pkg/agent/core/ngt/service/ngt.go +++ b/pkg/agent/core/ngt/service/ngt.go @@ -34,6 +34,7 @@ import ( "github.com/vdaas/vald/apis/grpc/v1/payload" "github.com/vdaas/vald/internal/config" "github.com/vdaas/vald/internal/conv" + "github.com/vdaas/vald/internal/core/algorithm" core "github.com/vdaas/vald/internal/core/algorithm/ngt" "github.com/vdaas/vald/internal/errors" "github.com/vdaas/vald/internal/file" @@ -43,9 +44,9 @@ import ( "github.com/vdaas/vald/internal/strings" "github.com/vdaas/vald/internal/sync" "github.com/vdaas/vald/internal/sync/errgroup" - "github.com/vdaas/vald/pkg/agent/core/ngt/service/kvs" - "github.com/vdaas/vald/pkg/agent/core/ngt/service/vqueue" + "github.com/vdaas/vald/pkg/agent/internal/kvs" "github.com/vdaas/vald/pkg/agent/internal/metadata" + "github.com/vdaas/vald/pkg/agent/internal/vqueue" ) type NGT interface { @@ -1730,7 +1731,7 @@ func (n *ngt) ListObjectFunc(ctx context.Context, f func(uuid string, oid uint32 }) } -func (n *ngt) toSearchResponse(sr []core.SearchResult) (res *payload.Search_Response, err error) { +func (n *ngt) toSearchResponse(sr []algorithm.SearchResult) (res *payload.Search_Response, err error) { if len(sr) == 0 { if n.Len() == 0 { return nil, nil diff --git a/pkg/agent/core/ngt/service/ngt_test.go b/pkg/agent/core/ngt/service/ngt_test.go index 1029cd67a45..c1caceff532 100644 --- a/pkg/agent/core/ngt/service/ngt_test.go +++ b/pkg/agent/core/ngt/service/ngt_test.go @@ -44,9 +44,9 @@ import ( testdata "github.com/vdaas/vald/internal/test" "github.com/vdaas/vald/internal/test/data/vector" "github.com/vdaas/vald/internal/test/goleak" - "github.com/vdaas/vald/pkg/agent/core/ngt/service/kvs" - "github.com/vdaas/vald/pkg/agent/core/ngt/service/vqueue" + "github.com/vdaas/vald/pkg/agent/internal/kvs" "github.com/vdaas/vald/pkg/agent/internal/metadata" + "github.com/vdaas/vald/pkg/agent/internal/vqueue" "google.golang.org/grpc" ) diff --git a/pkg/agent/core/ngt/service/kvs/kvs.go b/pkg/agent/internal/kvs/kvs.go similarity index 100% rename from pkg/agent/core/ngt/service/kvs/kvs.go rename to pkg/agent/internal/kvs/kvs.go diff --git a/pkg/agent/core/ngt/service/kvs/kvs_test.go b/pkg/agent/internal/kvs/kvs_test.go similarity index 99% rename from pkg/agent/core/ngt/service/kvs/kvs_test.go rename to pkg/agent/internal/kvs/kvs_test.go index 5e50193a183..0849e921ea4 100644 --- a/pkg/agent/core/ngt/service/kvs/kvs_test.go +++ b/pkg/agent/internal/kvs/kvs_test.go @@ -97,6 +97,7 @@ func TestNew(t *testing.T) { } } +// skipcq: GO-R1005 func Test_bidi_Get(t *testing.T) { t.Parallel() type args struct { @@ -363,6 +364,7 @@ func Test_bidi_Get(t *testing.T) { } } +// skipcq: GO-R1005 func Test_bidi_GetInverse(t *testing.T) { t.Parallel() type args struct { @@ -630,6 +632,7 @@ func Test_bidi_GetInverse(t *testing.T) { } } +// skipcq: GO-R1005 func Test_bidi_Set(t *testing.T) { t.Parallel() type args struct { @@ -915,6 +918,7 @@ func Test_bidi_Set(t *testing.T) { } } +// skipcq: GO-R1005 func Test_bidi_Delete(t *testing.T) { t.Parallel() type args struct { @@ -1196,6 +1200,7 @@ func Test_bidi_Delete(t *testing.T) { } } +// skipcq: GO-R1005 func Test_bidi_DeleteInverse(t *testing.T) { t.Parallel() type args struct { @@ -1478,6 +1483,7 @@ func Test_bidi_DeleteInverse(t *testing.T) { } } +// skipcq: GO-R1005 func Test_bidi_Range(t *testing.T) { t.Parallel() type args struct { diff --git a/pkg/agent/core/ngt/service/kvs/option.go b/pkg/agent/internal/kvs/option.go similarity index 100% rename from pkg/agent/core/ngt/service/kvs/option.go rename to pkg/agent/internal/kvs/option.go diff --git a/pkg/agent/core/ngt/service/kvs/option_test.go b/pkg/agent/internal/kvs/option_test.go similarity index 100% rename from pkg/agent/core/ngt/service/kvs/option_test.go rename to pkg/agent/internal/kvs/option_test.go diff --git a/pkg/agent/internal/metadata/metadata.go b/pkg/agent/internal/metadata/metadata.go index fe34874119e..618a9adf094 100644 --- a/pkg/agent/internal/metadata/metadata.go +++ b/pkg/agent/internal/metadata/metadata.go @@ -32,14 +32,19 @@ const ( ) type Metadata struct { - IsInvalid bool `json:"is_invalid" yaml:"is_invalid"` - NGT *NGT `json:"ngt,omitempty" yaml:"ngt"` + IsInvalid bool `json:"is_invalid" yaml:"is_invalid"` + NGT *NGT `json:"ngt,omitempty" yaml:"ngt"` + Faiss *Faiss `json:"faiss,omitempty" yaml:"faiss"` } type NGT struct { IndexCount uint64 `json:"index_count" yaml:"index_count"` } +type Faiss struct { + IndexCount uint64 `json:"index_count" yaml:"index_count"` +} + func Load(path string) (meta *Metadata, err error) { var fi os.FileInfo exists, fi, err := file.ExistsWithDetail(path) diff --git a/pkg/agent/core/ngt/service/vqueue/option.go b/pkg/agent/internal/vqueue/option.go similarity index 100% rename from pkg/agent/core/ngt/service/vqueue/option.go rename to pkg/agent/internal/vqueue/option.go diff --git a/pkg/agent/core/ngt/service/vqueue/queue.go b/pkg/agent/internal/vqueue/queue.go similarity index 98% rename from pkg/agent/core/ngt/service/vqueue/queue.go rename to pkg/agent/internal/vqueue/queue.go index c2febc3e237..b89769c2f9a 100644 --- a/pkg/agent/core/ngt/service/vqueue/queue.go +++ b/pkg/agent/internal/vqueue/queue.go @@ -256,7 +256,7 @@ func (v *vqueue) RangePopDelete(ctx context.Context, now int64, f func(uuid stri } // Range calls f sequentially for each key and value present in the vqueue. -func (v *vqueue) Range(ctx context.Context, f func(uuid string, vector []float32, ts int64) bool) { +func (v *vqueue) Range(_ context.Context, f func(uuid string, vector []float32, ts int64) bool) { v.il.Range(func(uuid string, idx *index) bool { if idx == nil { return true diff --git a/pkg/agent/core/ngt/service/vqueue/queue_test.go b/pkg/agent/internal/vqueue/queue_test.go similarity index 100% rename from pkg/agent/core/ngt/service/vqueue/queue_test.go rename to pkg/agent/internal/vqueue/queue_test.go diff --git a/pkg/agent/core/ngt/service/vqueue/stateful_test.go b/pkg/agent/internal/vqueue/stateful_test.go similarity index 100% rename from pkg/agent/core/ngt/service/vqueue/stateful_test.go rename to pkg/agent/internal/vqueue/stateful_test.go diff --git a/pkg/agent/sidecar/config/config.go b/pkg/agent/sidecar/config/config.go index 687eb288da6..fa71877f5cc 100644 --- a/pkg/agent/sidecar/config/config.go +++ b/pkg/agent/sidecar/config/config.go @@ -71,7 +71,6 @@ func NewConfig(path string) (cfg *Data, err error) { cfg = new(Data) err = config.Read(path, &cfg) - if err != nil { return nil, err } diff --git a/pkg/discoverer/k8s/config/config.go b/pkg/discoverer/k8s/config/config.go index 2e7a23b81a8..fff4de8eafe 100644 --- a/pkg/discoverer/k8s/config/config.go +++ b/pkg/discoverer/k8s/config/config.go @@ -42,7 +42,6 @@ func NewConfig(path string) (cfg *Data, err error) { cfg = new(Data) err = config.Read(path, &cfg) - if err != nil { return nil, err } diff --git a/pkg/gateway/filter/config/config.go b/pkg/gateway/filter/config/config.go index 917bf69fc4b..fa1a4046ef4 100644 --- a/pkg/gateway/filter/config/config.go +++ b/pkg/gateway/filter/config/config.go @@ -52,7 +52,6 @@ func NewConfig(path string) (cfg *Data, err error) { cfg = new(Data) err = config.Read(path, &cfg) - if err != nil { return nil, err } diff --git a/pkg/gateway/filter/handler/grpc/handler.go b/pkg/gateway/filter/handler/grpc/handler.go index 6f7856c77f4..e18ed807ba5 100644 --- a/pkg/gateway/filter/handler/grpc/handler.go +++ b/pkg/gateway/filter/handler/grpc/handler.go @@ -1623,7 +1623,6 @@ func (s *server) StreamSearch(stream vald.Search_StreamSearchServer) (err error) }, }, nil }) - if err != nil { if span != nil { span.RecordError(err) @@ -2103,7 +2102,6 @@ func (s *server) StreamLinearSearch(stream vald.Search_StreamLinearSearchServer) }, }, nil }) - if err != nil { if span != nil { span.RecordError(err) @@ -2494,7 +2492,6 @@ func (s *server) StreamInsert(stream vald.Insert_StreamInsertServer) (err error) }, }, nil }) - if err != nil { if span != nil { span.RecordError(err) @@ -2755,7 +2752,6 @@ func (s *server) StreamUpdate(stream vald.Update_StreamUpdateServer) (err error) }, }, nil }) - if err != nil { return err } @@ -3011,7 +3007,6 @@ func (s *server) StreamUpsert(stream vald.Upsert_StreamUpsertServer) (err error) }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamUpsertRPCName+" gRPC error response") if span != nil { @@ -3175,7 +3170,6 @@ func (s *server) StreamRemove(stream vald.Remove_StreamRemoveServer) (err error) }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamRemoveRPCName+" gRPC error response") if span != nil { @@ -3422,7 +3416,6 @@ func (s *server) StreamGetObject(stream vald.Object_StreamGetObjectServer) (err }, }, nil }) - if err != nil { if span != nil { span.RecordError(err) diff --git a/pkg/gateway/lb/config/config.go b/pkg/gateway/lb/config/config.go index 046b147c264..e25970ce987 100644 --- a/pkg/gateway/lb/config/config.go +++ b/pkg/gateway/lb/config/config.go @@ -46,7 +46,6 @@ func NewConfig(path string) (cfg *Data, err error) { cfg = new(Data) err = config.Read(path, &cfg) - if err != nil { return nil, err } diff --git a/pkg/gateway/lb/handler/grpc/handler.go b/pkg/gateway/lb/handler/grpc/handler.go index 7f0678c3ba6..50a1382a4e6 100644 --- a/pkg/gateway/lb/handler/grpc/handler.go +++ b/pkg/gateway/lb/handler/grpc/handler.go @@ -539,7 +539,6 @@ func (s *server) StreamSearch(stream vald.Search_StreamSearchServer) (err error) }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamSearchRPCName+" gRPC error response") @@ -588,7 +587,6 @@ func (s *server) StreamSearchByID(stream vald.Search_StreamSearchByIDServer) (er }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamSearchByIDRPCName+" gRPC error response") @@ -989,7 +987,6 @@ func (s *server) StreamLinearSearch(stream vald.Search_StreamLinearSearchServer) }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamLinearSearchRPCName+" gRPC error response") @@ -1041,7 +1038,6 @@ func (s *server) StreamLinearSearchByID(stream vald.Search_StreamLinearSearchByI }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamLinearSearchByIDRPCName+" gRPC error response") @@ -1460,7 +1456,6 @@ func (s *server) StreamInsert(stream vald.Insert_StreamInsertServer) (err error) }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamInsertRPCName+" gRPC error response") if span != nil { @@ -1997,7 +1992,6 @@ func (s *server) StreamUpdate(stream vald.Update_StreamUpdateServer) (err error) }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamUpdateRPCName+" gRPC error response") if span != nil { @@ -2346,7 +2340,6 @@ func (s *server) StreamUpsert(stream vald.Upsert_StreamUpsertServer) (err error) }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamUpsertRPCName+" gRPC error response") if span != nil { @@ -2650,7 +2643,6 @@ func (s *server) StreamRemove(stream vald.Remove_StreamRemoveServer) (err error) }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamRemoveRPCName+" gRPC error response") if span != nil { @@ -3117,7 +3109,6 @@ func (s *server) StreamGetObject(stream vald.Object_StreamGetObjectServer) (err }, }, nil }) - if err != nil { st, msg, err := status.ParseError(err, codes.Internal, "failed to parse "+vald.StreamGetObjectRPCName+" gRPC error response") if span != nil { diff --git a/pkg/index/job/correction/config/config.go b/pkg/index/job/correction/config/config.go index 11b46223f63..da5baaf69f1 100644 --- a/pkg/index/job/correction/config/config.go +++ b/pkg/index/job/correction/config/config.go @@ -43,7 +43,6 @@ func NewConfig(path string) (cfg *Data, err error) { cfg = new(Data) err = config.Read(path, &cfg) - if err != nil { return nil, err } diff --git a/pkg/manager/index/config/config.go b/pkg/manager/index/config/config.go index dd79dea2782..980f2a88409 100644 --- a/pkg/manager/index/config/config.go +++ b/pkg/manager/index/config/config.go @@ -43,7 +43,6 @@ func NewConfig(path string) (cfg *Data, err error) { cfg = new(Data) err = config.Read(path, &cfg) - if err != nil { return nil, err } diff --git a/pkg/tools/benchmark/job/usecase/benchmarkd.go b/pkg/tools/benchmark/job/usecase/benchmarkd.go index f608d865ef7..173edf6d8b3 100644 --- a/pkg/tools/benchmark/job/usecase/benchmarkd.go +++ b/pkg/tools/benchmark/job/usecase/benchmarkd.go @@ -199,7 +199,6 @@ func (r *run) Start(ctx context.Context) (<-chan error, error) { oech = r.observability.Start(ctx) } dech, err = r.job.Start(ctx) - if err != nil { ech <- err return err diff --git a/pkg/tools/cli/loadtest/config/config.go b/pkg/tools/cli/loadtest/config/config.go index ffddc234655..23a084ec5f6 100644 --- a/pkg/tools/cli/loadtest/config/config.go +++ b/pkg/tools/cli/loadtest/config/config.go @@ -88,7 +88,6 @@ func NewConfig(path string) (cfg *Data, err error) { cfg = new(Data) err = config.Read(path, &cfg) - if err != nil { return nil, err } diff --git a/rust/Cargo.lock b/rust/Cargo.lock index f4385719a51..aebcec235e6 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -128,9 +128,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.6" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c79fed4cdb43e993fcdadc7e58a09fd0e3e649c4436fa11da71c9f1f3ee7feb9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "bitflags" @@ -235,9 +235,9 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "h2" -version = "0.3.23" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b553656127a00601c8ae5590fcfdc118e4083a7924b6cf4ffc1ea4b99dc429d7" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -245,7 +245,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.1.0", + "indexmap 2.2.1", "slab", "tokio", "tokio-util", @@ -346,9 +346,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "433de089bd45971eecf4668ee0ee8f4cec17db4f8bd8f7bc3197a6ce37aa7d9b" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -440,18 +440,18 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", @@ -478,9 +478,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -580,18 +580,18 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "serde" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", diff --git a/rust/libs/proto/src/mirror.v1.tonic.rs b/rust/libs/proto/src/mirror.v1.tonic.rs new file mode 100644 index 00000000000..7a76438644d --- /dev/null +++ b/rust/libs/proto/src/mirror.v1.tonic.rs @@ -0,0 +1,309 @@ +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +pub mod mirror_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + #[derive(Debug, Clone)] + pub struct MirrorClient { + inner: tonic::client::Grpc, + } + impl MirrorClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MirrorClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> MirrorClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + MirrorClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + pub async fn register( + &mut self, + request: impl tonic::IntoRequest< + super::super::super::payload::v1::mirror::Targets, + >, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + > { + self.inner + .ready() + .await + .map_err(|e| { + tonic::Status::new( + tonic::Code::Unknown, + format!("Service was not ready: {}", e.into()), + ) + })?; + let codec = tonic::codec::ProstCodec::default(); + let path = http::uri::PathAndQuery::from_static( + "/mirror.v1.Mirror/Register", + ); + let mut req = request.into_request(); + req.extensions_mut().insert(GrpcMethod::new("mirror.v1.Mirror", "Register")); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +pub mod mirror_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with MirrorServer. + #[async_trait] + pub trait Mirror: Send + Sync + 'static { + async fn register( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + #[derive(Debug)] + pub struct MirrorServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl MirrorServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for MirrorServer + where + T: Mirror, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/mirror.v1.Mirror/Register" => { + #[allow(non_camel_case_types)] + struct RegisterSvc(pub Arc); + impl< + T: Mirror, + > tonic::server::UnaryService< + super::super::super::payload::v1::mirror::Targets, + > for RegisterSvc { + type Response = super::super::super::payload::v1::mirror::Targets; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request< + super::super::super::payload::v1::mirror::Targets, + >, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { (*inner).register(request).await }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = RegisterSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for MirrorServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for MirrorServer { + const NAME: &'static str = "mirror.v1.Mirror"; + } +} diff --git a/rust/libs/proto/src/payload.v1.rs b/rust/libs/proto/src/payload.v1.rs index 3e5c7bfde60..4b44a0bf5ea 100644 --- a/rust/libs/proto/src/payload.v1.rs +++ b/rust/libs/proto/src/payload.v1.rs @@ -1003,6 +1003,33 @@ pub mod info { pub ip: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } } +/// Mirror related messages. +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Mirror { +} +/// Nested message and enum types in `Mirror`. +pub mod mirror { + /// Represent server information. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Target { + /// The target hostname. + #[prost(string, tag="1")] + pub host: ::prost::alloc::string::String, + /// The target port. + #[prost(uint32, tag="2")] + pub port: u32, + } + /// Represent the multiple Target message. + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] + pub struct Targets { + /// The multiple target information. + #[prost(message, repeated, tag="1")] + pub targets: ::prost::alloc::vec::Vec, + } +} /// Represent an empty message. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/tests/chaos/chart/README.md b/tests/chaos/chart/README.md index 2879392f10d..594dee6331c 100644 --- a/tests/chaos/chart/README.md +++ b/tests/chaos/chart/README.md @@ -41,4 +41,4 @@ A Helm chart for testing Vald using Chaos Mesh. --- -Autogenerated from chart metadata using [helm-docs v1.11.3](https://github.com/norwoodj/helm-docs/releases/v1.11.3) +Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0) diff --git a/tests/e2e/crud/crud_faiss_test.go b/tests/e2e/crud/crud_faiss_test.go new file mode 100644 index 00000000000..44820a19b62 --- /dev/null +++ b/tests/e2e/crud/crud_faiss_test.go @@ -0,0 +1,331 @@ +//go:build e2e + +// +// Copyright (C) 2019-2024 vdaas.org vald team +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// You may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// package crud provides e2e tests using ann-benchmarks datasets +package crud + +import ( + "context" + "flag" + "fmt" + "os" + "testing" + "time" + + "github.com/vdaas/vald/internal/errors" + "github.com/vdaas/vald/internal/file" + "github.com/vdaas/vald/internal/net/grpc/codes" + "github.com/vdaas/vald/internal/net/grpc/status" + "github.com/vdaas/vald/tests/e2e/hdf5" + "github.com/vdaas/vald/tests/e2e/kubernetes/client" + "github.com/vdaas/vald/tests/e2e/kubernetes/portforward" + "github.com/vdaas/vald/tests/e2e/operation" +) + +var ( + host string + port int + ds *hdf5.Dataset + + insertNum int + searchNum int + searchByIDNum int + getObjectNum int + updateNum int + upsertNum int + removeNum int + + insertFrom int + searchFrom int + searchByIDFrom int + getObjectFrom int + updateFrom int + upsertFrom int + removeFrom int + + waitAfterInsertDuration time.Duration + + kubeClient client.Client + namespace string + + forwarder *portforward.Portforward +) + +func init() { + testing.Init() + + flag.StringVar(&host, "host", "localhost", "hostname") + flag.IntVar(&port, "port", 8081, "gRPC port") + + flag.IntVar(&insertNum, "insert-num", 10000, "number of id-vector pairs used for insert") + flag.IntVar(&searchNum, "search-num", 10000, "number of id-vector pairs used for search") + flag.IntVar(&updateNum, "update-num", 10000, "number of id-vector pairs used for update") + flag.IntVar(&removeNum, "remove-num", 10000, "number of id-vector pairs used for remove") + + flag.IntVar(&insertFrom, "insert-from", 0, "first index of id-vector pairs used for insert") + flag.IntVar(&searchFrom, "search-from", 0, "first index of id-vector pairs used for search") + flag.IntVar(&updateFrom, "update-from", 0, "first index of id-vector pairs used for update") + flag.IntVar(&removeFrom, "remove-from", 0, "first index of id-vector pairs used for remove") + + datasetName := flag.String("dataset", "fashion-mnist-784-euclidean.hdf5", "dataset") + waitAfterInsert := flag.String("wait-after-insert", "3m", "wait duration after inserting vectors") + + pf := flag.Bool("portforward", false, "enable port forwarding") + pfPodName := flag.String("portforward-pod-name", "vald-gateway-0", "pod name (only for port forward)") + pfPodPort := flag.Int("portforward-pod-port", port, "pod gRPC port (only for port forward)") + + kubeConfig := flag.String("kubeconfig", file.Join(os.Getenv("HOME"), ".kube", "config"), "kubeconfig path") + flag.StringVar(&namespace, "namespace", "default", "namespace") + + flag.Parse() + + var err error + if *pf { + kubeClient, err = client.New(*kubeConfig) + if err != nil { + panic(err) + } + + forwarder = kubeClient.Portforward(namespace, *pfPodName, port, *pfPodPort) + + err = forwarder.Start() + if err != nil { + panic(err) + } + } + + fmt.Printf("loading dataset: %s ", *datasetName) + ds, err = hdf5.HDF5ToDataset(*datasetName) + if err != nil { + panic(err) + } + fmt.Println("loading finished") + + waitAfterInsertDuration, err = time.ParseDuration(*waitAfterInsert) + if err != nil { + panic(err) + } +} + +func teardown() { + if forwarder != nil { + forwarder.Close() + } +} + +func sleep(t *testing.T, dur time.Duration) { + t.Logf("%v sleep for %s.", time.Now(), dur) + time.Sleep(dur) + t.Logf("%v sleep finished.", time.Now()) +} + +func TestE2EInsertOnly(t *testing.T) { + t.Cleanup(teardown) + ctx := context.Background() + + op, err := operation.New(host, port) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } + + err = op.Insert(t, ctx, operation.Dataset{ + Train: ds.Train[insertFrom : insertFrom+insertNum], + }) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } +} + +func TestE2ESearchOnly(t *testing.T) { + t.Cleanup(teardown) + ctx := context.Background() + + op, err := operation.New(host, port) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } + + err = op.Search(t, ctx, operation.Dataset{ + Test: ds.Test[searchFrom : searchFrom+searchNum], + Neighbors: ds.Neighbors[searchFrom : searchFrom+searchNum], + }) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } +} + +func TestE2EUpdateOnly(t *testing.T) { + t.Cleanup(teardown) + ctx := context.Background() + + op, err := operation.New(host, port) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } + + err = op.UpdateWithParameters( + t, + ctx, + operation.Dataset{ + Train: ds.Train[updateFrom : updateFrom+updateNum], + }, + true, + 1, + func(t *testing.T, status int32, msg string) error { + t.Helper() + + if status != int32(codes.NotFound) { + return errors.Errorf("the returned status is not NotFound on Update #1: %s", err) + } + + t.Logf("received a NotFound error on #1: %s", msg) + + return nil + }, + func(t *testing.T, err error) error { + t.Helper() + + st, _, _ := status.ParseError(err, codes.Unknown, "") + if st.Code() != codes.NotFound { + return err + } + + return nil + }, + ) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } +} + +func TestE2ERemoveOnly(t *testing.T) { + t.Cleanup(teardown) + ctx := context.Background() + + op, err := operation.New(host, port) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } + + err = op.Remove(t, ctx, operation.Dataset{ + Train: ds.Train[removeFrom : removeFrom+removeNum], + }) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } +} + +func TestE2EInsertAndSearch(t *testing.T) { + t.Cleanup(teardown) + ctx := context.Background() + + op, err := operation.New(host, port) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } + + err = op.Insert(t, ctx, operation.Dataset{ + Train: ds.Train[insertFrom : insertFrom+insertNum], + }) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } + + sleep(t, waitAfterInsertDuration) + + err = op.Search(t, ctx, operation.Dataset{ + Test: ds.Test[searchFrom : searchFrom+searchNum], + Neighbors: ds.Neighbors[searchFrom : searchFrom+searchNum], + }) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } +} + +func TestE2EStandardCRUD(t *testing.T) { + t.Cleanup(teardown) + ctx := context.Background() + + op, err := operation.New(host, port) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } + + err = op.Insert(t, ctx, operation.Dataset{ + Train: ds.Train[insertFrom : insertFrom+insertNum], + }) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } + + sleep(t, waitAfterInsertDuration) + + err = op.Search(t, ctx, operation.Dataset{ + Test: ds.Test[searchFrom : searchFrom+searchNum], + Neighbors: ds.Neighbors[searchFrom : searchFrom+searchNum], + }) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } + + err = op.Exists(t, ctx, "0") + if err != nil { + t.Fatalf("an error occurred: %s", err) + } + + err = op.UpdateWithParameters( + t, + ctx, + operation.Dataset{ + Train: ds.Train[updateFrom : updateFrom+updateNum], + }, + true, + 1, + func(t *testing.T, status int32, msg string) error { + t.Helper() + + if status != int32(codes.NotFound) { + return errors.Errorf("the returned status is not NotFound on Update #1: %s", err) + } + + t.Logf("received a NotFound error on #1: %s", msg) + + return nil + }, + func(t *testing.T, err error) error { + t.Helper() + + st, _, _ := status.ParseError(err, codes.Unknown, "") + if st.Code() != codes.NotFound { + return err + } + + return nil + }, + ) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } + + err = op.Remove(t, ctx, operation.Dataset{ + Train: ds.Train[removeFrom : removeFrom+removeNum], + }) + if err != nil { + t.Fatalf("an error occurred: %s", err) + } +} diff --git a/versions/CHAOS_MESH_VERSION b/versions/CHAOS_MESH_VERSION index 097a15a2af3..ec1cf33c3f6 100644 --- a/versions/CHAOS_MESH_VERSION +++ b/versions/CHAOS_MESH_VERSION @@ -1 +1 @@ -2.6.2 +2.6.3 diff --git a/versions/FAISS_VERSION b/versions/FAISS_VERSION new file mode 100644 index 00000000000..10c088013f8 --- /dev/null +++ b/versions/FAISS_VERSION @@ -0,0 +1 @@ +1.7.4 diff --git a/versions/GO_VERSION b/versions/GO_VERSION index ce2dd53570b..c262b1f0dfd 100644 --- a/versions/GO_VERSION +++ b/versions/GO_VERSION @@ -1 +1 @@ -1.21.5 +1.21.6 diff --git a/versions/HELM_DOCS_VERSION b/versions/HELM_DOCS_VERSION index 0a5af26df3f..0eed1a29efd 100644 --- a/versions/HELM_DOCS_VERSION +++ b/versions/HELM_DOCS_VERSION @@ -1 +1 @@ -1.11.3 +1.12.0 diff --git a/versions/HELM_VERSION b/versions/HELM_VERSION index 960df81ad61..5ef3202ea03 100644 --- a/versions/HELM_VERSION +++ b/versions/HELM_VERSION @@ -1 +1 @@ -v3.13.2 +v3.14.0 diff --git a/versions/JAEGER_OPERATOR_VERSION b/versions/JAEGER_OPERATOR_VERSION index 132775c22c9..895eb8a3b25 100644 --- a/versions/JAEGER_OPERATOR_VERSION +++ b/versions/JAEGER_OPERATOR_VERSION @@ -1 +1 @@ -2.49.0 +2.50.1 diff --git a/versions/K3S_VERSION b/versions/K3S_VERSION index d4dfdbca271..bce7c05daf9 100644 --- a/versions/K3S_VERSION +++ b/versions/K3S_VERSION @@ -1 +1 @@ -v1.28.4-k3s2 +v1.29.1-k3s1-amd64 diff --git a/versions/KUBECTL_VERSION b/versions/KUBECTL_VERSION index 344cc864605..4036c93be92 100644 --- a/versions/KUBECTL_VERSION +++ b/versions/KUBECTL_VERSION @@ -1 +1 @@ -v1.28.4 \ No newline at end of file +v1.29.1 \ No newline at end of file diff --git a/versions/KUBELINTER_VERSION b/versions/KUBELINTER_VERSION index 08bc6bd09dd..41a02affc01 100644 --- a/versions/KUBELINTER_VERSION +++ b/versions/KUBELINTER_VERSION @@ -1 +1 @@ -v0.6.5 +v0.6.7 diff --git a/versions/OPERATOR_SDK_VERSION b/versions/OPERATOR_SDK_VERSION index 181891c459e..2f2ce0df61a 100644 --- a/versions/OPERATOR_SDK_VERSION +++ b/versions/OPERATOR_SDK_VERSION @@ -1 +1 @@ -v1.32 +v1.33 diff --git a/versions/PROMETHEUS_STACK_VERSION b/versions/PROMETHEUS_STACK_VERSION index c1d4be12544..3d1e56ef3be 100644 --- a/versions/PROMETHEUS_STACK_VERSION +++ b/versions/PROMETHEUS_STACK_VERSION @@ -1 +1 @@ -55.3.0 +56.3.0 diff --git a/versions/PROTOBUF_VERSION b/versions/PROTOBUF_VERSION index 8b9bee5b583..a5615e13083 100644 --- a/versions/PROTOBUF_VERSION +++ b/versions/PROTOBUF_VERSION @@ -1 +1 @@ -25.1 +25.2 diff --git a/versions/REVIEWDOG_VERSION b/versions/REVIEWDOG_VERSION index 86dd09abcea..6b60281ad1a 100644 --- a/versions/REVIEWDOG_VERSION +++ b/versions/REVIEWDOG_VERSION @@ -1 +1 @@ -v0.15.0 +v0.17.0 diff --git a/versions/VALDCLI_VERSION b/versions/VALDCLI_VERSION index 97679166516..ac38ea07891 100644 --- a/versions/VALDCLI_VERSION +++ b/versions/VALDCLI_VERSION @@ -1 +1 @@ -v1.7.9 +v1.7.10 diff --git a/versions/ZLIB_VERSION b/versions/ZLIB_VERSION index 7e32cd56983..3a3cd8cc8b0 100644 --- a/versions/ZLIB_VERSION +++ b/versions/ZLIB_VERSION @@ -1 +1 @@ -1.3 +1.3.1 diff --git a/versions/actions/8398A7_ACTION_SLACK b/versions/actions/8398A7_ACTION_SLACK new file mode 100644 index 00000000000..21221d0e7a4 --- /dev/null +++ b/versions/actions/8398A7_ACTION_SLACK @@ -0,0 +1 @@ +3.16.2 diff --git a/versions/actions/ACTIONS_CACHE b/versions/actions/ACTIONS_CACHE new file mode 100644 index 00000000000..fcdb2e109f6 --- /dev/null +++ b/versions/actions/ACTIONS_CACHE @@ -0,0 +1 @@ +4.0.0 diff --git a/versions/actions/ACTIONS_CHECKOUT b/versions/actions/ACTIONS_CHECKOUT new file mode 100644 index 00000000000..627a3f43a64 --- /dev/null +++ b/versions/actions/ACTIONS_CHECKOUT @@ -0,0 +1 @@ +4.1.1 diff --git a/versions/actions/ACTIONS_DOWNLOAD_ARTIFACT b/versions/actions/ACTIONS_DOWNLOAD_ARTIFACT new file mode 100644 index 00000000000..627a3f43a64 --- /dev/null +++ b/versions/actions/ACTIONS_DOWNLOAD_ARTIFACT @@ -0,0 +1 @@ +4.1.1 diff --git a/versions/actions/ACTIONS_LABELER b/versions/actions/ACTIONS_LABELER new file mode 100644 index 00000000000..0062ac97180 --- /dev/null +++ b/versions/actions/ACTIONS_LABELER @@ -0,0 +1 @@ +5.0.0 diff --git a/versions/actions/ACTIONS_SETUP_GO b/versions/actions/ACTIONS_SETUP_GO new file mode 100644 index 00000000000..0062ac97180 --- /dev/null +++ b/versions/actions/ACTIONS_SETUP_GO @@ -0,0 +1 @@ +5.0.0 diff --git a/versions/actions/ACTIONS_UPLOAD_ARTIFACT b/versions/actions/ACTIONS_UPLOAD_ARTIFACT new file mode 100644 index 00000000000..80895903a15 --- /dev/null +++ b/versions/actions/ACTIONS_UPLOAD_ARTIFACT @@ -0,0 +1 @@ +4.3.0 diff --git a/versions/actions/AZURE_SETUP_HELM b/versions/actions/AZURE_SETUP_HELM new file mode 100644 index 00000000000..5a958026daa --- /dev/null +++ b/versions/actions/AZURE_SETUP_HELM @@ -0,0 +1 @@ +3.5 diff --git a/versions/actions/CRAZY_MAX_GHACTION_IMPORT_GPG b/versions/actions/CRAZY_MAX_GHACTION_IMPORT_GPG new file mode 100644 index 00000000000..dfda3e0b4f0 --- /dev/null +++ b/versions/actions/CRAZY_MAX_GHACTION_IMPORT_GPG @@ -0,0 +1 @@ +6.1.0 diff --git a/versions/actions/SHOGO82148_ACTIONS_UPLOAD_RELEASE_ASSET b/versions/actions/SHOGO82148_ACTIONS_UPLOAD_RELEASE_ASSET new file mode 100644 index 00000000000..f8a696c8dc5 --- /dev/null +++ b/versions/actions/SHOGO82148_ACTIONS_UPLOAD_RELEASE_ASSET @@ -0,0 +1 @@ +1.7.2 diff --git a/versions/actions/TECHNOTE_SPACE_WORKFLOW_CONCLUSION_ACTION b/versions/actions/TECHNOTE_SPACE_WORKFLOW_CONCLUSION_ACTION new file mode 100644 index 00000000000..75a22a26ac4 --- /dev/null +++ b/versions/actions/TECHNOTE_SPACE_WORKFLOW_CONCLUSION_ACTION @@ -0,0 +1 @@ +3.0.3