Skip to content

[Bug]: .query taking keyword args is very risky #42579

Open
@dickreuter

Description

@dickreuter

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version: 2.5

Current Behavior

async def query(
self,
collection_name: str,
filter: str = "",
output_fields: Optional[List[str]] = None,
timeout: Optional[float] = None,
ids: Optional[Union[List, str, int]] = None,
partition_names: Optional[List[str]] = None,
**kwargs,
) -> List[dict]:

Taking kwargs is very risk in this context. If a parameter is misspelt (for example partition_name instead of partition_names, then no filtering will be performed. This seems like a plan for a desaster (as it happened to us).

Expected Behavior

No response

Steps To Reproduce

Milvus Log

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

kind/bugIssues or changes related a bugtriage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions