Skip to content
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

Enable file-less "uploads" #5086

Closed
quba42 opened this issue Feb 28, 2024 · 1 comment · Fixed by #5088
Closed

Enable file-less "uploads" #5086

quba42 opened this issue Feb 28, 2024 · 1 comment · Fixed by #5088

Comments

@quba42
Copy link
Contributor

quba42 commented Feb 28, 2024

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.

Additional context

  • See here for the pulp_deb change that prompted this need: Add retrieve functionality pulp_deb#1018
  • 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.
@quba42
Copy link
Contributor Author

quba42 commented Feb 28, 2024

I am feeling a bit of time pressure with respect to this change, because I ideally need it to propagate into Katello within a reasonable time frame.

quba42 added a commit to ATIX-AG/pulpcore that referenced this issue Feb 28, 2024
quba42 added a commit to ATIX-AG/pulpcore that referenced this issue Feb 28, 2024
mdellweg pushed a commit that referenced this issue Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant