Issue #2871
closedOld references to checksum_type need to be updated to checksumtype
Description
API documentation [0] refer to the field
"unit_metadata": {"checksum_type": null}
For use in uploading to a repository, but use of this in an API call to upload a drpm results in the error:
"{'errors': ["unexpected error occurred importing uploaded file: The field 'checksum_type' does not exist on the document 'DRPM'"]}"
An old reference to 'checksum_type'
is also found in the yum importer upload.py
[1]
This causes an invalid combination of a valid sha256 'checksum'
combined with a 'checksumtype'
OTHER than sha256 to succeed, when the proper behaviour would be failure.
[0] http://docs.pulpproject.org/dev-guide/integration/rest-api/content/upload.html#creating-an-upload-request
[1] https://github.com/pulp/pulp_rpm/blob/master/plugins/pulp_rpm/plugins/importers/yum/upload.py#L395
Related issues
Updated by ttereshc about 7 years ago
- Priority changed from Normal to Low
- Severity changed from 2. Medium to 1. Low
- Triaged changed from No to Yes
Updated by bmbouter about 7 years ago
- Tags deleted (
Easy Fix)
I'm not entirely sure this is related, but I want to share some cautionary history related to these fields. In Pulp's history (around 2.7 and 2.8) there are several fields which are represented internally differently from how they are represented externally. We had to change the names internally during the mongoengine. This caused issues with the API because we had to continue using the old field names. There is this inbound/outbound transform that occurs. I vaguely remember that checksum was one of those.
We should be sure that the docs being incorrect is not the result of a regression in our handling of those fields. If it is a regression in our handling and not the docs the right action is to fix our regression. It could be that the docs are just wrong, I'm not sure, but I wanted to share the history I think about when I read this issue.
Updated by kdelee@redhat.com about 7 years ago
- Related to Issue #2774: Inconsistent Checksum and Checksumtype when uploading with --checksum-type added
Updated by kdelee@redhat.com about 7 years ago
- Assignee deleted (
kdelee@redhat.com)
Updated by bmbouter over 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
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.