Project

Profile

Help

Issue #9425

closed

TaskGroupResponse name conflict

Added by daviddavis over 2 years ago. Updated over 2 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
Actions #1

Updated by daviddavis over 2 years ago

  • Blocks Task #9382: Update import code to return a task group added
Actions #2

Updated by daviddavis over 2 years ago

  • Description updated (diff)
Actions #3

Updated by daviddavis over 2 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis
Actions #4

Updated by daviddavis over 2 years ago

  • Related to Issue #9426: Update TaskGroupResponse name added
Actions #5

Updated by pulpbot over 2 years ago

  • Status changed from ASSIGNED to POST
Actions #6

Updated by daviddavis over 2 years ago

  • Sprint set to Sprint 105

Added by daviddavis over 2 years ago

Revision 99b06a43 | View on GitHub

Rename TaskGroupResponse to TaskGroupOperationResponse

fixes #9425

Required PR: https://github.com/pulp/pulp_file/pull/581

Actions #7

Updated by daviddavis over 2 years ago

  • Status changed from POST to MODIFIED
Actions #8

Updated by pulpbot over 2 years ago

  • Sprint/Milestone set to 3.16.0
Actions #9

Updated by pulpbot over 2 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF