Skip to content

Make Sentry release tracking idempotent

Robert Speicher requested to merge rs-sentry-releases into master

Because we'd create a Sentry Release every time auto_deploy:tag was run, we'd sometimes create a Release with an identical name. This resulted in Sentry being unable to determine the "previous release", so it then fell back to fetching the commit list at the SHA we'd given it, which lists only the last 20 commits. This meant that after a release was "re-created", it always showed in Sentry as only having 20 commits.

Now we check if a release by the given name exists, and if it does, we return early.

Addresses the tangent in gitlab-com/gl-infra/delivery#852 (closed)

Merge request reports