Closed Bug 1219789 Opened 10 years ago Closed 10 years ago

Re-uploading a deleted FxOS Add-on version can result in a 500 error

Categories

(Marketplace Graveyard :: API, defect, P3)

Avenir
defect

Tracking

(Not tracked)

RESOLVED FIXED
2015-11-03

People

(Reporter: mat, Assigned: mat)

References

Details

From https://bugzilla.mozilla.org/show_bug.cgi?id=1209114#c5 it appears we can run into a conflict when re-uploading a file that has been deleted. I'm not quite sure of the exact STRs yet, because last I checked we did delete the files when a version is soft-deleted (which is something we might want to avoid), so I'm going to investigate. https://sentry.prod.mozaws.net/operations/zamboni/group/124041/ RuntimeError: Trying to upload a file to a destination that already exists: [...]/extensions/90/extension-0.5.zip Stacktrace (most recent call last): File "rest_framework/views.py", line 400, in dispatch response = handler(request, *args, **kwargs) File "mkt/extensions/views.py", line 73, in create obj = self.model.from_upload(upload, **params) File "mkt/extensions/models.py", line 463, in from_upload size = instance.handle_file_upload_operations(upload) File "mkt/extensions/models.py", line 493, in handle_file_upload_operations ' %s' % self.file_path)
Status: NEW → ASSIGNED
Target Milestone: --- → 2015-11-03
It turned out we do not touch files when soft-deleting (signal is never sent). Fixed in https://github.com/mozilla/zamboni/commit/d86c84a52807c6a41005ee15bbe133d0fed7ae13 STR: - Submit a FxOS Add-on - Delete a version of this add-on. - Re-submit the same package corresponding to the version number you deleted. So if you deleted the version "0.1", submit the same package, making sure the version number is still "0.1" Expected results: - The re-submission should work correctly.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
oops, i closed the bug before checking reviewer installs.
Status: VERIFIED → RESOLVED
Closed: 10 years ago10 years ago
You need to log in before you can comment on or make changes to this bug.