Project

Profile

Help

Issue #8002

closed

List content fields= - first field named not returned

Added by ggainey about 4 years ago. Updated almost 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 87
Quarter:

Description

If you issue a REST call like this one :

http :/pulp/api/v3/content/file/files/?fields=\['sha1','md5','sha224','sha256','sha384',\]

The return won't include the first field listed in fields. I've tested this for file/files and rpm/rpm.

Full example:

(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 import_export]$ http :/pulp/api/v3/content/file/files/?fields=\['md5','sha256',\]

{
    "count": 3,
    "next": null,
    "previous": null,
    "results": [
        {
            "sha256": "eea228e372fa4c81456aff062985233111791b3a41a62d0052001cdb092241af"
        },
        {
            "sha256": "da70de7648af0cc8c5c6a6b93f2fb446f2d48561d4309d2f49f4c0377536dc34"
        },
        {
            "sha256": "99ba5519fa3afcc5fdc2b01e7fbc32610c8caaf9d3b8a70fb864ac26fef02e69"
        }
    ]
}


(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 import_export]$ http :/pulp/api/v3/content/file/files/?fields=\['sha1','md5','sha256',\]

{
    "count": 3,
    "next": null,
    "previous": null,
    "results": [
        {
            "md5": "184067a11844f4d05148f6f85be72432",
            "sha256": "eea228e372fa4c81456aff062985233111791b3a41a62d0052001cdb092241af"
        },
        {
            "md5": "bd62feeef34ab9072f32f8ee0404d6c9",
            "sha256": "da70de7648af0cc8c5c6a6b93f2fb446f2d48561d4309d2f49f4c0377536dc34"
        },
        {
            "md5": "371ad96c5dbc761d68ade02ae29528fc",
            "sha256": "99ba5519fa3afcc5fdc2b01e7fbc32610c8caaf9d3b8a70fb864ac26fef02e69"
        }
    ]
}

Actions #1

Updated by fao89 about 4 years ago

  • Triaged changed from No to Yes
Actions #2

Updated by dalley about 4 years ago

The issue as described is not an issue, the correct syntax is to use a comma-separated list without square brackets. The value of the parameter is not intended to be json-encoded.

(pulp) [vagrant@pulp2-nightly-pulp3-source-centos7 devel]$ http GET :24817/pulp/api/v3/content/file/files/?fields=md5,sha256
HTTP/1.1 200 OK
Access-Control-Expose-Headers: Correlation-ID
Allow: GET, POST, HEAD, OPTIONS
Connection: close
Content-Length: 132
Content-Type: application/json
Correlation-ID: f36cd8c18124406c90c1ba871f88f16a
Date: Fri, 18 Dec 2020 17:37:12 GMT
Server: gunicorn/20.0.4
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "count": 3,
    "next": null,
    "previous": null,
    "results": [
        {
            "md5": null,
            "sha256": null
        },
        {
            "md5": null,
            "sha256": null
        },
        {
            "md5": null,
            "sha256": null
        }
    ]
}

However, ipanova pointed out that this is broken on the RPM plugin for a different reason. Moving to the RPM tracker.

Actions #3

Updated by dalley about 4 years ago

  • Project changed from Pulp to RPM Support
  • Status changed from NEW to POST
  • Assignee set to ipanova@redhat.com
Actions #5

Updated by ipanova@redhat.com about 4 years ago

  • Sprint set to Sprint 87

Added by ipanova@redhat.com about 4 years ago

Revision 85eb9317 | View on GitHub

Fixed package serialization so it displays content checksums.

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

[notest] [nocoverage]

Actions #6

Updated by ipanova@redhat.com about 4 years ago

  • Status changed from POST to MODIFIED
Actions #7

Updated by dalley almost 4 years ago

  • Sprint/Milestone set to 3.9.0
Actions #8

Updated by pulpbot almost 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF