Project

Profile

Help

Story #4745

As a plugin writer, I can create distributions for repository versions

Added by daviddavis 8 months ago. Updated 7 months ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 52

Description

Problem

Some plugins like pulp_ansible and pulp_docker have no need for publications since they don't use metadata. Give these plugins a way to attach distributions directly to repo versions.

Solution

1. Add a "repository_version" attribute to the Distribution model
2. Update the content app to serve up content from that RepositoryVersion
3. The "repository_version" and "publication" fields should not be used together and should error somehow.

We will also remove the 'publisher' option because we expect it will not be used in 3.0 and will introduce more confusion than value.

We will also adjust the auto-distribution behavior as follows:

When the Distribution.repository field is set, the Distribution will be updated to have the repository_verison field point at the newly created repository_version.


Related issues

Blocks Pulp - Story #4680: As a user I have lifecycle docs in pulpcore workflows NEW Actions
Blocks Ansible Plugin - Task #4765: Remove Publications MODIFIED Actions
Blocked by Pulp - Issue #4791: Cannot `make diagrams` on F29 w/ pulplift MODIFIED Actions

Associated revisions

Revision d75e94a5 View on GitHub
Added by bmbouter 7 months ago

Distributions serve RepositoryVersion

This adds the field 'repository_version' to a Distribution which will
serve the content in that RepositoryVersion.

This also removes the 'publisher' field which was decided to no longer
be something we want at this time.

It adds some docs in the workflow section that describing 3
auto-distribution workflows.

Lastly, it adjusts auto-distribution so that the 'repository' field will
serve the latest RepositoryVersion automatically.

The 'repository', 'repository_version', and 'publication' fields cannot
be used together.

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

History

#1 Updated by amacdona@redhat.com 8 months ago

This won't actually help docker, since docker has its own implementation of distributions. But +1 to this idea for the general case

#2 Updated by bmbouter 8 months ago

I think pass-through is still useful because in cases where you have metadata and a huge number of artifacts you just want to let the repo version handle the rest. The think that doesn't seem as useful is having PublishedArtifact at all but I'm not proposing we get rid of it.

+1 to this story. We need to have a technical proposal on how to implement.

#3 Updated by bmbouter 8 months ago

I think we should add a field to Distribution called "repository_version"https://github.com/pulp/pulpcore/blob/6eef8fc14df37a4e1f52af53848b5cb75f08a736/pulpcore/app/models/publication.py#L248.

The "repository_version" and the "publication" field should not be used together. Having a distribution serve both content from a Repository Version and a Publication would be confusing and could lead to unexpected results.

#4 Updated by amacdona@redhat.com 8 months ago

Heres another question: How will autodistribution work? Should it just be repository based?

#5 Updated by bmbouter 8 months ago

I think the "respository" field should autodistribute whenever a new repo-version is made. Also the existing "publisher" field should continue to auto-distribute whenever it publishes a publication as it does today.

The change would be that today I think the repository and publisher field are used together. Will this change cause any problems?

#6 Updated by amacdona@redhat.com 8 months ago

  • Blocks Story #4680: As a user I have lifecycle docs in pulpcore workflows added

#7 Updated by bmbouter 7 months ago

  • Description updated (diff)

Removing some of the questions that were answered in comments and on irc.

#8 Updated by bmbouter 7 months ago

  • Description updated (diff)

Removing some of the questions that were answered in comments and on irc and rewriting with a full solution.

#9 Updated by bmbouter 7 months ago

#10 Updated by dkliban@redhat.com 7 months ago

@bmbouter, take a look at what I did for pulp_docker to handle this use case: https://github.com/pulp/pulp_docker/pull/341/files

We use the serializer to enforce repository or repository version.

The content app does the auto distribution when repository is set. We added a method for looking up the latest repo version. So no extra updating of Distribution is needed at repo version creation time.

#11 Updated by amacdona@redhat.com 7 months ago

  • Groomed changed from No to Yes
  • Sprint Candidate changed from No to Yes
  • Sprint set to Sprint 52

#12 Updated by bmbouter 7 months ago

  • Description updated (diff)

updating description based on convo w/ other devs

#13 Updated by bmbouter 7 months ago

  • Status changed from NEW to POST
  • Assignee set to bmbouter

#14 Updated by bmbouter 7 months ago

  • Blocked by Issue #4791: Cannot `make diagrams` on F29 w/ pulplift added

#15 Updated by bmbouter 7 months ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#16 Updated by bmbouter 7 months ago

  • Status changed from MODIFIED to POST

There is followon work for this so I need to move back to POST.

#17 Updated by bmbouter 7 months ago

  • Status changed from POST to MODIFIED

Actually this story is done, it was https://pulp.plan.io/issues/4785 that needed extra work.

Please register to edit this issue

Also available in: Atom PDF