Project

Profile

Help

Issue #8002

List content fields= - first field named not returned

Added by ggainey 4 months ago. Updated 2 months 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"
        }
    ]
}

Associated revisions

Revision 85eb9317 View on GitHub
Added by ipanova@redhat.com 4 months ago

Fixed package serialization so it displays content checksums.

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

[notest] [nocoverage]

History

#1 Updated by fao89 4 months ago

  • Triaged changed from No to Yes

#2 Updated by dalley 4 months 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.

#3 Updated by dalley 4 months ago

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

#5 Updated by ipanova@redhat.com 4 months ago

  • Sprint set to Sprint 87

#6 Updated by ipanova@redhat.com 4 months ago

  • Status changed from POST to MODIFIED

#7 Updated by dalley 2 months ago

  • Sprint/Milestone set to 3.9.0

#8 Updated by pulpbot 2 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF