Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement ngt-rs and its unit test and add GitHub Actions workflows #2478

Merged
merged 15 commits into from
Apr 22, 2024

Conversation

kmrmt
Copy link
Contributor

@kmrmt kmrmt commented Apr 15, 2024

Description

Implement ngt wrapper for Rust and its unit tests.
And add GitHub Actions workflows.
This PR includes interfaces for implementing Rust agent ngt.

Related Issue

Versions

  • Go Version: 1.22.2
  • Docker Version: 20.10.8
  • Kubernetes Version: v1.29.3
  • NGT Version: 2.2

Checklist

Special notes for your reviewer

Summary by CodeRabbit

  • New Features

    • Introduced a Docker image for the "ngt" Rust-based application, enhancing the deployment process.
    • Added a new GitHub Actions workflow to automate the building of Docker images for the agent component.
    • Enhanced the agent component with new capabilities for handling nearest neighbor searches and index management.
  • Documentation

    • Updated documentation to detail the setup and capabilities of the vald-agent Docker image.
  • Refactor

    • Integrated ngt-rs as a member in the Cargo workspace to streamline dependency management.
  • Chores

    • Configured Makefile to support new Docker image targets and Rust build processes.

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

@kmrmt kmrmt requested review from a team, vankichi and datelier and removed request for a team April 15, 2024 10:56
Copy link

cloudflare-workers-and-pages bot commented Apr 16, 2024

Deploying vald with  Cloudflare Pages  Cloudflare Pages

Latest commit: e24bf3a
Status: ✅  Deploy successful!
Preview URL: https://b23af568.vald.pages.dev
Branch Preview URL: https://feature-agent-implement-ngt.vald.pages.dev

View logs

@kmrmt kmrmt requested review from a team and kpango and removed request for datelier and a team April 16, 2024 00:46
ENV APP_NAME ngt

# skipcq: DOK-DL3008
RUN apt-get update && apt-get install -y --no-install-recommends \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [hadolint] <DL3008> reported by reviewdog 🐶
Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

dockers/agent/core/agent/Dockerfile Outdated Show resolved Hide resolved
@kmrmt kmrmt changed the title implement ngt-rs and its unit test implement ngt-rs and its unit test and add Github Actions workflows Apr 18, 2024
@kmrmt kmrmt changed the title implement ngt-rs and its unit test and add Github Actions workflows implement ngt-rs and its unit test and add GitHub Actions workflows Apr 18, 2024
Copy link
Collaborator

@kpango kpango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

coderabbitai bot commented Apr 22, 2024

Walkthrough

Walkthrough

The project enhancements involve integrating a Rust-based NGT (Neighborhood Graph and Tree) library for efficient nearest neighbor searches, with Docker support for deployment. Changes include Dockerfile configurations, Makefile updates for image building, and new Rust code for managing NGT indices. This setup aims to streamline development and deployment processes for the agent component in various environments.

Changes

Files Change Summary
.github/workflows/dockers-agent-image.yml Introduces a GitHub Actions workflow for building Docker images specific to the agent component.
Makefile, Makefile.d/build.mk, Makefile.d/docker.mk Updates and adds new targets for Docker image handling and building Rust targets for the agent.
dockers/agent/core/agent/Dockerfile, dockers/agent/core/agent/README.md Sets up a Docker environment for building and running a Rust-based application, and details its usage within a Vald cluster or standalone setups.
rust/Cargo.toml, rust/bin/agent/Cargo.toml, rust/libs/.../Cargo.toml Adds new dependencies and workspace configurations for handling the NGT library in Rust.
rust/libs/ngt-rs/, including build.rs, src/... Introduces new Rust and C++ code for managing NGT indices, including FFI bindings and utility functions for nearest neighbor operations.

Poem

🐰🌟
A hop, a skip, in code we dip,
Rust and Docker, our new ship.
With indices built, and vectors set,
Our agent's ready, on this you can bet!
🚀🎉


