Skip to content

fix(slack): Ensure notifications for same issue are seen #70108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2024

Conversation

ykamo001
Copy link
Contributor

@ykamo001 ykamo001 commented May 1, 2024

When the issue alert flow gets triggered for the same issue, we should ensure the notification gets seen in the main channel as well. Refactored some code a little to clean it up.

Resolves: #70135 (comment)

@ykamo001 ykamo001 requested a review from a team as a code owner May 1, 2024 23:08
@ykamo001 ykamo001 self-assigned this May 1, 2024
@ykamo001 ykamo001 requested review from a team and ceorourke May 1, 2024 23:08
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 1, 2024
Copy link
Member

@cathteng cathteng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have a test for this 😅

otherwise lgtm

@ykamo001
Copy link
Contributor Author

ykamo001 commented May 1, 2024

do we have a test for this 😅

otherwise lgtm

Unfortunately we mock all slack api calls, so it won't test anything. In general though, it does not look like this class or method has any tests at all 😅

We have used this param for slack in another flow though, so we can be confident it does work

@ykamo001
Copy link
Contributor Author

ykamo001 commented May 1, 2024

do we have a test for this 😅
otherwise lgtm

Unfortunately we mock all slack api calls, so it won't test anything. In general though, it does not look like this class or method has any tests at all 😅

We have used this param for slack in another flow though, so we can be confident it does work

for reference: https://api.slack.com/methods/chat.postMessage#arg_reply_broadcast

Copy link

codecov bot commented May 1, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 79.82%. Comparing base (df71fec) to head (101e473).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #70108      +/-   ##
==========================================
- Coverage   79.82%   79.82%   -0.01%     
==========================================
  Files        6504     6504              
  Lines      289377   289378       +1     
  Branches    49833    49833              
==========================================
- Hits       230989   230982       -7     
- Misses      57977    57985       +8     
  Partials      411      411              
Files Coverage Δ
.../sentry/integrations/slack/actions/notification.py 80.32% <66.66%> (-0.67%) ⬇️

... and 7 files with indirect coverage changes

@ykamo001 ykamo001 merged commit 7d61ba4 into master May 2, 2024
@ykamo001 ykamo001 deleted the slack-threads-issue-alerts branch May 2, 2024 16:50
@github-actions github-actions bot locked and limited conversation to collaborators May 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple Issue Alerts in a single Slack Alert Thread
2 participants