Bug 698344

Summary: sync status error details returns array of array of hashes
Product: [Retired] Pulp Reporter: Shannon Hughes <shughes>
Component: z_otherAssignee: John Matthews <jmatthew>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedKeywords: Triaged
Target Milestone: ---   
Target Release: Sprint 23   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 12:10:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 647488    

Description Shannon Hughes 2011-04-20 17:19:18 UTC
Description of problem:

suggestion was to change the error_details (sync status api calls) to a array of hashes per our discussion:

13:12 <shughes> think its an array of arrays with the inner array having a hash
13:12 <jmatthews> I think you are right, just not sure why I did array of 
                  arrays, it might just be a mistake and I can simplify so it's 
                  an array of hashes
13:13 <shughes> yeah, that makes more sense i think
13:13 <jmatthews> [{}. {}] is closer to what I think it should be
13:13 <jmatthews> where each inner {} represents a single error



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 John Matthews 2011-04-27 17:07:09 UTC
Pulp commit:
http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=8ce84505bb3ce98d43ed59399a30f957cb4ffcf9

Grinder commit:
http://git.fedorahosted.org/git/?p=grinder.git;a=commitdiff;h=a9ceea0698a896c283cb7d711b8be61d73a631b4

QE:
Prior to change we were returning a json object of [[item_info][error_info]] for each entry.  The change made was to essentially add these 2 objects together 'item_info' and 'error_info' and return a single object per error.

Comment 2 Jay Dobies 2011-04-27 20:11:35 UTC
Fixed in Pulp 0.172, grinder 0.96.

Comment 3 Preethi Thomas 2011-04-29 17:59:56 UTC
verified

[root@preethi 752]# rpm -q pulp
pulp-0.0.172-1.fc14.noarch


[root@preethi 752]#  curl -k -u admin:admin https://localhost/pulp/api/repositories/bad-repo/sync/2b36f5f0-7286-11e0-ae54-002564a85a58/ |json_reformat  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2629    0  2629    0     0  15885      0 --:--:-- --:--:-- --:--:-- 16030
{
  "scheduled_time": null,
  "exception": null,
  "status_path": "/pulp/api/repositories/bad-repo/sync/2b36f5f0-7286-11e0-ae54-002564a85a58/",
  "finish_time": "1304098142",
  "start_time": "1304098139",
  "traceback": null,
  "method_name": "_sync",
  "state": "finished",
  "result": true,
  "progress": {
    "status": "FINISHED",
    "num_success": 0,
    "size_total": 6791,
    "num_download": 0,
    "item_name": null,
    "items_left": 0,
    "items_total": 3,
    "step": "Finished",
    "size_left": 0,
    "details": {
      "rpm": {
        "num_success": 0,
        "total_count": 3,
        "items_left": 0,
        "size_left": 0,
        "total_size_bytes": 6791,
        "num_error": 3
      }
    },
    "error_details": [
      {
        "traceback": "",
        "checksumtype": "sha256",
        "checksum": "435d92e6c09248b501b8d2ae786f92ccfad69fab8b1bc774e2b66ff6c0d83979",
        "error_type": "error",
        "fileName": "pulp-dot-2.0-test-0.1.2-1.fc11.x86_64.rpm",
        "downloadurl": "http://jmatthews.fedorapeople.org/repo_with_bad_read_perms//pulp-dot-2.0-test-0.1.2-1.fc11.x86_64.rpm",
        "item_type": "rpm",
        "savepath": "/var/lib/pulp//repos/repo_with_bad_read_perms//",
        "error": "HTTP status code of 403 received for http://jmatthews.fedorapeople.org/repo_with_bad_read_perms//pulp-dot-2.0-test-0.1.2-1.fc11.x86_64.rpm",
        "pkgpath": "/var/lib/pulp//packages/pulp-dot-2.0-test/0.1.2/1.fc11/x86_64/435",
        "size": 2359
      },
      {
        "traceback": "",
        "checksumtype": "sha256",
        "checksum": "6bce3f26e1fc0fc52ac996f39c0d0e14fc26fb8077081d5b4dbfb6431b08aa9f",
        "error_type": "error",
        "fileName": "pulp-test-package-0.3.1-1.fc11.x86_64.rpm",
        "downloadurl": "http://jmatthews.fedorapeople.org/repo_with_bad_read_perms//pulp-test-package-0.3.1-1.fc11.x86_64.rpm",
        "item_type": "rpm",
        "savepath": "/var/lib/pulp//repos/repo_with_bad_read_perms//",
        "error": "HTTP status code of 403 received for http://jmatthews.fedorapeople.org/repo_with_bad_read_perms//pulp-test-package-0.3.1-1.fc11.x86_64.rpm",
        "pkgpath": "/var/lib/pulp//packages/pulp-test-package/0.3.1/1.fc11/x86_64/6bc",
        "size": 2216
      },
      {
        "traceback": "",
        "checksumtype": "sha256",
        "checksum": "4dbde07b4a8eab57e42ed0c9203083f1d61e0b13935d1a569193ed8efc9ecfd7",
        "error_type": "error",
        "fileName": "pulp-test-package-0.2.1-1.fc11.x86_64.rpm",
        "downloadurl": "http://jmatthews.fedorapeople.org/repo_with_bad_read_perms//pulp-test-package-0.2.1-1.fc11.x86_64.rpm",
        "item_type": "rpm",
        "savepath": "/var/lib/pulp//repos/repo_with_bad_read_perms//",
        "error": "HTTP status code of 403 received for http://jmatthews.fedorapeople.org/repo_with_bad_read_perms//pulp-test-package-0.2.1-1.fc11.x86_64.rpm",
        "pkgpath": "/var/lib/pulp//packages/pulp-test-package/0.2.1/1.fc11/x86_64/4db",
        "size": 2216
      }
    ],
    "num_error": 3
  },
  "id": "2b36f5f0-7286-11e0-ae54-002564a85a58"

Comment 4 Preethi Thomas 2011-08-16 12:10:09 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 5 Preethi Thomas 2011-08-16 12:22:16 UTC
Closing with Community Release 15

pulp-0.0.223-4.