Project

Profile

Help

Story #1936

closed

As user, I can get unit_id from task_result of import action

Added by jluza almost 8 years ago. Updated almost 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

So far, Pulp doesn't return unit_id in import task result, so there's no way how to identify what will be unit_id for imported content. I consider this as quite serious automation problem.

Actions #1

Updated by bmbouter almost 8 years ago

To me, this sounds like a feature request since the task_result doesn't yet include the unit_id of the import. If you agree, let me know and we'll switch it to a Story.

wget https://repos.fedorapeople.org/repos/pulp/pulp/fixtures/rpm/mouse-0.1.12-1.noarch.rpm
pulp-admin rpm repo create --repo-id uploadtest
pulp-admin -vv rpm repo uploads rpm --file ./mouse-0.1.12-1.noarch.rpm --repo-id uploadtest

This command causes several API calls to occur. First the upload request is created with the following request URL and response body.

POST   /pulp/api/v2/content/uploads/

{
  "upload_id": "0ac8e9f3-807d-4576-b9ab-b4ab080dd448",
  "_href": "/pulp/api/v2/content/uploads/0ac8e9f3-807d-4576-b9ab-b4ab080dd448/"
}   

Then it uploads the data to the created upload request with the following request URL:

PUT /pulp/api/v2/content/uploads/0ac8e9f3-807d-4576-b9ab-b4ab080dd448/0/

It then causes the import to occur which spawns an asynchronous task so the request URL and response body are:

POST /pulp/api/v2/repositories/uploadtest/actions/import_upload/

{
  "spawned_tasks": [
    {
      "_href": "/pulp/api/v2/tasks/b8383aaf-22ee-4382-8ed8-83626405509d/",
      "task_id": "b8383aaf-22ee-4382-8ed8-83626405509d"
    }
  ],
  "result": null,
  "error": null  
}

Finally the task results of the import task are shown with this request URL and response body:

GET /pulp/api/v2/tasks/b8383aaf-22ee-4382-8ed8-83626405509d/

{
    "exception": null,
    "task_type": "pulp.server.managers.content.upload.import_uploaded_unit",
    "_href": "/pulp/api/v2/tasks/b8383aaf-22ee-4382-8ed8-83626405509d/",
    "task_id": "b8383aaf-22ee-4382-8ed8-83626405509d",
    "tags": [
        "pulp:repository:uploadtest",
        "pulp:action:import_upload"
    ],
    "finish_time": "2016-05-25T15:28:36Z",
    "_ns": "task_status",
    "start_time": "2016-05-25T15:28:36Z",
    "traceback": null,
    "spawned_tasks": [],
    "progress_report": {},
    "queue": "reserved_resource_worker-0@dev.dq",
    "state": "finished",
    "worker_name": "reserved_resource_worker-0@dev",
    "result": {
        "details": {},
        "success_flag": true,
        "summary": ""
    },
    "error": null,
    "_id": {
        "$oid": "5745c4a4c473cd1cfa75392a"
    },
    "id": "5745c4a4c473cd1cfa75392a"
}

Can you be more specific about which request should contain the unit_id?

Actions #2

Updated by bmbouter almost 8 years ago

  • Tracker changed from Issue to Story
  • Subject changed from as user, I can get unit_id from task_result of import action to As user, I can get unit_id from task_result of import action

At triage this was decided to convert it to a Story.

Actions #3

Updated by jluza almost 8 years ago

I think only import action is missing unit_id and also makes sense.

Actions #4

Updated by bmbouter almost 7 years ago

  • Tags RCM added
Actions #5

Updated by bmbouter about 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #6

Updated by bmbouter about 5 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #7

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added
Actions #8

Updated by bmbouter almost 5 years ago

  • Tags deleted (RCM)

Also available in: Atom PDF