Closed Bug 1219792 Opened 10 years ago Closed 10 years ago

Do not create Version for invalid uploads that pass auto-validation

Categories

(addons.mozilla.org Graveyard :: API, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: kumar, Assigned: mstriemer)

References

Details

STR: - Sign in to the developer hub and upload an unlisted add-on - Create an add-on that will fail validation for any reason (corrupt zip or whatever) - Upload the new add-on version using the API (bug 1208561) - See that the add-on failed validation - Fix the validation errors - Attempt to re-upload the same version This results in a 409 conflict because "the version already exists". The API should let you make corrections without having to create a new version.
Blocks: 1206158
Priority: -- → P1
With a clone of jpm, it's possible to reproduce this with: jpm sign --api-key ... --api-secret ... --api-url-prefix http://olympia.dev/en-US/firefox/api/v3 (olympia.dev points to my local docker server)
Assignee: nobody → mstriemer
Iteration: --- → 45.1 - Nov 16
As noted in bug 1221691 this happens because even though the file doesn't pass validation it passed auto validation and that is being treated as enough to create the Version but it should not. The fix should be outlined in this gist [1]. [1] https://gist.github.com/mstriemer/4e378aa31dfeb3a35751
Summary: Do not return 409 conflict when re-uploading a broken add-on version → Do not create Version for invalid uploads that pass auto-validation
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
I just verified this as fixed on stage
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.