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

Refactor/test e2e/add v2 e2e strategic testing #2884

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .gitfiles
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
.github/workflows/semver-major-minor.yaml
.github/workflows/semver-patch.yaml
.github/workflows/test-hack.yaml
.github/workflows/unit-test-rust.yaml
.github/workflows/unit-test.yaml
.github/workflows/update-deps.yaml
.github/workflows/update-protobuf.yaml
Expand Down Expand Up @@ -157,7 +158,23 @@ Makefile.d/test.mk
Makefile.d/tools.mk
README.md
SECURITY.md
apis/docs/buf.gen.doc.yaml
apis/docs/buf.gen.payload.yaml
apis/docs/buf.gen.tmpl.yaml
apis/docs/v1/doc.tmpl
apis/docs/v1/docs.md
apis/docs/v1/filter.md
apis/docs/v1/flush.md
apis/docs/v1/index.md
apis/docs/v1/insert.md
apis/docs/v1/mirror.md
apis/docs/v1/object.md
apis/docs/v1/payload.md.tmpl
apis/docs/v1/payload.tmpl
apis/docs/v1/remove.md
apis/docs/v1/search.md
apis/docs/v1/update.md
apis/docs/v1/upsert.md
apis/grpc/v1/agent/core/agent.go
apis/grpc/v1/agent/core/agent.pb.go
apis/grpc/v1/agent/core/agent_vtproto.pb.go
Expand Down Expand Up @@ -468,6 +485,7 @@ cmd/agent/core/ngt/main_test.go
cmd/agent/core/ngt/sample-cow.yaml
cmd/agent/core/ngt/sample-fp16.yaml
cmd/agent/core/ngt/sample.yaml
cmd/agent/core/qbg/sample.yaml
cmd/agent/sidecar/main.go
cmd/agent/sidecar/main_test.go
cmd/discoverer/k8s/main.go
Expand All @@ -491,6 +509,7 @@ cmd/index/job/creation/main.go
cmd/index/job/creation/main_test.go
cmd/index/job/creation/sample.yaml
cmd/index/job/deletion/main.go
cmd/index/job/deletion/main_test.go
cmd/index/job/deletion/sample.yaml
cmd/index/job/readreplica/rotate/main.go
cmd/index/job/readreplica/rotate/main_test.go
Expand Down Expand Up @@ -841,6 +860,7 @@ internal/config/index.go
internal/config/index_creation.go
internal/config/index_creation_test.go
internal/config/index_deleter.go
internal/config/index_deleter_test.go
internal/config/index_operator.go
internal/config/index_operator_test.go
internal/config/index_save.go
Expand Down Expand Up @@ -1064,6 +1084,7 @@ internal/io/copy_bench_test.go
internal/io/copy_test.go
internal/io/io.go
internal/io/io_test.go
internal/iter/iter.go
internal/k8s/client/client.go
internal/k8s/client/client_test.go
internal/k8s/client/option.go
Expand Down Expand Up @@ -1249,7 +1270,9 @@ internal/net/net_test.go
internal/net/option.go
internal/net/option_test.go
internal/net/quic/conn.go
internal/net/quic/conn_test.go
internal/net/quic/listener.go
internal/net/quic/listener_test.go
internal/observability/attribute/attribute.go
internal/observability/attribute/attribute_test.go
internal/observability/exporter/exporter.go
Expand Down Expand Up @@ -1380,6 +1403,10 @@ internal/test/data/tls/invalid.crt
internal/test/data/tls/invalid.pem
internal/test/data/vector/gen.go
internal/test/data/vector/gen_test.go
internal/test/data/vector/noise/noise.go
internal/test/data/vector/noise/noise_test.go
internal/test/data/vector/noise/option.go
internal/test/data/vector/noise/option_test.go
internal/test/doc.go
internal/test/goleak/goleak.go
internal/test/goleak/goleak_test.go
Expand Down Expand Up @@ -1795,9 +1822,13 @@ pkg/index/job/creation/service/options_test.go
pkg/index/job/creation/usecase/creation.go
pkg/index/job/creation/usecase/creation_test.go
pkg/index/job/deletion/config/config.go
pkg/index/job/deletion/config/config_test.go
pkg/index/job/deletion/service/deleter.go
pkg/index/job/deletion/service/deleter_test.go
pkg/index/job/deletion/service/options.go
pkg/index/job/deletion/service/options_test.go
pkg/index/job/deletion/usecase/deletion.go
pkg/index/job/deletion/usecase/deletion_test.go
pkg/index/job/readreplica/rotate/config/config.go
pkg/index/job/readreplica/rotate/config/config_test.go
pkg/index/job/readreplica/rotate/service/options.go
Expand Down Expand Up @@ -1931,6 +1962,7 @@ rust/bin/agent/src/handler.rs
rust/bin/agent/src/handler/common.rs
rust/bin/agent/src/handler/index.rs
rust/bin/agent/src/handler/insert.rs
rust/bin/agent/src/handler/object.rs
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify Rust Option handling in object handler

