No error when creating duplicate artifact filenames for different refs via API

When using the artifacts POST API endpoint to attach a file to a ref in a repository, one can currently reuse a single filename for multiple uploads to different refs. In this case, the older file is overwritten and the URL for any artifacts attached with the same name to other refs becomes incorrect.

There should be an error when this is attempted, to avoid naming conflicts and incorrect attachment URLs.

The API does currently signal an error when one attempts to reuse a filename within the same ref. But, because the refs are stored in a single per-repository namespace, the API should also signal an error when a duplicate filename is used with a different ref.

Here is a concrete example where one version of a file was uploaded to refs/tags/0.2.0, then another to refs/tags/0.3.0 with the same filename.

Assigned to
6 months ago
a month ago
No labels applied.

~sircmpwn 5 months ago

!resolve fixed

Thanks for the patch!

~sircmpwn REPORTED FIXED a month ago

Register here or Log in to comment, or comment via email.