Recent Review Details

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 87b4d9a and e24bf3a.
Files ignored due to path filters (1)
  • rust/Cargo.lock is excluded by !**/*.lock
Files selected for processing (14)
  • .github/workflows/dockers-agent-image.yml (1 hunks)
  • Makefile (1 hunks)
  • Makefile.d/build.mk (1 hunks)
  • Makefile.d/docker.mk (1 hunks)
  • dockers/agent/core/agent/Dockerfile (1 hunks)
  • dockers/agent/core/agent/README.md (1 hunks)
  • rust/Cargo.toml (1 hunks)
  • rust/bin/agent/Cargo.toml (1 hunks)
  • rust/libs/ngt-rs/Cargo.toml (1 hunks)
  • rust/libs/ngt-rs/build.rs (1 hunks)
  • rust/libs/ngt-rs/src/input.cpp (1 hunks)
  • rust/libs/ngt-rs/src/input.h (1 hunks)
  • rust/libs/ngt-rs/src/lib.rs (1 hunks)
  • rust/libs/ngt/Cargo.toml (1 hunks)
Files skipped from review due to trivial changes (2)
  • rust/Cargo.toml
  • rust/libs/ngt-rs/Cargo.toml
Additional Context Used
LanguageTool (56)
dockers/agent/core/agent/README.md (56)

Near line 1: Possible spelling mistake found.
Context: # Vald Agent ...


Near line 7: This sentence does not start with an uppercase letter.
Context: ...ing and runs incorrectly. vald-agent is the docker image for the vald-agent com...


Near line 7: Possible spelling mistake found.
Context: ...vald-agent` is the docker image for the vald-agent component. This image is responsible f...


Near line 15: Possible spelling mistake found.
Context: ... use the external storage, it requires [vald-agent-sidecar](https://hub.docker.com/r/vdaas/vald-ag...


Near line 24: Possible spelling mistake found.
Context: ...s://opensource.org/licenses/Apache-2.0) [![latest ver.](https://img.shields.io/github/release...


Near line 32: Possible spelling mistake found.
Context: ...ribe here with ⚠️ emoji --> ### linux/amd64 - CPU instruction: requires `AVX...


Near line 36: Possible spelling mistake found.
Context: ...ction: requires AVX2 or AVX512 ### linux/arm64 ⚠ This image does NOT support ru...


Near line 45: Possible spelling mistake found.
Context: ...apter Agent Standalone --> You can use vald-agent in 3 ways. 1. One of the components o...


Near line 47: Possible spelling mistake found.
Context: ... ways. 1. One of the components of the Vald cluster - Refer to [Get Started](htt...


Near line 48: Only proper nouns start with an uppercase character (there are exceptions for headlines).
Context: ...the components of the Vald cluster - Refer to [Get Started](https://vald.vdaas.org...


Near line 50: Unpaired symbol: ‘]’ seems to be missing
Context: ...on the Kubernetes cluster - Refer to [Vald Agent Standalone on Kubernetes](htt...


Near line 50: Possible spelling mistake found.
Context: ...n the Kubernetes cluster - Refer to [Vald Agent Standalone on Kubernetes](https:/...


Near line 52: Unpaired symbol: ‘]’ seems to be missing
Context: ...) 1. Standalone on Docker - Refer to [Vald Agent Standalone on Docker](https:/...


Near line 52: Possible spelling mistake found.
Context: ... 1. Standalone on Docker - Refer to [Vald Agent Standalone on Docker](https://val...


Near line 56: Possible typo: you repeated a whitespace
Context: ...andalone-on-docker/) ## Versions | tag | linux/amd64 | linux/arm64 | descriptio...


Near line 56: Possible spelling mistake found.
Context: ...e-on-docker/) ## Versions | tag | linux/amd64 | linux/arm64 | description ...


Near line 56: Possible spelling mistake found.
Context: ... ## Versions | tag | linux/amd64 | linux/arm64 | description ...


Near line 56: Possible typo: you repeated a whitespace
Context: ... linux/amd64 | linux/arm64 | description | | :------ | :---------: | :---------: ...


Near line 58: Possible typo: you repeated a whitespace
Context: ...----------------------------- | | latest | ✅ | ✅ | the latest i...


Near line 58: Possible typo: you repeated a whitespace
Context: ...-------------------------- | | latest | ✅ | ✅ | the latest image i...


Near line 58: Possible typo: you repeated a whitespace
Context: ...-------------------- | | latest | ✅ | ✅ | the latest image is the s...


Near line 58: Possible typo: you repeated a whitespace
Context: ...------------- | | latest | ✅ | ✅ | the latest image is the same as...


Near line 58: Possible typo: you repeated a whitespace
Context: ...------- | | latest | ✅ | ✅ | the latest image is the same as the la...


Near line 58: Possible spelling mistake found.
Context: ...e is the same as the latest version of vdaas/vald re...


Near line 58: Possible spelling mistake found.
Context: ...he same as the latest version of vdaas/vald reposit...


Near line 58: Possible typo: you repeated a whitespace
Context: ...hub.com/vdaas/vald) repository version. | | nightly | ✅ | ✅ | ...


Near line 59: Possible typo: you repeated a whitespace
Context: ...ository version. | | nightly | ✅ | ✅ | the nightly applie...


Near line 59: Possible typo: you repeated a whitespace
Context: ...y version. | | nightly | ✅ | ✅ | the nightly applies the m...


Near line 59: Possible typo: you repeated a whitespace
Context: ...on. | | nightly | ✅ | ✅ | the nightly applies the main br...


Near line 59: Possible typo: you repeated a whitespace
Context: ... | | nightly | ✅ | ✅ | the nightly applies the main branch's ...


Near line 59: This adverb was used twice in the sentence. Consider removing one of them or replacing them with a synonym.
Context: ...nightly | ✅ | ✅ | the nightly applies the main branch's source code o...


Near line 59: Possible spelling mistake found.
Context: ...s the main branch's source code of the vdaas/vald re...


Near line 59: Possible spelling mistake found.
Context: ...main branch's source code of the vdaas/vald reposit...


Near line 59: Possible typo: you repeated a whitespace
Context: ...ps://github.com/vdaas/vald) repository. | | vX.Y.Z | ✅ | ✅ | ...


Near line 60: Possible spelling mistake found.
Context: ...as/vald) repository. | | vX.Y.Z | ✅ | ✅ | the vX...


Near line 60: Add a space between sentences.
Context: ...vald) repository. | | vX.Y.Z | ✅ | ✅ | the vX.Y...


Near line 60: Possible typo: you repeated a whitespace
Context: ...d) repository. | | vX.Y.Z | ✅ | ✅ | the vX.Y.Z i...


Near line 60: Possible typo: you repeated a whitespace
Context: ...repository. | | vX.Y.Z | ✅ | ✅ | the vX.Y.Z image a...


Near line 60: Possible typo: you repeated a whitespace
Context: ...tory. | | vX.Y.Z | ✅ | ✅ | the vX.Y.Z image applies ...


Near line 60: Possible typo: you repeated a whitespace
Context: ... | | vX.Y.Z | ✅ | ✅ | the vX.Y.Z image applies the so...


Near line 60: Possible typo: you repeated a whitespace
Context: ... | | vX.Y.Z | ✅ | ✅ | the vX.Y.Z image applies the source co...


Near line 60: Possible spelling mistake found.
Context: ...vX.Y.Z | ✅ | ✅ | the vX.Y.Z image applies the source code of th...


Near line 60: Add a space between sentences.
Context: ...Y.Z | ✅ | ✅ | the vX.Y.Z image applies the source code of the ...


Near line 60: Possible spelling mistake found.
Context: ...Z image applies the source code of the vdaas/vald re...


Near line 60: Possible spelling mistake found.
Context: ...e applies the source code of the vdaas/vald reposit...


Near line 60: Possible typo: you repeated a whitespace
Context: ...ps://github.com/vdaas/vald) repository. | | pr-XXX | ✅ | ❌ | ...


Near line 61: Possible typo: you repeated a whitespace
Context: ...tory. | | pr-XXX | ✅ | ❌ | the pr-XXX i...


Near line 61: Possible typo: you repeated a whitespace
Context: ...y. | | pr-XXX | ✅ | ❌ | the pr-XXX image a...


Near line 61: Possible typo: you repeated a whitespace
Context: ... | | pr-XXX | ✅ | ❌ | the pr-XXX image applies ...


Near line 61: Possible typo: you repeated a whitespace
Context: ... | | pr-XXX | ✅ | ❌ | the pr-XXX image applies the so...


Near line 61: Possible typo: you repeated a whitespace
Context: ... | | pr-XXX | ✅ | ❌ | the pr-XXX image applies the source co...


Near line 61: Possible spelling mistake found.
Context: ...ce code of the pull request XXX of the vdaas/vald re...


Near line 61: Possible spelling mistake found.
Context: ...e of the pull request XXX of the vdaas/vald reposit...


Near line 69: Possible spelling mistake found.
Context: ...agent/core/agent/Dockerfile). ## About Vald Project <!...


Near line 74: Possible spelling mistake found.
Context: ...s static --> The information about the Vald project, please refer to the following:...


Near line 81: The phrase ‘feel free to’ is used quite frequently. Consider using a less frequent alternative to set your writing apart from others and make it sound more professional.
Context: ...## Contacts We're love to support you! Please feel free to contact us anytime with your questions ...

AST-based Instructions (1)
rust/libs/ngt-rs/src/lib.rs (1)

[warning] 119-129: Found use of unsafe code. Unsafe code should be avoided whenever possible. Instead, prefer safe code and use unsafe code only when necessary.
Context: unsafe {
index.pin_mut().search(
gen_random_vector(DIMENSION).as_slice(),
K as i32,
0.05,
-1.0,
i32::MIN,
&mut ids[0] as *mut i32,
&mut distances[0] as *mut f32,
)?
}
Note: [CWE-242]: Use of Inherently Dangerous Function [REFERENCES]
- https://doc.rust-lang.org/std/keyword.unsafe.html

Additional comments not posted (19)
rust/libs/ngt/Cargo.toml (1)

24-24: Dependency on ngt-rs version 0.1.0 added correctly.

rust/bin/agent/Cargo.toml (1)

24-24: Dependency on ngt version 0.1.0 added correctly.

rust/libs/ngt-rs/build.rs (1)

16-33: Build script setup correctly for integrating C++ with Rust.

rust/libs/ngt-rs/src/input.h (1)

16-55: Header file correctly defines classes interfacing with NGT library.

.github/workflows/dockers-agent-image.yml (1)

16-74: GitHub Actions workflow correctly set up for building Docker images.

dockers/agent/core/agent/Dockerfile (1)

18-95: Dockerfile correctly sets up the environment for the agent using best practices.

dockers/agent/core/agent/README.md (1)

1-89: README.md provides clear and informative details about the vald-agent Docker image.

rust/libs/ngt-rs/src/input.cpp (1)

16-137: Source file correctly implements NGT operations and interfaces with Rust.

rust/libs/ngt-rs/src/lib.rs (6)

18-24: LGTM! The enum ObjectType is well-defined and covers various data types.


26-42: LGTM! The enum DistanceType is comprehensive and covers a wide range of distance metrics.


48-48: Ensure proper documentation for new_property function to clarify its usage and the type of property it initializes.


49-49: Ensure set_dimension checks for non-negative dimensions to prevent runtime errors.


57-66: Consider replacing the unsafe block with safe Rust code if possible, to enhance safety and maintainability.


102-150: The unit test test_ngt appears comprehensive. However, ensure that edge cases and error conditions are also tested to improve test coverage.

Makefile.d/build.mk (2)

98-99: Ensure that the directory change with pushd is paired with popd to avoid unexpected directory changes affecting subsequent commands.


101-102: Similar to the release target, verify that directory changes do not affect other parts of the build process.

Makefile.d/docker.mk (2)

112-113: LGTM! The target docker/name/agent correctly outputs the Docker image name for the agent.


116-120: Ensure that the Docker build process for the agent is optimized and that all necessary build arguments are provided.

Makefile (1)

27-27: Ensure that the AGENT_IMAGE variable is consistently used across all relevant Docker and build targets to maintain consistency.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@kpango kpango merged commit f062590 into main Apr 22, 2024
38 checks passed
@kpango kpango deleted the feature/agent/implement-ngt-rs-test branch April 22, 2024 07:22
hlts2 added a commit that referenced this pull request May 8, 2024
* fix: git add chart directory for release (#2356)

Signed-off-by: hlts2 <[email protected]>

* 🔖 🤖 Release v1.7.11 (#2360) (#2361)

* 🔖 🤖 Release v1.7.11



* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in 578746e according to the output
from Gofumpt and Prettier.

Details: #2360

---------

Signed-off-by: Vdaas CI <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Change docker scan timeout longer (#2363)

* refactor code using golangci-lint (#2362)

Signed-off-by: kpango <[email protected]>

* Create SECURITY.md (#2367)

* Create SECURITY.md

Signed-off-by: Yusuke Kato <[email protected]>

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in e8609b0 according to the output
from Gofumpt and Prettier.

Details: #2367

---------

Signed-off-by: Yusuke Kato <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* add commit hash build image (#2359)

Signed-off-by: kpango <[email protected]>

* Make agent export index metrics to Pod k8s resource (#2319)

* Add config

* Add clusterRole and serviceAccount for agent

* Add more metrics

* Format

* Add export index info duration configuration

* Refactor internal/k8s

* Move apply function to internal/k8s

* Add more config

* Remove unused import and variable

* Use vald errors

* Add pod name and pod namespace to hack e2e agent

* Apply tagalign

* Revert unnecesarry specification of PodName

* Enable export index info to Kubernetes in agent templates only when the config is enabled

* Fix agent clusterrole name

* Update key name

* Update comments

* Add index count as export metrics

* Ignore gomnd

* Add index count entry to exportMetricsOnCreateIndex function

* Update values schema

* Fix formatter job

* Remove unused defines

* update docker build target platform selection rules (#2370)

Signed-off-by: kpango <[email protected]>
Co-authored-by: Yusuke Kadowaki <[email protected]>

* improve Backport Pull Request Title & Description Quality (#2373)

Signed-off-by: kpango <[email protected]>
Co-authored-by: Kosuke Morimoto <[email protected]>

* Update workflow to release readreplica chart (#2383)

* improve Backport Pull Request Title & Description Quality (#2373)

Signed-off-by: kpango <[email protected]>
Co-authored-by: Kosuke Morimoto <[email protected]>

* Add readreplica chart release

* update k8s/readreplica

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in 70f1dad according to the output
from Gofumpt and Prettier.

Details: #2383

* [bugfix] fix backport github value bypass failure (#2378)

Signed-off-by: kpango <[email protected]>

* Revert backport.yaml

---------

Signed-off-by: kpango <[email protected]>
Co-authored-by: Yusuke Kato <[email protected]>
Co-authored-by: Kosuke Morimoto <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* 💚 ♻️ Add Con-Bench helm chart to the Vald charts (#2388)

Signed-off-by: vankichi <[email protected]>

* Delete unnecessary code for mirror (#2366)

* fix: delete unnecessary code for mirror

Signed-off-by: hlts2 <[email protected]>

* fix: make deps/install and format

Signed-off-by: hlts2 <[email protected]>

* improve Backport Pull Request Title & Description Quality (#2373)

Signed-off-by: kpango <[email protected]>
Co-authored-by: Kosuke Morimoto <[email protected]>

* fix: naming of variable

Signed-off-by: hlts2 <[email protected]>

---------

Signed-off-by: hlts2 <[email protected]>
Signed-off-by: kpango <[email protected]>
Co-authored-by: Yusuke Kato <[email protected]>
Co-authored-by: Kosuke Morimoto <[email protected]>

* change JP logo to EN logo (#2369)

Signed-off-by: kpango <[email protected]>
Co-authored-by: taisuou <[email protected]>

* Add rotate-all option to rotator (#2305)

* Add rotate-all option to rotator

* Fix linter warnings

* Make it possible to choose multiple rotation target

* Add tests for parseReplicaID

* Add tests for parseReplicaID

* Hide testify in internal

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in dd84674 according to the output
from Gofumpt and Prettier.

Details: #2305

* Apply format

* Lint

* Lint

---------

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Yusuke Kato <[email protected]>

* Resolve kvs already closed before last saving (#2390)

Signed-off-by: kpango <[email protected]>

* create continous benchmark doc (#2352)

* improve Backport Pull Request Title & Description Quality (#2373)

Signed-off-by: kpango <[email protected]>
Co-authored-by: Kosuke Morimoto <[email protected]>

* 📝 create continous benchmark doc

Signed-off-by: vankichi <[email protected]>

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in ace001a according to the output
from Gofumpt and Prettier.

Details: #2352

* ♻️ rafactor default params

Signed-off-by: vankichi <[email protected]>

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in 9880dfc according to the output
from Gofumpt and Prettier.

Details: #2352

* ♻️ Fix format

Signed-off-by: vankichi <[email protected]>

* Revert "improve Backport Pull Request Title & Description Quality (#2373)"

This reverts commit 4246def.

* ♻️ remove dimension from con-bench

Signed-off-by: vankichi <[email protected]>

* 📝 Add sample benchmark manifest

Signed-off-by: vankichi <[email protected]>

* Update docs/performance/continuos-benchmatk.md

Co-authored-by: Yusuke Kato <[email protected]>
Signed-off-by: Kiichiro YUKAWA <[email protected]>

* Update docs/performance/continuos-benchmatk.md

Co-authored-by: Hiroto Funakoshi <[email protected]>
Signed-off-by: Kiichiro YUKAWA <[email protected]>

---------

Signed-off-by: kpango <[email protected]>
Signed-off-by: vankichi <[email protected]>
Signed-off-by: Kiichiro YUKAWA <[email protected]>
Co-authored-by: Yusuke Kato <[email protected]>
Co-authored-by: Kosuke Morimoto <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Hiroto Funakoshi <[email protected]>

* fix: build error of internal kvs test (#2396)

Signed-off-by: hlts2 <[email protected]>

* 🤖 Update license headers / Format Go codes and YAML files (#2397)

Signed-off-by: Vdaas CI <[email protected]>
Co-authored-by: Hiroto Funakoshi <[email protected]>

* fix: disable protobuf dispatch for client (#2401)

Signed-off-by: hlts2 <[email protected]>

* update deps (#2404)

Signed-off-by: kpango <[email protected]>

* 🔖 🤖 Release v1.7.12 (#2408) (#2409)

* 🔖 🤖 Release v1.7.12



* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in 5bd8605 according to the output
from Gofumpt and Prettier.

Details: #2408

---------

Signed-off-by: Vdaas CI <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Add tests for index information export (#2412)

* Add tests for index information export

* Add comments

* 📝 Fix typo of file name (#2413)

Signed-off-by: vankichi <[email protected]>

* Fix agent-faiss build failed (#2418)

* 🐳 Fix agent-faiss build failed

Signed-off-by: vankichi <[email protected]>

* 🐳 Fix COPY binary

Signed-off-by: vankichi <[email protected]>

* 🐳 Change COPY binary (use ld-linux-x86-64)

Signed-off-by: vankichi <[email protected]>

---------

Signed-off-by: vankichi <[email protected]>

* Fix the logic to determine docker image (#2410)

* fix: update action to get tag list

Signed-off-by: hlts2 <[email protected]>

* fix: refactor sub command execution

Signed-off-by: hlts2 <[email protected]>

* fix: use tag list in detect ci container workflow

Signed-off-by: hlts2 <[email protected]>

* fix: name for detected result

Signed-off-by: hlts2 <[email protected]>

* fix: invalid variable bug

Signed-off-by: hlts2 <[email protected]>

* fix: execution error and invalid variable

Signed-off-by: hlts2 <[email protected]>

* fix: deleted unnecessary comment

Signed-off-by: hlts2 <[email protected]>

* fix: deleted unnecessary parameters

Signed-off-by: hlts2 <[email protected]>

* fix: use new determine tag logic in the docker build workflow

Signed-off-by: hlts2 <[email protected]>

* fix: bugfix extra tags handling and small refactor

Signed-off-by: hlts2 <[email protected]>

* fix: build tag rule or release branch based on tag list

Signed-off-by: hlts2 <[email protected]>

* fix: typo

Signed-off-by: hlts2 <[email protected]>

* fix: indent

Signed-off-by: hlts2 <[email protected]>

* fix: refactor syntax

Signed-off-by: hlts2 <[email protected]>

* fix: typo and invalid option error

Signed-off-by: hlts2 <[email protected]>

* fix: use helm extra option

Signed-off-by: hlts2 <[email protected]>

* fix: add comment for tag management

Signed-off-by: hlts2 <[email protected]>

* fix: unsetbug of helm extra option

Signed-off-by: hlts2 <[email protected]>

* fix: build target condition

Signed-off-by: hlts2 <[email protected]>

---------

Signed-off-by: hlts2 <[email protected]>

* Update build rule for nightly image (#2421)

* fix: update build rule for nightly

Signed-off-by: hlts2 <[email protected]>

* fix: indent and deleted unnecessary tag

Signed-off-by: hlts2 <[email protected]>

* fix: update tag name when tag is unknown

Signed-off-by: hlts2 <[email protected]>

* fix: add secondary tags for build performance

Signed-off-by: hlts2 <[email protected]>

* fix: argument order

Signed-off-by: hlts2 <[email protected]>

---------

Signed-off-by: hlts2 <[email protected]>

* Add `index-operator` template implementation (#2375)

* improve Backport Pull Request Title & Description Quality (#2373)

Signed-off-by: kpango <[email protected]>
Co-authored-by: Kosuke Morimoto <[email protected]>

* [bugfix] fix backport github value bypass failure (#2378)

Signed-off-by: kpango <[email protected]>

* [bugfix] fix backport github value bypass failure (#2381)

Signed-off-by: kpango <[email protected]>

* Add index operator boilerplate

* Add k8s controller

* Add pod and job controllers

* Add annotations in the pod reconciler

* Update auto indexing service configurations

* Update WithOnReconcileFunc signature to include context

* Refactor debugging log

* Refactor reconcile funcs

* add nolint

* remove unused parameters

* lint

* Add dockerfile and build ci

* remove params

* Add index-operator image build command to Makefile

* Add index operator k8s templates

* Update helm schema

* Update readme

* Add internal/k8s as a trigger for images that depends on controller-runtime

* remove comment

* Update pkg/index/operator/service/operator.go

Co-authored-by: Yusuke Kato <[email protected]>
Signed-off-by: Yusuke Kadowaki <[email protected]>

* Update pkg/index/operator/service/operator.go

Co-authored-by: Yusuke Kato <[email protected]>
Signed-off-by: Yusuke Kadowaki <[email protected]>

* Refactor

* Add build commands

* Refactor

Co-authored-by: Yusuke Kato <[email protected]>

---------

Signed-off-by: kpango <[email protected]>
Signed-off-by: Yusuke Kadowaki <[email protected]>
Co-authored-by: Yusuke Kato <[email protected]>
Co-authored-by: Kosuke Morimoto <[email protected]>

* Fix output settings to determine-docker-image-tag action and release branch build tag name (#2423)

* fix: add outut settings for action

Signed-off-by: hlts2 <[email protected]>

* fix: tag name for release branch build

Signed-off-by: hlts2 <[email protected]>

* fix: refactor

Signed-off-by: hlts2 <[email protected]>

---------

Signed-off-by: hlts2 <[email protected]>

* fix: typo of execution rule (#2426)

Signed-off-by: hlts2 <[email protected]>

* Add flush API for deleting all vectors (#2273)

* add flush api

Signed-off-by: aknishid <[email protected]>

* added flush api

* fix typo

* fix pb.go & fix conflict

Signed-off-by: aknishid <[email protected]>

* add flush api

* add handler Flush

Signed-off-by: aknishid <[email protected]>

* add vald.Client flush

* fix filter gateway

Signed-off-by: aknishid <[email protected]>

* fix handler cnts

Signed-off-by: aknishid <[email protected]>

* delete unused var

Signed-off-by: aknishid <[email protected]>

* add author

Signed-off-by: Yamada Takuya <[email protected]>

* fix error

Signed-off-by: aknishid <[email protected]>

* fix flush.go & ngt.go

Signed-off-by: aknishid <[email protected]>

* add flush to example

Signed-off-by: aknishid <[email protected]>

* fix gateway lb

Signed-off-by: aknishid <[email protected]>

* update flush proto

Signed-off-by: aknishid <[email protected]>

* fix docs api README.md

Signed-off-by: aknishid <[email protected]>

* Fix flush ctx

Signed-off-by: aknishid <[email protected]>

* update docs & comment

Signed-off-by: aknishid <[email protected]>

* after make format

Signed-off-by: aknishid <[email protected]>

* add e2e

Signed-off-by: aknishid <[email protected]>

* update example & tutorial

Signed-off-by: aknishid <[email protected]>

* Update internal/errors/ngt.go

Co-authored-by: Kiichiro YUKAWA <[email protected]>

* fix review

Signed-off-by: aknishid <[email protected]>

* modify status.md

Signed-off-by: aknishid <[email protected]>

* add error handling

Signed-off-by: aknishid <[email protected]>

* update proto

Signed-off-by: aknishid <[email protected]>

* fix doc

Signed-off-by: aknishid <[email protected]>

* ♻️ Fix proto

Signed-off-by: vankichi <[email protected]>

* use atomic bool

Signed-off-by: aknishid <[email protected]>

* fix proto

Signed-off-by: aknishid <[email protected]>

* update proto

Signed-off-by: aknishid <[email protected]>

* fix gateway error

Signed-off-by: aknishid <[email protected]>

* ✅ 🚧 Avoid e2e failing due to unimplemented handler and Add unimplmented handler method for the future

Signed-off-by: vankichi <[email protected]>

* Update apis/proto/v1/payload/payload.proto

Co-authored-by: Kiichiro YUKAWA <[email protected]>
Signed-off-by: aknishid <[email protected]>

---------

Signed-off-by: aknishid <[email protected]>
Signed-off-by: Yamada Takuya <[email protected]>
Signed-off-by: vankichi <[email protected]>
Signed-off-by: aknishid <[email protected]>
Co-authored-by: takuyaymd <[email protected]>
Co-authored-by: takuyyam <[email protected]>
Co-authored-by: Kiichiro YUKAWA <[email protected]>
Co-authored-by: Yusuke Kato <[email protected]>

* docs: add aknishid as a contributor for code, and maintenance (#2431)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in abc4c52 according to the output
from Gofumpt and Prettier.

Details: #2431

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Yusuke Kato <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* update deps & add validation for Flush API when agent is Read Only (#2433)

Signed-off-by: kpango <[email protected]>

* Update README.md (grammer) (#2440)

Signed-off-by: Hrichik Mazumder <[email protected]>

* docs: add hrichiksite as a contributor for doc (#2441)

* docs: update README.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in b8054d9 according to the output
from Gofumpt and Prettier.

Details: #2441

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Yusuke Kato <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Added snapshot timestamp annotations to read replica agent (#2428)

* Add lastTimeRotateReplicaTimestampAnnotationsKey constant

* Use ptr package

* Update annotations in ngt.go and rotator.go

* Add labels to Pod struct and update annotations handling***

***Introduce vald package for k8s related constants***

***Implement rotateIfNeeded function to check if read replica rotation is needed

* Refactor

* set sample log level debug

* Use k8s timestamp

* Refactor

* Format

* Add MatchingLabels method to ValdK8sClientMock

* Format

* Fix test

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in 39b66fa according to the output
from Gofumpt and Prettier.

Details: #2428

* Rename constants

Co-authored-by: Yusuke Kato <[email protected]>

* Refactor rotateIfNeeded function to use label selector for listing deployments

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in 6ace761 according to the output
from Gofumpt and Prettier.

Details: #2428

* FIx deepsource

* Revert

---------

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Yusuke Kato <[email protected]>

* fix: bugfix version update for docker build (#2445)

Signed-off-by: hlts2 <[email protected]>

* Fix index job logic to pass DNS A record (#2438)

* fix: choose user given target address in priority

Signed-off-by: hlts2 <[email protected]>

* fix: deleted unnecessary code

Signed-off-by: hlts2 <[email protected]>

* fix: add logic to connect the user given target addresses

Signed-off-by: hlts2 <[email protected]>

* fix: add info log about new connection target

Signed-off-by: hlts2 <[email protected]>

* fix: indent of configuration data

Signed-off-by: hlts2 <[email protected]>

* fix: indent bug

Signed-off-by: hlts2 <[email protected]>

* fix: deepsource warning

Signed-off-by: hlts2 <[email protected]>

---------

Signed-off-by: hlts2 <[email protected]>

* Fix operator-sdk version (#2447)

* fix: down grade operator version

Signed-off-by: hlts2 <[email protected]>

* fix: upgrade operator-sdk version

Signed-off-by: hlts2 <[email protected]>

* fix: operator-sdk version

Signed-off-by: hlts2 <[email protected]>

---------

Signed-off-by: hlts2 <[email protected]>

* add file name lint (#2417)

Signed-off-by: kpango <[email protected]>

* fix: add extra option for ci-container build (#2451)

Signed-off-by: hlts2 <[email protected]>

* Add base of benchmark operator dashboard (#2430)

* 📈 Add base of benchmark operator dashboard

Signed-off-by: vankichi <[email protected]>

* 💚 Fix build benchmark images trigger

Signed-off-by: vankichi <[email protected]>

* 💚 Add info tag for info metrics

Signed-off-by: vankichi <[email protected]>

* 📈 showing job image and tags

Signed-off-by: vankichi <[email protected]>

* 📈 add bench job status

Signed-off-by: vankichi <[email protected]>

* ♻️ Update dashboard and rename

Signed-off-by: vankichi <[email protected]>

* ♻️ Fix

Signed-off-by: vankichi <[email protected]>

* Update internal/observability/metrics/tools/benchmark/benchmark.go

Co-authored-by: Hiroto Funakoshi <[email protected]>
Signed-off-by: Kiichiro YUKAWA <[email protected]>

---------

Signed-off-by: vankichi <[email protected]>
Signed-off-by: Kiichiro YUKAWA <[email protected]>
Co-authored-by: Hiroto Funakoshi <[email protected]>

* Implement index operator logic for read replica rotation (#2444)

* Remove job reconciler

* Add leader election to index operator

* Add roles for leader election

* Add operator logic for rotation

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in 844cca1 according to the output
from Gofumpt and Prettier.

Details: #2444

* Remove unnecesary change

* Fix build

* nits

* Refactor

* Fix clusterrole

* Move to podv2

* Add job concurrency check

* Refactor

* Refactor

* Fix heavy copying

* Update helm schema

* Fix package doc

* Remove unused code and refactor For() method

* Update target read replica ID in config

* Update internal/k8s/podv2/option.go

Co-authored-by: Hiroto Funakoshi <[email protected]>
Signed-off-by: Yusuke Kadowaki <[email protected]>

* Refactor

* rename podv2 to v2/pod

* Add client DI

* Fix envkey helper

* Set namespace from values.yaml

* Use annotations to specify the id

* Update schema

* Update sample

* Update values

* Update schema

* Fix spelling

* Fix package name

* Fix read replica e2e

* Add job templates for rotation, creation, saving, and correction

* Update config.go to decode k8s object

* Update sample.yaml for index operator

* Use job template from cfg

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in 584d1f0 according to the output
from Gofumpt and Prettier.

Details: #2444

* Fix tagalign

* Fix config test

* Fix config test

* Disable read replica e2e for now

---------

Signed-off-by: Yusuke Kadowaki <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Hiroto Funakoshi <[email protected]>

* add inner product distance type for ngt (#2454)

Signed-off-by: kpango <[email protected]>

* Fix e2e for read replica and add e2e for index operator (#2455)

* Fix read replica e2e

* Update default image list in action.yaml

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in 6cdac9f according to the output
from Gofumpt and Prettier.

Details: #2455

---------

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* Add unit tests for index operator (#2460)

* Add prototype tests

* Refactor

* Fix not to use kubeconfig

* 🤖 Automatically update PULL_REQUEST_TEMPLATE and ISSUE_TEMPLATE (#2457)

Signed-off-by: Vdaas CI <[email protected]>
Co-authored-by: Kiichiro YUKAWA <[email protected]>

* Bugfix recreate benchmark job when operator reboot (#2463)

* 🐛 Fix recreate benchmark job already runnnig when operator rebooted

Signed-off-by: vankichi <[email protected]>

* 🐛 Fix benchmarkJobReconcile status handling

Signed-off-by: vankichi <[email protected]>

* ✅ Fix test

Signed-off-by: vankichi <[email protected]>

* ♻️ Update k8s dir

Signed-off-by: vankichi <[email protected]>

* ♻️ Fix

Signed-off-by: vankichi <[email protected]>

---------

Signed-off-by: vankichi <[email protected]>

* Refactor k8s types (#2462)

* Refactor types

* Refactor hdf5_test.go

* Format

* Refactor

* add extra flags for NGT build phase (#2467)

* Fix workflow trigger for backport pr creation (#2471)

* Automatically add backport main label for release-pr (#2473)

* feat: automatically add backport main label for release-pr

Signed-off-by: Hiroto Funakoshi <[email protected]>

* fix: deleted unnecessary quotation

Signed-off-by: Hiroto Funakoshi <[email protected]>

---------

Signed-off-by: Hiroto Funakoshi <[email protected]>

* update deps (#2468)

* update deps

Signed-off-by: kpango <[email protected]>

* fix server_test.go due to the grpc-go updates

Signed-off-by: kpango <[email protected]>

---------

Signed-off-by: kpango <[email protected]>

* Update README.md (#2479)

Signed-off-by: Yusuke Kato <[email protected]>

* Implement client metrics interceptor for continuous benchmark job (#2477)

* ♻️ Mount benchmark-operator-config to vald-benchmark-job Pod

Signed-off-by: vankichi <[email protected]>

* 📈 add framework for send gRPC client metrics

Signed-off-by: vankichi <[email protected]>

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in a532b7d according to the output
from Gofumpt and Prettier.

Details: #2477

* 📈 Add client metric interceptor

Signed-off-by: vankichi <[email protected]>

* ♻️ Change vbor chart for apply general job configuration

Signed-off-by: vankichi <[email protected]>

* Update pkg/tools/benchmark/job/usecase/benchmarkd.go

Co-authored-by: Hiroto Funakoshi <[email protected]>
Signed-off-by: Kiichiro YUKAWA <[email protected]>

* 🐛 Fix build error and add comment

Signed-off-by: vankichi <[email protected]>

* ♻️ Fix format

Signed-off-by: vankichi <[email protected]>

---------

Signed-off-by: vankichi <[email protected]>
Signed-off-by: Kiichiro YUKAWA <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Hiroto Funakoshi <[email protected]>

* implement ngt-rs and its unit test and add GitHub Actions workflows (#2478)

* implement test

* update rust dependencies

* fix

* make format

* add Github Actions workflows

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Yusuke Kato <[email protected]>

* 📈 Add client metrics panels for continuous benchmark job (#2481)

Signed-off-by: vankichi <[email protected]>

* Add rust versions (#2482)

* add rust versions

* fix

* add rust version

* add rust-toolchain.toml

* make format

* Update continuous benchmark docs (#2485)

* 📝 Update continous benchmark docs

Signed-off-by: vankichi <[email protected]>

* style: format code with Gofumpt and Prettier

This commit fixes the style issues introduced in e3ab1d2 according to the output
from Gofumpt and Prettier.

Details: #2485

* Update docs/performance/continuous-benchmark.md

Signed-off-by: Kiichiro YUKAWA <[email protected]>

* 📝 Fix

Signed-off-by: vankichi <[email protected]>

---------

Signed-off-by: vankichi <[email protected]>
Signed-off-by: Kiichiro YUKAWA <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>

* update NGT version (#2484)

* fix sed line (#2488)

* 🤖 Automatically update PULL_REQUEST_TEMPLATE and ISSUE_TEMPLATE (#2487)

Signed-off-by: Vdaas CI <[email protected]>
Co-authored-by: Hiroto Funakoshi <[email protected]>

* Add efficient search logic for large top-k users (#2491)

* add efficient search logic for large top-k users

Signed-off-by: kpango <[email protected]>

* fix bug

Signed-off-by: kpango <[email protected]>

---------

Signed-off-by: kpango <[email protected]>

---------

Signed-off-by: hlts2 <[email protected]>
Signed-off-by: Vdaas CI <[email protected]>
Signed-off-by: kpango <[email protected]>
Signed-off-by: Yusuke Kato <[email protected]>
Signed-off-by: vankichi <[email protected]>
Signed-off-by: Kiichiro YUKAWA <[email protected]>
Signed-off-by: Yusuke Kadowaki <[email protected]>
Signed-off-by: aknishid <[email protected]>
Signed-off-by: Yamada Takuya <[email protected]>
Signed-off-by: aknishid <[email protected]>
Signed-off-by: Hrichik Mazumder <[email protected]>
Signed-off-by: Hiroto Funakoshi <[email protected]>
Co-authored-by: vdaas-ci <[email protected]>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Yusuke Kadowaki <[email protected]>
Co-authored-by: Yusuke Kato <[email protected]>
Co-authored-by: Kosuke Morimoto <[email protected]>
Co-authored-by: Kiichiro YUKAWA <[email protected]>
Co-authored-by: taisho <[email protected]>
Co-authored-by: taisuou <[email protected]>
Co-authored-by: aknishid <[email protected]>
Co-authored-by: takuyaymd <[email protected]>
Co-authored-by: takuyyam <[email protected]>
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Hrichik Mazumder <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants