You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Right now pulpcore knows artifactless types, that can be created via file upload using the NoArtifactContentUploadViewSet and the NoArtifactContentUploadSerializer, which can be combined with "retrieve behaviour" (do not throw errors if the requested content already esists/is already in the repo it should be added to) by defining a plugin specific retrieve function on the serializer.
However, pulp_deb has several artifact less types, that do not need an actual uploaded file as part of this process at all. All they need (for pulp_deb to be able to create them) is the set of required API parameters. Examples include the ReleaseComponent and ReleaseArchitecture. These content types should still use the repository parameter to create and add them to a repository in one action, along with "retrieve behaviour". Since this means creating new repository versions, this action must be performed as a task to ensure resource locks.
As far as I can tell this is currently not possible, because pulpcore does not have the right kind of ViewSet. I was able to get things to work with the following adjustments to the NoArtifactContentUploadViewSet: #5084
An alternative might be to split up NoArtifactContentUploadViewSet into NoArtifactContentUploadViewSet and NoArtifactContentViewSet, which would mirror the class structure on the serializer side, and possibly make the semantic intention more clear.
I am happy to implement this as soon as there is a consensus on whether to add a whole new ViewSet in the class hierarchy, or whether it is enough to adjust NoArtifactContentUploadViewSet to support both use cases.
I could use help in designing a good test to cover this special use case.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Right now pulpcore knows artifactless types, that can be created via file upload using the
NoArtifactContentUploadViewSet
and theNoArtifactContentUploadSerializer
, which can be combined with "retrieve behaviour" (do not throw errors if the requested content already esists/is already in the repo it should be added to) by defining a plugin specificretrieve
function on the serializer.However, pulp_deb has several artifact less types, that do not need an actual uploaded file as part of this process at all. All they need (for pulp_deb to be able to create them) is the set of required API parameters. Examples include the
ReleaseComponent
andReleaseArchitecture
. These content types should still use therepository
parameter to create and add them to a repository in one action, along with "retrieve behaviour". Since this means creating new repository versions, this action must be performed as a task to ensure resource locks.As far as I can tell this is currently not possible, because pulpcore does not have the right kind of
ViewSet
. I was able to get things to work with the following adjustments to theNoArtifactContentUploadViewSet
: #5084An alternative might be to split up
NoArtifactContentUploadViewSet
intoNoArtifactContentUploadViewSet
andNoArtifactContentViewSet
, which would mirror the class structure on the serializer side, and possibly make the semantic intention more clear.Additional context
NoArtifactContentUploadViewSet
to support both use cases.The text was updated successfully, but these errors were encountered: