Project

Profile

Help

Issue #2729

pulp_user_metadata is ignored during ISO import

Added by rmcgover almost 3 years ago. Updated 10 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
2.19.0
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

Description

When using the POST /pulp/api/v2/repositories/<repo_id>/actions/import_upload/ API to get content into an ISO repo, any included pulp_user_metadata in the request is ignored and the created unit instead has an empty pulp_user_metadata.

From review of https://github.com/pulp/pulp_rpm/blob/7b4a800fdbfa6966fdb0d456d46e636ce5a90c1a/plugins/pulp_rpm/plugins/importers/iso/importer.py#L107 it can be seen that the metadata argument isn't used at all during upload_unit - only the unit_key is used.

Expected behavior: for ISO units, in my import_upload POST, if the unit_metadata attribute contains a pulp_user_metadata element, that's saved on the created unit. (This already works for other kinds of units such as RPMs.)

Associated revisions

Revision 1ee625c1 View on GitHub
Added by Jay Zhang about 1 year ago

Fix unit_metadata is ignore during iso import [DELIVERY-5965]

Now pulp will set/update the metadata during iso upload

History

#2 Updated by ttereshc almost 3 years ago

  • Priority changed from Normal to High
  • Triaged changed from No to Yes

#3 Updated by rmcgover almost 3 years ago

Note that with the current code, putting pulp_user_metadata in unit_key during the import works (it saves the field on the unit metadata).

So this is a workaround, but I'm not sure if it would be considered a good workaround as it feels like abusing the API in a way which might later stop working if the code is modified so that unit_key only processes fields which are truly part of the unit key.

#4 Updated by bmbouter almost 3 years ago

This workaround sounds decent, but it could break in the future for all the reasons you say. I would continue to use it for now until this issue can be fixed. Thanks for posting the workaround.

#5 Updated by pthomas@redhat.com almost 3 years ago

  • Smash Test set to 635

#6 Updated by bmbouter almost 3 years ago

  • Tags RCM added

#7 Updated by dkliban@redhat.com about 1 year ago

  • Status changed from NEW to MODIFIED

#8 Updated by ttereshc 12 months ago

  • Platform Release set to 2.19.0

#9 Updated by ttereshc 12 months ago

  • Sprint/Milestone set to 2.19.0

#10 Updated by ttereshc 12 months ago

  • Status changed from MODIFIED to ON_QA

#11 Updated by ttereshc 11 months ago

  • Status changed from ON_QA to CLOSED - CURRENTRELEASE

#12 Updated by bmbouter 11 months ago

  • Tags Pulp 2 added

#13 Updated by bmbouter 10 months ago

  • Tags deleted (RCM)

Please register to edit this issue

Also available in: Atom PDF