Skip to content

Conversation

@ykamo001
Copy link
Contributor

@ykamo001 ykamo001 commented Mar 8, 2024

For Issue Alert notification messages, we need to be able to retrieve the parent message such that we can create a thread. Added logic to help achieve that query and flow, along with some tests.

Requires: #66623

@ykamo001 ykamo001 self-assigned this Mar 8, 2024
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 8, 2024
@ykamo001 ykamo001 requested a review from a team March 8, 2024 20:51
@ykamo001 ykamo001 marked this pull request as ready for review March 8, 2024 20:51
@ykamo001 ykamo001 requested a review from a team as a code owner March 8, 2024 20:51
@codecov
Copy link

codecov bot commented Mar 8, 2024

Codecov Report

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

Project coverage is 84.32%. Comparing base (374edcf) to head (1edcf55).

❗ Current head 1edcf55 differs from pull request most recent head 14f4ec4. Consider uploading reports for the commit 14f4ec4 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #66625      +/-   ##
==========================================
+ Coverage   84.29%   84.32%   +0.02%     
==========================================
  Files        5306     5315       +9     
  Lines      237188   237647     +459     
  Branches    41023    41117      +94     
==========================================
+ Hits       199948   200405     +457     
- Misses      37021    37023       +2     
  Partials      219      219              
Files Coverage Δ
src/sentry/integrations/repository/issue_alert.py 93.33% <88.88%> (ø)

... and 94 files with indirect coverage changes


@dataclass(frozen=True)
class IssueAlertNotificationMessage(BaseNotificationMessage):
# TODO(Yash): do we really need this entire model, or can we whittle it down to what we need?
Copy link
Member

Choose a reason for hiding this comment

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

nit: I saw a bunch of these so far. Can you create a ticket so if in future someone else owns this know what the plan is to figure these out and refactor? Bonus point for adding ticket number to comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah let me add to the backlog!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! #66751

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated the comments too :D

"rule_action_uuid": rule_action_uuid,
},
)
raise
Copy link
Member

Choose a reason for hiding this comment

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

How is this being handled in the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's up to the caller to decide how they want to proceed, and if this is a blocking data piece for them or not. For our use case in threads notification, we'll probably block, or fallback to just posting the message as a normal message in the channel (as apposed to a thread)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is something we can get clarity on from product

@ykamo001 ykamo001 merged commit 7547479 into master Mar 12, 2024
@ykamo001 ykamo001 deleted the eco-68440-get branch March 12, 2024 01:44
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 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.

3.1 When sending a notification for an Issue Alert, store the notification and response in our data model

3 participants