canonical / assets.ubuntu.com

A JSON Restful API for storing and serving binary asset files
6 stars 17 forks source link

There seems to be no way to delete files from assets.ubuntu.com #232

Open bladernr opened 1 year ago

bladernr commented 1 year ago

We have started hosting PDF copies of certification docs on assets.ubuntu.com. These docs are periodically updated at which point we would normally replace the existing version with a new version. On our current/previous host, we owned the server and were able to just SSH into the server and delete the older files, replacing them with the new files as needed.

With assets.u.c, however, it looks to me as though you just keep adding and adding new files leaving a ton of somewhat confusing files with essentially the same file name (modulo a hex key/timestape prepended to the filename at upload). Over time this could lead to multiple similar looking files.

It would be preferable to be able to delete older files that I've uploaded.

This also became an issue when two of my files disappeared from the swift store, and there's no way for me to delete the existing entries on assets.u.c, nor is there any way for me to re-upload new copies without making changes to the file source and recompiling the PDFs and uploading slightly altered copies.

Ultimately, I should be able to delete the files I've uploaded, freeing the way to re-upload them in cases like this where swift lost them, or to just delete older, unnecessary copies that are just taking up space.

A related issue that being able to delete files would fix is that I cannot even re-upload the file again without going in, modifying the source code in some trivial way and then re-building the PDFs which is a bit much when all I want to do is fix a problem where the backing store lost data.

goulinkh commented 2 months ago

Hey @bladernr, just saw your issue and your chat about the two missing assets and sorry for the issue that you encountered, I hope that the problem is solved on your side regarding the missing PDFs if not please let me know so we can look into the issue!

Regarding deleting assets, I agree with you having multiple version of a given asset is misleading and not ideal on the long run as the Swift assets server will continue to grow unnecessarily. I will discuss adding the possibility to delete an asset with the web team and come back to you.

bladernr commented 2 months ago

Thanks! FWIW, we've resolved it overall (The whole cert org has changed how we're hosting docs now.)