getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
39.05k stars 4.19k forks source link

Deployment emails list all projects in monorepo, not the specific project deployed #79956

Open jasondentler opened 3 days ago

jasondentler commented 3 days ago

Problem Statement

When using sentry-cli, I specify the project being deployed. However, the email sent to many users including my boss says I just deployed all the projects in our monorepo, which causes confusion.

07:00:51  command -v "/my/workspace/my-project-deployment@tmp/sentry-cli" || curl -sL https://sentry.io/get-cli/ | INSTALL_DIR="/my/workspace/my-project-deployment@tmp" SENTRY_CLI_VERSION="2.36.2" bash
[Pipeline] sh
07:00:51  + command -v /my/workspace/my-project-deployment@tmp/sentry-cli
07:00:51  + curl -sL https://sentry.io/get-cli/
07:00:51  + INSTALL_DIR=/my/workspace/my-project-deployment@tmp
07:00:51  + SENTRY_CLI_VERSION=2.36.2
07:00:51  + bash
07:00:51  This script will automatically install sentry-cli (2.36.2) for you.
07:00:51  Installation path: /my/workspace/my-project-deployment@tmp/sentry-cli
07:00:51  #=#=#                                                                        
07:00:51  
07:00:52  ######################################################################## 100.0%##O#-#                                                                       
07:00:52  ##=O#- #                                                                     
07:00:52  
07:00:52                                                                             0.1%
07:00:52  ######################                                                    31.5%
07:00:52  ##################################################################        92.3%
07:00:52  ######################################################################## 100.0%
07:00:52  Sucessfully installed sentry-cli 2.36.2
07:00:52  Done!
[Pipeline] echo
07:00:52  #!/bin/bash
07:00:52              /my/workspace/my-project-deployment@tmp/sentry-cli deploys new \
07:00:52                --org myorgtoken \
07:00:52                --env production \
07:00:52                --project my-project \
07:00:52                --name 7.7.77 \
07:00:52                --release abcdefabcdefabcdefabcdefabcdefabcdef \
07:00:52                --url https://ci-server/job/my-project-deployment/16/ || (/my/workspace/my-project-deployment@tmp/sentry-cli info && exit 1)
07:00:52              
[Pipeline] sh
07:00:53  Created new deploy 7.7.77 for 'production'

I already opened this issue earlier. The issue was resolved. The CLI is sending the project to Sentry (https://github.com/getsentry/sentry-cli/commit/099919a11c4d30e442f3cfbb6fb4a2312e902239) and the Sentry APIs accept this property (https://github.com/getsentry/sentry/commit/e14ce0f7ef2b077db2d89b3340f3bd96d6574738). Somewhere deeper in Sentry, this relationship is being ignored and sending incorrect Deployment notification emails.

Version abcdefabcdefabcdefabcdefabcdefabcdef was deployed to production

Projects Affected:
my-project
another-project-in-the-monorepo
and-another-project-in-the-monorepo

Solution Brainstorm

Especially when sending out Deployment notifications, only include the projects associated with the deployment.

Product Area

Other

getsantry[bot] commented 3 days ago

Assigning to @getsentry/support for routing ⏲️

jasondentler commented 3 days ago

Jordan Luse, working on support case #136068, recommended opening this GitHub issue.

szokeasaurusrex commented 1 day ago

@JLuse, as @jasondentler already mentioned in the original issue description, this issue has been fixed in Sentry CLI:

The CLI is sending the project to Sentry (https://github.com/getsentry/sentry-cli/commit/099919a11c4d30e442f3cfbb6fb4a2312e902239) and the Sentry APIs accept this property (https://github.com/getsentry/sentry/commit/e14ce0f7ef2b077db2d89b3340f3bd96d6574738). Somewhere deeper in Sentry, this relationship is being ignored and sending incorrect Deployment notification emails.

The problem lies somewhere in the Sentry backend. I am transferring the issue back to the Sentry repo.

@jasondentler, are the deploys showing only for the correct projects, as expected, in the UI? Or is the UI incorrect, as well?

getsantry[bot] commented 1 day ago

Assigning to @getsentry/support for routing ⏲️

jasondentler commented 1 day ago

@szokeasaurusrex In at least one place, the UI is also incorrect, I believe. In the Sentry UI, when I go to a different project's releases, find this release hash, and scroll to the bottom of the page, it does show a production release, even though this project was not released to production.

This page: https://{org tag}.sentry.io/releases/{release hash}/?environment=production&project={the unreleased project id} in the right column, at the bottom, it shows the deploys.

Let me know if I should be referring to a different page. I don't know of any page that focuses solely on deployments.

szokeasaurusrex commented 1 day ago

@jasondentler Could you please provide the actual link? If you don't want to post the link publicly on GitHub (this of course does not make any details on the page public, only what is encoded directly in the URL), you can add it to your customer support ticket (preferably, if possible), or email me directly.

jasondentler commented 1 day ago

@szokeasaurusrex Looking at it more closely, the UI is inconsistent.

This project was deployed to production: https://iland-jl.sentry.io/releases/9867b768ea12674e3df0d131152822539ba59d3b/?environment=production&project=4507730937184256 In the right column at the top, it shows Date Deployed: 6 days ago and Last Deploy: Production In the right column at the bottom, it shows Deploys: Production, 6 days ago

This project was NOT deployed to production: https://iland-jl.sentry.io/releases/9867b768ea12674e3df0d131152822539ba59d3b/?environment=production&project=4507726609186816 In the right column at the top, it shows Date Deployed: 6 days ago and Last Deploy: Production However, in the right column at the bottom, it doesn't show the Deploys section.

getsantry[bot] commented 13 hours ago

Routing to @getsentry/product-owners-releases for triage ⏲️

ceorourke commented 7 hours ago

Thanks for the report - I've created tickets in my team's internal tracking system to address these (one for the email and one for the UI).