Actions
Issue #9425
closedTaskGroupResponse name conflict
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
Updated by daviddavis about 3 years ago
- Blocks Task #9382: Update import code to return a task group added
Updated by daviddavis about 3 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
Updated by daviddavis about 3 years ago
- Related to Issue #9426: Update TaskGroupResponse name added
Updated by pulpbot about 3 years ago
- Status changed from ASSIGNED to POST
Added by daviddavis about 3 years ago
Updated by daviddavis about 3 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|99b06a43aee0750923357c49b348396e163a75c4.
Updated by pulpbot about 3 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
Rename TaskGroupResponse to TaskGroupOperationResponse
fixes #9425
Required PR: https://github.com/pulp/pulp_file/pull/581