Skip to content

Inconsistent handling of nullable value for group_name in service creation API #4417

Closed
@rapsealk

Description

@rapsealk

Summary

The Client SDK permits None for the group_name parameter during service creation (POST /services). However, the API handler in the backend manager expects a non-null string, resulting in a validation error when None is passed.

Refs

Steps to Reproduce

Expected Behavior

Actual Behavior

Logs/Errors  

ERROR 2025-05-18 21:36:48,156 models 20740 281472313078144 Failed to run task instance serving-task (844b1928-18b6-475b-9107-6f41a49ceb9e):
    BackendAPIError(
        400,
        'Bad Request',
        {
            'type': 'https://api.backend.ai/probs/invalid-api-params',
            'title': 'Missing or invalid API parameters.',
            'error_code': 'api_generic_invalid-parameters',
            'msg': "Input should be a valid string [type=string_type, input=None, loc='group']", 'data': [{'type': 'string_type', 'loc': ['group'], 'msg': 'Input should be a valid string', 'input': None, 'url': 'https://errors.pydantic.dev/2.11/v/string_type'},

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions