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

[Bug]: [Nightly] partition name n-name should report error #39432

Open
1 task done
NicoYuan1986 opened this issue Jan 20, 2025 · 1 comment
Open
1 task done

[Bug]: [Nightly] partition name n-name should report error #39432

NicoYuan1986 opened this issue Jan 20, 2025 · 1 comment
Assignees
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@NicoYuan1986
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version: 57ba8a7
- Deployment mode(standalone or cluster):cluster
- MQ type(rocksmq, pulsar or kafka):    kafka
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

partition name n-name should report error.

    @pytest.mark.tags(CaseLabel.L2)
    @pytest.mark.parametrize("partition_name", ct.invalid_resource_names)
    def test_partition_invalid_name(self, partition_name):
        """
        target: verify create a partition with invalid name
        method: create a partition with invalid names
        expected: raise exception
        """
        if partition_name == "12name":
            pytest.skip(reason="won't fix issue #32998")
        # create collection
        collection_w = self.init_collection_wrap()
    
        # create partition
        if partition_name is not None:
            error = {ct.err_code: 999, ct.err_msg: f"Invalid partition name: {partition_name.strip()}"}
        else:
            error = {ct.err_code: 999, ct.err_msg: f"`partition_name` value {partition_name} is illegal"}
>       self.partition_wrap.init_partition(collection_w.collection, partition_name,
                                           check_task=CheckTasks.err_res,
                                           check_items=error)


[2025-01-20 11:04:30 - DEBUG - ci_test]: (api_response) : <Collection>:
-------------
<name>: coll__K0kTnGC0
<description>: 
<schema>: {'auto_id': False, 'description': '', 'fields': [{'name': 'int64', 'description': '', 'type': <DataType.INT64: 5>, 'is_primary': True, 'auto_id': False}, {'name': 'float', 'description': '', 'type': <DataType.FLOAT: 10>}, {......  (api_request.py:27)
[2025-01-20 11:04:30 - DEBUG - ci_test]: (api_request)  : [Partition] args: [<Collection>:
-------------
<name>: coll__K0kTnGC0
<description>: 
<schema>: {'auto_id': False, 'description': '', 'fields': [{'name': 'int64', 'description': '', 'type': <DataType.INT64: 5>, 'is_primary': True, 'auto_id': False}, {'name': 'float', 'description': '', 'type': <DataType.FLOAT: 10>}, ......, kwargs: {} (api_request.py:52)
[2025-01-20 11:04:30 - DEBUG - ci_test]: (api_response) : {"name":"n-ame","collection_name":"coll__K0kTnGC0","description":""}  (api_request.py:27)
 -----------------------------Captured log teardown------------------------------ 

According to the official documentation, https://milvus.io/docs/limitations.md#Naming-rules.
The name of a resource can contain numbers, letters, and underscores (). A resource name must start with a letter or an underscore ().

Obviously, '-' is illegal.

Image

Expected Behavior

report error

Steps To Reproduce

Milvus Log

No response

Anything else?

No response

@NicoYuan1986 NicoYuan1986 added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 20, 2025
@NicoYuan1986 NicoYuan1986 added this to the 2.6.0 milestone Jan 20, 2025
@yanliang567
Copy link
Contributor

/assign @czs007
/unassign

@sre-ci-robot sre-ci-robot assigned czs007 and unassigned yanliang567 Jan 20, 2025
@yanliang567 yanliang567 added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants