Actions
Issue #1776
closedsync_complete response has changed
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Master
Platform Release:
2.8.1
OS:
CentOS 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:
Description
What we are seeing from
/api/v2/repositories/sync_complete
has changed
{"_json"=>
"{\"call_report\": {\"exception\": null, \"task_type\": \"pulp.server.managers.repo.sync.sync\", \"_href\": \"/pulp/api/v2/tasks/896bffdc-9ad3-479a-9362-2df7ace4b461/\", \"task_id\": \"896bffdc-9ad3-479a-9362-2df7ace4b461\", \"tags\": [\"pulp:repository:default_organization-prod1-dock4\", \"pulp:action:sync\"], \"finish_time\": null, \"_ns\": \"task_status\", \"start_time\": \"2016-03-15T17:23:59Z\", \"traceback\": null, \"spawned_tasks\": [], \"progress_report\": {\"docker_importer\": [{\"num_success\": 27, \"description\": \"Downloading manifests\", \"step_type\": \"sync_step_metadata\", \"items_total\": 27, \"state\": \"FINISHED\", \"error_details\": [], \"details\": \"\", \"num_failures\": 0, \"step_id\": \"8f9809dc-08d0-4834-9740-24087b14850d\", \"num_processed\": 27}, {\"num_success\": 1, \"description\": \"Copying units already in pulp\", \"step_type\": \"get_local\", \"items_total\": 1, \"state\": \"FINISHED\", \"error_details\": [], \"details\": \"\", \"num_failures\": 0, \"step_id\": \"60337e8a-cad8-4723-9962-13ab811358dd\", \"num_processed\": 1}, {\"num_success\": 1, \"description\": \"Copying units already in pulp\", \"step_type\": \"get_local\", \"items_total\": 1, \"state\": \"FINISHED\", \"error_details\": [], \"details\": \"\", \"num_failures\": 0, \"step_id\": \"780b581f-8d72-4a22-9081-ebc8c8257c5a\", \"num_processed\": 1}, {\"num_success\": 0, \"description\": \"Downloading remote files\", \"step_type\": \"sync_step_download\", \"items_total\": 0, \"state\": \"FINISHED\", \"error_details\": [], \"details\": \"\", \"num_failures\": 0, \"step_id\": \"712f435f-d790-474c-b687-a7ace22edc7a\", \"num_processed\": 0}, {\"num_success\": 0, \"description\": \"Saving Manifests and Blobs\", \"step_type\": \"sync_step_save\", \"items_total\": 1, \"state\": \"FINISHED\", \"error_details\": [], \"details\": \"\", \"num_failures\": 0, \"step_id\": \"f2159d0e-b8fd-4775-b8c3-f11af7021c0a\", \"num_processed\": 0}, {\"num_success\": 27, \"description\": \"Saving Tags\", \"step_type\": \"sync_step_save\", \"items_total\": 27, \"state\": \"FINISHED\", \"error_details\": [], \"details\": \"\", \"num_failures\": 0, \"step_id\": \"78efa9ba-686c-465f-b468-0a7f0a17d78f\", \"num_processed\": 27}]}, \"state\": \"running\", \"worker_name\": \"reserved_resource_worker-1@lentils.example.com\", \"result\": null, \"error\": null, \"_id\": {\"$oid\": \"56e8452f3419ed6a691a582a\"}, \"id\": \"56e8452f3419ed6a691a582a\"}, \"event_type\": \"repo.sync.finish\", \"payload\": {\"importer_id\": \"docker_importer\", \"exception\": null, \"repo_id\": \"default_organization-prod1-dock4\", \"traceback\": null, \"started\": \"2016-03-15T17:23:59Z\", \"_ns\": \"repo_sync_results\", \"completed\": \"2016-03-15T17:24:07Z\", \"importer_type_id\": \"docker_importer\", \"error_message\": null, \"summary\": {\"sync_step_metadata\": \"FINISHED\", \"sync_step_save\": \"FINISHED\", \"get_local\": \"FINISHED\", \"sync_step_download\": \"FINISHED\"}, \"added_count\": 0, \"result\": \"success\", \"updated_count\": 65, \"details\": [{\"num_processed\": 27, \"items_total\": 27, \"state\": \"FINISHED\", \"num_success\": 27, \"error_details\": [], \"description\": \"Downloading manifests\", \"num_failures\": 0, \"step_id\": \"8f9809dc-08d0-4834-9740-24087b14850d\", \"step_type\": \"sync_step_metadata\", \"details\": \"\"}, {\"num_processed\": 1, \"items_total\": 1, \"state\": \"FINISHED\", \"num_success\": 1, \"error_details\": [], \"description\": \"Copying units already in pulp\", \"num_failures\": 0, \"step_id\": \"60337e8a-cad8-4723-9962-13ab811358dd\", \"step_type\": \"get_local\", \"details\": \"\"}, {\"num_processed\": 1, \"items_total\": 1, \"state\": \"FINISHED\", \"num_success\": 1, \"error_details\": [], \"description\": \"Copying units already in pulp\", \"num_failures\": 0, \"step_id\": \"780b581f-8d72-4a22-9081-ebc8c8257c5a\", \"step_type\": \"get_local\", \"details\": \"\"}, {\"num_processed\": 0, \"items_total\": 0, \"state\": \"FINISHED\", \"num_success\": 0, \"error_details\": [], \"description\": \"Downloading remote files\", \"num_failures\": 0, \"step_id\": \"712f435f-d790-474c-b687-a7ace22edc7a\", \"step_type\": \"sync_step_download\", \"details\": \"\"}, {\"num_processed\": 0, \"items_total\": 1, \"state\": \"FINISHED\", \"num_success\": 0, \"error_details\": [], \"description\": \"Saving Manifests and Blobs\", \"num_failures\": 0, \"step_id\": \"f2159d0e-b8fd-4775-b8c3-f11af7021c0a\", \"step_type\": \"sync_step_save\", \"details\": \"\"}, {\"num_processed\": 27, \"items_total\": 27, \"state\": \"FINISHED\", \"num_success\": 27, \"error_details\": [], \"description\": \"Saving Tags\", \"num_failures\": 0, \"step_id\": \"78efa9ba-686c-465f-b468-0a7f0a17d78f\", \"step_type\": \"sync_step_save\", \"details\": \"\"}], \"id\": \"56e84537192f6336912bef03\", \"removed_count\": 0}}",
"token"=>"test",
"api_version"=>"v2",
"action"=>"sync_complete",
"controller"=>"katello/api/v2/repositories",
"repository"=>{}}
It looks like some of the fields were moved to the _json key
Actions
Don't have requests re-serialize the http event data.
We make use of the BSON serializer, so we can't let requests do the serializing for us. Therefore we need to use the
data
kwarg rather than thejson
kwarg and just set the content type ourselves.closes #1776