From edfc911649029335854936294e61aa3b99e670ba Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Wed, 14 Jun 2023 01:49:08 +0000 Subject: [PATCH] hooks: Tell Sentry the explicit commit range. This is necessary if one has different deployments (with different commit ranges) using the same projects. See https://docs.sentry.io/product/releases/associate-commits/#using-the-cli for the API of the `sentry-cli` tool. --- puppet/zulip/files/hooks/pre-deploy.d/sentry.hook | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/puppet/zulip/files/hooks/pre-deploy.d/sentry.hook b/puppet/zulip/files/hooks/pre-deploy.d/sentry.hook index 6fc2b64ef0..32489eee8e 100755 --- a/puppet/zulip/files/hooks/pre-deploy.d/sentry.hook +++ b/puppet/zulip/files/hooks/pre-deploy.d/sentry.hook @@ -24,8 +24,9 @@ curl "https://sentry.io/api/0/organizations/$sentry_org/releases/" \ merge_base="${ZULIP_NEW_MERGE_BASE_COMMIT:-}" if [ -n "$merge_base" ]; then + old_merge_base="$ZULIP_OLD_MERGE_BASE_COMMIT" echo "sentry: Setting commit range based on merge-base to upstream of $merge_base" - sentry-cli releases --org="$sentry_org" set-commits "$sentry_release" --commit="zulip/zulip@$merge_base" + sentry-cli releases --org="$sentry_org" set-commits "$sentry_release" --commit="zulip/zulip@$old_merge_base..$merge_base" fi if [ -n "$sentry_frontend_project" ]; then