Skip to content

Conversation

@jiamingli-maker
Copy link
Contributor

/kind improvement
/assign @yanliang567

PR Summary
Migrate invalid insert test cases to TestMilvusClientInsertInvalid:

  • test_insert_with_invalid_field_value
  • test_insert_over_resource_limit
  • test_insert_type_mismatch_with_default_value_field
  • test_insert_with_nan_value
  • test_invalid_sparse_vector_data

@sre-ci-robot sre-ci-robot added kind/improvement Changes related to something improve, likes ut and code refactor area/test sig/testing size/L Denotes a PR that changes 100-499 lines. labels Jan 15, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @jiamingli-maker, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the test suite by relocating several existing invalid data insertion test cases. The primary goal is to enhance the organization and maintainability of the test codebase by consolidating related invalid input scenarios into a more appropriate test file. This change ensures that tests for incorrect data types, resource limits, and special numeric values are grouped logically, making future test development and debugging more straightforward.

Highlights

  • Test Case Migration: Migrated five invalid insert test cases from test_insert.py to test_milvus_client_insert.py to improve test suite organization.
  • Invalid Field Value Testing: The test_insert_with_invalid_field_value case verifies error messages when inserting data with type mismatches for various scalar fields (int, string, boolean, float).
  • Resource Limit Testing: The test_insert_over_resource_limit case ensures that inserting data exceeding the RPC size limit (64MB) correctly raises an exception.
  • Default Value Field Mismatch: The test_insert_type_mismatch_with_default_value_field case checks for errors when providing incorrect data types for fields that have a default value defined.
  • NaN and Inf Value Handling: The test_insert_with_nan_value case validates that inserting None, NaN, or Inf values into vector fields results in appropriate exceptions.
  • Sparse Vector Data Validation: The test_invalid_sparse_vector_data case confirms that attempting to insert dense vector types into a sparse vector field correctly triggers an error.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sre-ci-robot
Copy link
Contributor

[ci-v2-notice]
Notice: New ci-v2 system is enabled for this PR.

To rerun ci-v2 checks, comment with:

  • /ci-rerun-code-check // for ci-v2/code-check
  • /ci-rerun-build // for ci-v2/build
  • /ci-rerun-ut-integration // for ci-v2/ut-integration, will rerun ci-v2/build
  • /ci-rerun-ut-go // for ci-v2/ut-go, will rerun ci-v2/build
  • /ci-rerun-ut-cpp // for ci-v2/ut-cpp
  • /ci-rerun-ut // for all ci-v2/ut-integration, ci-v2/ut-go, ci-v2/ut-cpp, will rerun ci-v2/build
  • /ci-rerun-e2e-arm // for ci-v2/e2e-arm
  • /ci-rerun-e2e-default // for ci-v2/e2e-default

If you have any questions or requests, please contact @zhikunyao.

@mergify mergify bot added dco-passed DCO check passed. kind/test labels Jan 15, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully migrates several invalid insert test cases to the TestMilvusClientInsertInvalid class. The changes are mostly refactoring of existing tests. I've identified a couple of areas for improvement in the new tests to enhance maintainability and correctness. My feedback includes suggestions for refactoring repetitive code and correcting test data to ensure the tests are focused and accurate.

@mergify mergify bot added the ci-passed label Jan 15, 2026
…_insert_with_invalid_filed_value

Signed-off-by: zilliz <[email protected]>
@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: jiamingli-maker
To complete the pull request process, please ask for approval from yanliang567 after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mergify mergify bot added ci-passed and removed ci-passed labels Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/test ci-passed dco-passed DCO check passed. kind/improvement Changes related to something improve, likes ut and code refactor kind/test sig/testing size/L Denotes a PR that changes 100-499 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants