Project

Profile

Help

Story #7708

closed

Improve content creation experience

Added by wibbit about 4 years ago. Updated almost 3 years ago.

Status:
CLOSED - DUPLICATE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

Ticket moved to GitHub: "pulp/pulp_rpm/2257":https://github.com/pulp/pulp_rpm/issues/2257


Currently when attempting to create RPM content from an already uploaded artefact, if a NEVRA already exists for that content, the task fails.

There are many reasons why a single NEVRA could translate to multiple SHA's depending on build time/host etc.

From within Pulp, I don't believe (outside of passing a string), there is no way to find the HREF of the conflicting package.

  1. An artefact has no knowledge of its content (I can't query the artefact for its NEVRA, and then query the content)
  2. Though you can see the filename (fairly reliable, but not guaranteed), when looking at content, you can't query by file, you'd need to iterate over the entire content, or pass the filename (not reliable as I believe filename and metadata can and often do vary)
  3. When a task fails due to conflicting NEVRA, the Description string in the error message DOES include NEVRA + conflicting pkgId, however I'd rather avoid having to pass strings if at all possible.

So some initial thoughts (not prescribing just initial brainstorming that would work for me).

  1. The task does not fail but instead returns the pkgId/href of the conflicting package.
  2. Provide a method to query content for a would-be created content from an artifact, and IF it were to conflict provide. a) The NEVRA of the conflicting package, which can then be used to query the content for said package. b) All of the metadata from the would be created content (not the existing content). b) Simply return the href for the pre-existing package.

A & B, should have no implications for RBAC, as it's only returning the information for the artefact being referenced, and also allows the developer to subsequently query the content using the NEVRA and see if there are more concerning differences between the pre-existing content and the desired new content, and choose what to do (delete pre-existing, and replace with new, throw away new, and keep old, etc etc etc)

Also available in: Atom PDF