Skip to content

fix: allow AsyncMilvusClient.list_aliases to list all aliases - #3922

Closed
yuee3 wants to merge 1 commit into
milvus-io:masterfrom
yuee3:fix/async-list-aliases-no-collection
Closed

yuee3 wants to merge 1 commit into
milvus-io:masterfrom
yuee3:fix/async-list-aliases-no-collection

Conversation

@yuee3

@yuee3 yuee3 commented Nov 5, 2026

Copy link
Copy Markdown

Fixes #3865

Summary

AsyncMilvusClient.list_aliases() lists every alias by calling AsyncGrpcHandler.list_aliases() with an empty collection name. The async handler unconditionally ran check_pass_param(collection_name=""), which rejects the empty name with ParamError, so the "all aliases" path of the async client could never succeed. The handler also dropped db_name, unlike the synchronous handler.

Fix

  • Only validate collection_name when it is non-empty.
  • Forward db_name to Prepare.list_aliases_request, matching GrpcHandler.list_aliases.

Test

Added test_list_aliases_without_collection_name to tests/unit/async_grpc_handler/test_async_index.py. It fails on master with ParamError and now verifies that db_name reaches the request. pytest tests/unit/async_grpc_handler/test_async_index.py -> 21 passed; black/ruff clean.

@sre-ci-robot
sre-ci-robot requested review from czs007 and tedxu November 5, 2026 02:47
@sre-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: yuee3
To complete the pull request process, please assign longjiquan after the PR has been reviewed.
You can assign the PR to them by writing /assign @longjiquan in a comment when ready.

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

@yuee3
yuee3 force-pushed the fix/async-list-aliases-no-collection branch from 49e6712 to 50394de Compare November 5, 2026 02:48
@mergify mergify Bot added the dco-passed label Nov 5, 2026
@mergify

mergify Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@yuee3

yuee3 commented Nov 5, 2026

Copy link
Copy Markdown
Author

Closing as a duplicate of #3866, which already addresses this issue. Sorry for the noise.

@yuee3 yuee3 closed this Nov 5, 2026
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.

[Bug]: AsyncMilvusClient.list_aliases() without a collection name raises ParamError

2 participants