-
Notifications
You must be signed in to change notification settings - Fork 116
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
Make the artifact create endpoint idempotent #5780
Comments
Not opposed to it, but IMHO the artifacts api should completely be deprecated for removal in pulp 4. |
I discussed this issue with @daviddavis on chat. He's using this API for uploading artifacts that are needed to create multi-artifact source packages in pulp_deb. A change in pulp_deb API for source packages would be appreciated. @quba42 , what do you think about that? |
Have other plugins already solved this? In other words is there already an API endpoint somewhere for creating a multi-artifact content without having to separately create the artifacts first? That is how I understood the request. |
So I just had a look at the pulp_deb Source Package API endpoint, and it expects you to provide the Does anyone have any ideas how one might provide a content API endpoint with multiple uploads to create a content and multiple artifacts from? I did not think about this before, and if it does not already exist elsewhere, I am not at all confident I know a good approach. 😄 |
I think the multipart body can accept multiple files in one request just fine. Not sure if DRF covers for that. Somehow we are derailing from the original ask: "Should the Artifact upload be idempotent?" And we can do that. |
The package creation endpoints are idempotent so I wonder if the artifact create endpoint should be as well. Currently, you get a 400 error if you attempt to upload an artifact that already exists:
The text was updated successfully, but these errors were encountered: