Project

Profile

Help

Issue #3103

Missing representation of spawned_tasks in response

Added by kersom almost 2 years ago. Updated 6 months ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 27

Description

TaskViewSet to have spawned_tasks representation even if it is an empty list.

Current response:

"results": [{
  "_href": "http://pulp3.dev:8000/api/v3/tasks/e99435f5-0ba4-4ccf-bb66-60a1bd120ae1/",
  "group": null,
  "state": "completed",
  "started_at": "2017-10-20T18:37:47.630237Z",
  "finished_at": "2017-10-20T18:37:47.684939Z",
  "non_fatal_errors": [],
  "error": null,
  "worker": "http://pulp3.dev:8000/api/v3/workers/reserved_resource_worker_2@pulp3.dev/",
  "parent": null,
  "tags": [],
  "progress_reports": []
}]

Code on github.

 parent = models.ForeignKey("Task", null=True, related_name="spawned_tasks")

Link to code.

https://github.com/bmbouter/pulp/blob/e5986173d1617fcadb520c84b78691982cce2218/platform/pulpcore/app/models/task.py#L163

Associated revisions

Revision 270a8f74 View on GitHub
Added by dalley almost 2 years ago

Added 'spawned_tasks' field to task detail view

closes #3103
https://pulp.plan.io/issues/3103

Revision 270a8f74 View on GitHub
Added by dalley almost 2 years ago

Added 'spawned_tasks' field to task detail view

closes #3103
https://pulp.plan.io/issues/3103

Revision 270a8f74 View on GitHub
Added by dalley almost 2 years ago

Added 'spawned_tasks' field to task detail view

closes #3103
https://pulp.plan.io/issues/3103

History

#1 Updated by kersom almost 2 years ago

  • Description updated (diff)

#2 Updated by bmbouter almost 2 years ago

+1 to accepting and adding this to the sprint. This was intended to work which is why we added the related_name specification on the foreign key to start with.

The use case is: as a user, when listing a task, a link to any spawned tasks are included.

#3 Updated by dalley almost 2 years ago

  • Sprint/Milestone set to 46
  • Triaged changed from No to Yes

#4 Updated by dalley almost 2 years ago

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

#5 Updated by dalley almost 2 years ago

  • Status changed from ASSIGNED to POST

#6 Updated by dalley almost 2 years ago

  • Status changed from POST to MODIFIED

#7 Updated by bmbouter over 1 year ago

  • Sprint set to Sprint 27

#8 Updated by bmbouter over 1 year ago

  • Sprint/Milestone deleted (46)

#9 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#10 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF