Project

Profile

Help

Issue #9425

TaskGroupResponse name conflict

Added by daviddavis about 1 month ago. Updated 22 days 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 - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Blocks Pulp - Task #9382: Update import code to return a task groupCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 99b06a43 View on GitHub
Added by daviddavis about 1 month ago

Rename TaskGroupResponse to TaskGroupOperationResponse

fixes #9425

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

History

#1 Updated by daviddavis about 1 month ago

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

#2 Updated by daviddavis about 1 month ago

  • Description updated (diff)

#3 Updated by daviddavis about 1 month ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to daviddavis

#4 Updated by daviddavis about 1 month ago

  • Related to Issue #9426: Update TaskGroupResponse name added

#5 Updated by pulpbot about 1 month ago

  • Status changed from ASSIGNED to POST

#6 Updated by daviddavis about 1 month ago

  • Sprint set to Sprint 105

#7 Updated by daviddavis about 1 month ago

  • Status changed from POST to MODIFIED

#8 Updated by pulpbot 22 days ago

  • Sprint/Milestone set to 3.16.0

#9 Updated by pulpbot 22 days ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF