Project

Profile

Help

Issue #2871

Old references to checksum_type need to be updated to checksumtype

Added by kdelee@redhat.com over 4 years ago. Updated over 2 years ago.

Status:
CLOSED - WONTFIX
Priority:
Low
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Documentation, Pulp 2
Sprint:
Quarter:

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

Related to RPM Support - Issue #2774: Inconsistent Checksum and Checksumtype when uploading with --checksum-typeCLOSED - WONTFIX<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by ttereshc over 4 years ago

  • Priority changed from Normal to Low
  • Severity changed from 2. Medium to 1. Low
  • Triaged changed from No to Yes

#2 Updated by bmbouter over 4 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.

#3 Updated by kdelee@redhat.com over 4 years ago

  • Related to Issue #2774: Inconsistent Checksum and Checksumtype when uploading with --checksum-type added

#4 Updated by kdelee@redhat.com about 4 years ago

  • Assignee deleted (kdelee@redhat.com)

#5 Updated by bmbouter over 2 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.

#6 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF