Project

Profile

Help

Issue #9425

closed

TaskGroupResponse name conflict

Added by daviddavis about 3 years ago. Updated about 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 105
Quarter:

Description

For the pulp_file ACS refresh endpoint, we started using returning a TaskGroupResponse:

        "{file_file_alternate_content_source_href}refresh/": {
            "post": {
                "description": "Trigger an asynchronous task to create Alternate Content Source content.",
                "operationId": "acs_file_file_refresh",
                "parameters": [
                    {
                        "in": "path",
                        "name": "file_file_alternate_content_source_href",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "202": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaskGroupResponse"
                                }
                            }
                      }
                }

In the schema, this defines TaskGroupResponse as such:

            "TaskGroupResponse": {
                "description": "Serializer for asynchronous operations that return a task group.",
                "properties": {
                    "task_group": {
                        "description": "The href of the task group.",
                        "format": "uri",
                        "type": "string"
                    }
                },
                "required": [
                    "task_group"
                ],
                "type": "object"
            },

For the bindings, this generates a TaskGroupResponse in pulpcore/client/pulp_file/models/task_group_response.py.

The problem comes about when you try to use TaskGroupResponse for a core endpoint. This is because there's already a TaskGroupResponse defined in pulpcore/client/pulpcore/models/task_group_response.py.

It's being used by the task_groups_read endpoint:

        "{task_group_href}": {
            "get": {
                "operationId": "task_groups_read",
                "parameters": [
                    {
                        "in": "path",
                        "name": "task_group_href",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "A list of fields to include in the response.",
                        "in": "query",
                        "name": "fields",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "description": "A list of fields to exclude from the response.",
                        "in": "query",
                        "name": "exclude_fields",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/TaskGroupResponse"
                                }
                            }
                        },
                        "description": ""
                    }
                },
                "summary": "Inspect a task group",
                "tags": [
                    "Task-Groups"
                ]
            }

Related issues

Related to File Support - Issue #9426: Update TaskGroupResponse nameCLOSED - CURRENTRELEASEdaviddavisActions
Blocks Pulp - Task #9382: Update import code to return a task groupCLOSED - CURRENTRELEASEdaviddavis

Actions

Also available in: Atom PDF