Skip to content

test: [cp2.6] update default_nb from 2000 to 3000 across all test modules#48876

Merged
sre-ci-robot merged 8 commits intomilvus-io:2.6from
zhuwenxing:cp_48787_to_2.6
Apr 16, 2026
Merged

test: [cp2.6] update default_nb from 2000 to 3000 across all test modules#48876
sre-ci-robot merged 8 commits intomilvus-io:2.6from
zhuwenxing:cp_48787_to_2.6

Conversation

@zhuwenxing
Copy link
Copy Markdown
Contributor

@zhuwenxing zhuwenxing commented Apr 9, 2026

Summary

Cherry-pick of #48787 to 2.6 branch.

  • Update default_nb from 2000 to 3000 across Python client, RESTful v2, and index test modules
  • Index creation requires > 2048 rows, so the previous default of 2000 was insufficient
  • Replace hardcoded nb=2000/nb=100/nb=200/nb=3000 with ct.default_nb/default_nb references for better maintainability
  • Fix hardcoded error message assertion in upsert test to use dynamic default_nb values

Changes

Module Change
python_client/common/common_type.py default_nb = 20003000
python_client/testcases/indexes/* 5 files: local default_nb = 2000ct.default_nb
python_client/milvus_client/* 6 files: hardcoded nb=2000ct.default_nb
python_client/milvus_client_v2/* 4 files: hardcoded nb=2000ct.default_nb
python_client/testcases/* 2 files: hardcoded nb=2000ct.default_nb
restful_client_v2/utils/constant.py Added default_nb = 3000
restful_client_v2/base/testbase.py init_collection default nb=100nb=3000
restful_client_v2/utils/utils.py get_data_by_payload default nb=100nb=3000
restful_client_v2/testcases/* 5 files: hardcoded nb=100/nb=200default_nb

Cherry-pick differences from master

The following changes from #48787 were not applied because the corresponding code does not exist on the 2.6 branch:

File Reason
testcases/indexes/test_hnsw_pq.py File does not exist on 2.6
testcases/indexes/test_hnsw_prq.py File does not exist on 2.6
testcases/test_large_topk.py File does not exist on 2.6
milvus_client/test_milvus_client_alter.py default_warmup_nb variable does not exist on 2.6
milvus_client_v2/test_milvus_client_search_string.py No nb=2000 code path on 2.6

Additional 2.6-specific fixes not in the original PR:

  • test_milvus_client_upsert.py: Fixed hardcoded error message "previous length is 2000" → dynamic default_nb value

pr: #48787

…lvus-io#48787)

- Update `default_nb` from 2000 to 3000 across Python client, RESTful
v2, and index test modules
- Index creation requires > 2048 rows, so the previous default of 2000
was insufficient
- Replace hardcoded `nb=2000` with `ct.default_nb` references for better
maintainability
- Add `default_nb` constant to RESTful v2 and replace hardcoded
`nb=100`/`nb=200` with `nb=3000`

| Module | Change |
|--------|--------|
| `python_client/common/common_type.py` | `default_nb = 2000` → `3000` |
| `python_client/testcases/indexes/*` | 7 files: local `default_nb =
2000` → `ct.default_nb` |
| `python_client/milvus_client/*` | 5 files: hardcoded `nb=2000` →
`ct.default_nb` |
| `python_client/milvus_client_v2/*` | 6 files: hardcoded `nb=2000` →
`ct.default_nb` |
| `python_client/testcases/*` | 3 files: hardcoded `nb=2000` →
`ct.default_nb` |
| `restful_client_v2/utils/constant.py` | Added `default_nb = 3000` |
| `restful_client_v2/base/testbase.py` | `init_collection` default
`nb=100` → `nb=3000` |
| `restful_client_v2/utils/utils.py` | `get_data_by_payload` default
`nb=100` → `nb=3000` |
| `restful_client_v2/testcases/*` | 4 files: hardcoded `nb=100`/`nb=200`
→ `nb=3000` |

issue: milvus-io#42446

---------

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit 0a689a7)
@sre-ci-robot sre-ci-robot added the size/L Denotes a PR that changes 100-499 lines. label Apr 9, 2026
@mergify mergify Bot added dco-passed DCO check passed. kind/test labels Apr 9, 2026
@sre-ci-robot sre-ci-robot added the do-not-merge/need-milestone generate by v2-label-manager label Apr 9, 2026
@sre-ci-robot
Copy link
Copy Markdown
Contributor

[INFO] PR Label Summary by Default
[SUCCESS] PR #48787 merged to master

[WARNING] Milestone not set

You can set milestone by commenting:
/set-milestone
Example:
/set-milestone 2.5.0

Use /refresh-label to update related check and label manually

@sre-ci-robot
Copy link
Copy Markdown
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-build-all // for ci-v2/build-all (multi-arch builds)
  • /ci-rerun-buildenv // for ci-v2/build-env (build milvus-env builder images)
  • /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-default // for ci-v2/e2e-default
  • /ci-rerun-e2e-amd // for ci-v2/e2e-amd (e2e pool dispatcher)
  • /ci-rerun-build-ut-cov // for ci-v2/build-ut-cov (build + unit tests in one pipeline)
  • /ci-rerun-gosdk // for ci-v2/go-sdk (Go SDK E2E tests, ARM)

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

@zhuwenxing zhuwenxing added this to the 2.6.15 milestone Apr 9, 2026
@sre-ci-robot
Copy link
Copy Markdown
Contributor

✅ CI Loop Results dc286c3

Stage Result Duration Tests
✅ Build SUCCESS 4.3min -

Total: 8min | Pipeline | Artifacts

zhuwenxing and others added 4 commits April 10, 2026 16:47
…lient_v2 testcases

Replace all remaining hardcoded nb=3000 values with constant.default_nb
references in RESTful v2 test files for better maintainability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
Change `from utils import constant` to `from utils.constant import default_nb`
for cleaner variable references (default_nb instead of constant.default_nb).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
TEI embedding tests insert text data that requires embedding service
calls per row. Using default_nb=3000 exceeds single request limits.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
- test_add_field_feature: replace hardcoded query_pks and boundary
  check with computed values based on ct.default_nb
- test_milvus_client_json_path_index: use default_nb in error message
- test_milvus_client_partial_update: use default_nb in error message

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
@sre-ci-robot sre-ci-robot added size/XXL Denotes a PR that changes 1000+ lines. and removed size/L Denotes a PR that changes 100-499 lines. do-not-merge/need-milestone generate by v2-label-manager labels Apr 10, 2026
@sre-ci-robot
Copy link
Copy Markdown
Contributor

[INFO] PR Label Summary by Default
[SUCCESS] PR #48787 merged to master

Use /refresh-label to update related check and label manually

@sre-ci-robot
Copy link
Copy Markdown
Contributor

✅ CI Loop Results 884aafd

Stage Result Duration Tests
✅ Build SUCCESS 4.2min -

Total: 8min | Pipeline | Artifacts

@sre-ci-robot sre-ci-robot added size/XL Denotes a PR that changes 500-999 lines. and removed size/XXL Denotes a PR that changes 1000+ lines. labels Apr 13, 2026
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Apr 13, 2026

@zhuwenxing Thanks for your contribution. Please submit with DCO, see the contributing guide https://github.com/milvus-io/milvus/blob/master/CONTRIBUTING.md#developer-certificate-of-origin-dco.

@sre-ci-robot
Copy link
Copy Markdown
Contributor

[INFO] PR Label Summary by Default
[SUCCESS] PR #48787 merged to master

Use /refresh-label to update related check and label manually

@mergify mergify Bot added needs-dco DCO is missing in this pull request. and removed dco-passed DCO check passed. labels Apr 13, 2026
This reverts commit 884aafd.

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
@mergify mergify Bot added dco-passed DCO check passed. and removed needs-dco DCO is missing in this pull request. labels Apr 13, 2026
@sre-ci-robot
Copy link
Copy Markdown
Contributor

[INFO] PR Label Summary by Default
[SUCCESS] PR #48787 merged to master

Use /refresh-label to update related check and label manually

- Replace hardcoded nb=2000 with ct.default_nb in search_invalid and sparse_search tests
- Fix hardcoded error message in upsert test to use dynamic default_nb values
- Remove TestSearchByPK and TestSearchByPKNegative classes that don't exist on 2.6

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
@sre-ci-robot sre-ci-robot added size/L Denotes a PR that changes 100-499 lines. and removed size/XL Denotes a PR that changes 500-999 lines. labels Apr 14, 2026
@sre-ci-robot
Copy link
Copy Markdown
Contributor

[INFO] PR Label Summary by Default
[SUCCESS] PR #48787 merged to master

Use /refresh-label to update related check and label manually

@mergify mergify Bot added the ci-passed label Apr 14, 2026
@zhuwenxing
Copy link
Copy Markdown
Contributor Author

/ci-rerun-gosdk

2 similar comments
@zhuwenxing
Copy link
Copy Markdown
Contributor Author

/ci-rerun-gosdk

@zhuwenxing
Copy link
Copy Markdown
Contributor Author

/ci-rerun-gosdk

… nil pointer panic

When NewMilvusClient fails in teardown(), mc is nil but code continues
to call mc.Close() and mc.ListDatabase(), causing nil pointer dereference
panic that masks actual test results (e.g. 591 tests PASS but CI reports FAIL).

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
@sre-ci-robot
Copy link
Copy Markdown
Contributor

[INFO] PR Label Summary by Default
[SUCCESS] PR #48787 merged to master

Use /refresh-label to update related check and label manually

@yanliang567 yanliang567 added ci-passed manual-pass manually set pass before ci-passed labeled labels Apr 16, 2026
@yanliang567
Copy link
Copy Markdown
Contributor

/lgtm
/approve

@sre-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: yanliang567, zhuwenxing

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

The pull request process is described 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

@sre-ci-robot
Copy link
Copy Markdown
Contributor

[INFO] PR Label Summary by Default
[SUCCESS] PR #48787 merged to master

Use /refresh-label to update related check and label manually

@sre-ci-robot sre-ci-robot merged commit 8547677 into milvus-io:2.6 Apr 16, 2026
9 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved area/test ci-passed dco-passed DCO check passed. kind/test lgtm manual-pass manually set pass before ci-passed labeled 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