getsentry/craft

Release drafts persist after failed publish attempt

Opened this issue · 0 comments

When publish action fails, either due to an error, or a timeout, a pre-created draft release will be left untouched.

This means, that whenever someone reapproves the release, they can end up with multiple drafts and a single published release, with the same tag names, which is polluting our GitHub releases page.

It's not possible to query for non-published releases by tag, nor are they listed in /releases endpoint, so we cannot just remove or reuse an existing one, as for this, we need a release ID value, which we don't know.

It'd be best to call deleteRelease in the catch clause of the main publish step if anything goes wrong.
However now, due to the timeouts issue that we are trying to resolve, it would not work as well, so leaving this issue description here for future reference.