Based on past learnings, ensure that the modified Rust handler doesn't use unwrap() on Option types, which could lead to panics. Instead, handle None values explicitly by returning appropriate error statuses.


🏁 Script executed:

#!/bin/bash
# Check if the modified Rust handler properly handles Option types without unwrap()
grep -n "unwrap()" rust/bin/agent/src/handler/object.rs

Length of output: 109


Attention: Replace unwrap() usage in Rust Object Handler

The file rust/bin/agent/src/handler/object.rs still calls unwrap() on an Option at line 44:

let domain = hostname.to_str().unwrap();

This violates our best practices. Please refactor this code to explicitly handle the None case— for example, by using a match or if let expression to return an appropriate error status when to_str() fails.

rust/bin/agent/src/handler/remove.rs
rust/bin/agent/src/handler/search.rs
rust/bin/agent/src/handler/update.rs
Expand All @@ -1940,6 +1972,7 @@ rust/bin/meta/Cargo.toml
rust/bin/meta/src/handler.rs
rust/bin/meta/src/handler/meta.rs
rust/bin/meta/src/main.rs
rust/bin/meta/src/test_client.rs
rust/libs/algorithm/Cargo.toml
rust/libs/algorithm/src/lib.rs
rust/libs/algorithms/faiss/Cargo.toml
Expand All @@ -1949,6 +1982,11 @@ rust/libs/algorithms/ngt/build.rs
rust/libs/algorithms/ngt/src/input.cpp
rust/libs/algorithms/ngt/src/input.h
rust/libs/algorithms/ngt/src/lib.rs
rust/libs/algorithms/qbg/Cargo.toml
rust/libs/algorithms/qbg/build.rs
rust/libs/algorithms/qbg/src/input.cpp
rust/libs/algorithms/qbg/src/input.h
rust/libs/algorithms/qbg/src/lib.rs
rust/libs/observability/Cargo.toml
rust/libs/observability/src/config.rs
rust/libs/observability/src/lib.rs
Expand Down Expand Up @@ -1993,6 +2031,25 @@ tests/e2e/performance/max_vector_dim_test.go
tests/e2e/pkg/agent/core/ngt/service/ngt_e2s_test.go
tests/e2e/sidecar/sidecar_test.go
tests/performance/max_vector_dim_test.go
tests/v2/e2e/assets/rollout.yaml
tests/v2/e2e/assets/unary_crud.yaml
tests/v2/e2e/config/config.go
tests/v2/e2e/config/enums.go
tests/v2/e2e/crud/crud_test.go
tests/v2/e2e/crud/dataset_test.go
tests/v2/e2e/crud/grpc_test.go
tests/v2/e2e/crud/index_test.go
tests/v2/e2e/crud/modification_test.go
tests/v2/e2e/crud/object_test.go
tests/v2/e2e/crud/search_test.go
tests/v2/e2e/crud/strategy_test.go
tests/v2/e2e/hdf5/hdf5.go
tests/v2/e2e/kubernetes/client.go
tests/v2/e2e/kubernetes/portforward/option.go
tests/v2/e2e/kubernetes/portforward/portforward.go
tests/v2/e2e/kubernetes/resources.go
tests/v2/e2e/kubernetes/rollout.go
tests/v2/e2e/kubernetes/status.go
versions/BUF_VERSION
versions/CHAOS_MESH_VERSION
versions/CMAKE_VERSION
Expand All @@ -2004,6 +2061,7 @@ versions/HDF5_VERSION
versions/HELM_DOCS_VERSION
versions/HELM_VERSION
versions/JAEGER_OPERATOR_VERSION
versions/K3D_VERSION
versions/K3S_VERSION
versions/KIND_VERSION
versions/KUBECTL_VERSION
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/_docker-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ jobs:
- name: Set Git config
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- 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:
registry: ghcr.io
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
with:
Expand All @@ -85,17 +96,6 @@ jobs:
image=ghcr.io/vdaas/vald/vald-buildkit:nightly
network=host
buildkitd-flags: "--debug --oci-worker-gc=false --oci-worker-snapshotter=stargz"
- 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:
registry: ghcr.io
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
- name: Build and Publish
id: build_and_publish
uses: ./.github/actions/docker-build
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/_release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
runs-on: ubuntu-latest
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
env:
RELEASE_BRANCH_NAME: ${{ inputs.release_branch_name }}
PREPARE_RELEASE_BRANCH_NAME: prepare/${{ inputs.release_branch_name }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-binaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
needs: [detect-ci-container]
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-protobuf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
needs: [detect-ci-container]
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Set Git config
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/chatops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
runs-on: ubuntu-latest
container:
image: ghcr.io/vdaas/vald/vald-ci-container:nightly
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
steps:
- name: Check PR Comments
id: check_comments_label
Expand Down Expand Up @@ -79,6 +82,9 @@ jobs:
runs-on: ubuntu-latest
container:
image: ghcr.io/vdaas/vald/vald-ci-container:nightly
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
steps:
- name: Check PR Comments
id: check_comments_rebase
Expand Down Expand Up @@ -156,6 +162,9 @@ jobs:
runs-on: ubuntu-latest
container:
image: ghcr.io/vdaas/vald/vald-ci-container:nightly
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
steps:
- name: check PR Comments
id: check_comments_gen_test
Expand Down Expand Up @@ -269,6 +278,9 @@ jobs:
runs-on: ubuntu-latest
container:
image: ghcr.io/vdaas/vald/vald-ci-container:nightly
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
steps:
- name: check PR Comments
id: check_comments_format
Expand Down Expand Up @@ -401,6 +413,9 @@ jobs:
runs-on: ubuntu-latest
container:
image: ghcr.io/vdaas/vald/vald-ci-container:nightly
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
steps:
- name: check PR Comments
id: check_comments_approve
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
needs: [detect-ci-container]
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
needs: [detect-ci-container]
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/e2e-chaos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
options: "--add-host host.docker.internal:host-gateway"
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -85,6 +88,9 @@ jobs:
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
options: "--add-host host.docker.internal:host-gateway"
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -126,6 +132,9 @@ jobs:
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
options: "--add-host host.docker.internal:host-gateway"
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -167,6 +176,9 @@ jobs:
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
options: "--add-host host.docker.internal:host-gateway"
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/e2e-code-bench-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ jobs:
needs: [detect-ci-container]
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
options: "--add-host host.docker.internal:host-gateway"
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -85,6 +88,9 @@ jobs:
needs: [detect-ci-container]
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
options: "--add-host host.docker.internal:host-gateway"
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/e2e-max-dim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
options: "--add-host host.docker.internal:host-gateway"
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/e2e-profiling.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
timeout-minutes: 60
container:
image: ghcr.io/vdaas/vald/vald-ci-container:${{ needs.detect-ci-container.outputs.TAG }}
credentials:
username: ${{ secrets.PACKAGE_USER }}
password: ${{ secrets.PACKAGE_TOKEN }}
options: "--add-host host.docker.internal:host-gateway"
steps:
- uses: actions/checkout@v4
Expand Down
Loading
Loading