-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve modulemds* creation API #3510
Comments
After further discussion w/ rpm team, we've concluded that:
Open questionsWhen should the attempt to link snippet packages with Pulp Packages be performed?
Where should Modulemd look for packages?
|
@daviddavis Does microsoft have any interest in or need for uploading their own modules directly into Pulp (without a sync)? If so, do you have any issues with the current modulemd creation API and do you have any feedback on what it should look like? |
No, we don't use modules and haven't had a publisher ask to use them. Thanks for checking though. |
@javihernandez, it would be nice to have further feedback on this. There are two improvements I'm trying to do with this:
I want to know how that may affect the distributed upload of modular packages inconvenience that you reported early on, about the immutability of Modulemds. I've proposed that, when the Modulemd is added to a Repository, then Pulp will try to find the Pulp Packages (matching the listed nevras in the Modulemd) in the context of the RepositoryVersion its being added to. The main advantage of this is that is assures Modulemd and Repository consistency*. For your workflow, that means you could upload the Module before the end of the build, but still, you would need to add the Module (via its href) to the final Repository in the end, if the uploads are successful. I'm not sure if that's helpful or not in the context of you workflow. Wdyt? *We've been discussing about how RpmRepository constrains/consistency are really suited for Distribution workflows, but not much for Build-system workflows. We still need to understand build-system requirements better so we can have better first class support for it. |
Also, a more minor question about this API improvement: I'm inclined to make the snippet upload be a File rather than a String (as it is currently), because we have similar endpoints which uses a File. Any preference here? |
I think it makes sense to expect the module snippet to be uploaded as last, meaning that all the rpms that it mentions should already be present in pulp otherwise the module should be considered corrupted.
We should always look at the latest repo version, if package(s) not available, fail the upload with meaningful message. |
@ipanova There is detail about linking the packages "on upload", strictly speaking, because |
@pedro-psb I thought we made the upload to require repo always, otherwise the content without a repo is considered orphan and user will not have access to it because the permissions on the content are being scoped off the repo permissions. |
ok, we do not require a repo to be provided for admins https://github.com/pulp/pulpcore/blob/main/pulpcore/app/global_access_conditions.py#L488 |
Problem
The API for creating modulemds, modulemds_defaults and modulemds_obsoletes is a bit redundant:
This allows creating inconsistent records of this type of content.
Proposal
Some ideas (not mutual exclusive) for a more ergonomic design are:
snippet
as required, plusrepository
andpackages
(for modulemds) as optional. The additional data that Pulp want to keep track of should be present in the snippet, or we won't accept it.packages
are provided (which are pulp_hrefs), validate that they strictly match therpm->artifacts
in the yaml.The snippet may be a string or a file, I'm not sure what is best.
Additional Context
Motivated by #3427
The text was updated successfully, but these errors were encountered: