Skip to content

feat(feedback): set feedback issue to ignored if spam #69479

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 2 commits into from
Apr 24, 2024

Conversation

JoshFerge
Copy link
Member

  • If the message is spam, set it to be ignored by producing a status change message to the occurrence consumer.

There is not a way currently to set an issues state to ignored upon creation, but this should set it to ignored pretty close to immediate.

Note that there is sometimes buggy with issue occurrence messages sometimes processed out of order, but there is some ongoing work with issue platform to fix this soon.

@JoshFerge JoshFerge requested a review from a team as a code owner April 23, 2024 01:12
@JoshFerge JoshFerge requested a review from a team April 23, 2024 01:12
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 23, 2024
Copy link

codecov bot commented Apr 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.72%. Comparing base (53ea03d) to head (31e7af5).
Report is 1 commits behind head on master.

❗ Current head 31e7af5 differs from pull request most recent head bd910be. Consider uploading reports for the commit bd910be to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #69479       +/-   ##
===========================================
+ Coverage   61.35%   78.72%   +17.37%     
===========================================
  Files        6456     6469       +13     
  Lines      287024   287208      +184     
  Branches    49480    49493       +13     
===========================================
+ Hits       176101   226116    +50015     
+ Misses     110357    60670    -49687     
+ Partials      566      422      -144     
Files Coverage Δ
src/sentry/feedback/usecases/create_feedback.py 90.12% <100.00%> (+62.09%) ⬆️

... and 2566 files with indirect coverage changes

@@ -240,6 +241,16 @@ def create_feedback_issue(event, project_id, source: FeedbackCreationSource):
produce_occurrence_to_kafka(
payload_type=PayloadType.OCCURRENCE, occurrence=occurrence, event_data=event_fixed
)
if is_message_spam:
produce_occurrence_to_kafka(
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if this is the bug you're referring to but is it possible for this message to be processed before the PayloadType.OCCURRENCE message? would the group not exist in that case?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, that's the bug i'm referring to, and that's what steve is fixing here: #69466

Copy link
Member

@wedamija wedamija left a comment

Choose a reason for hiding this comment

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

If we set the status to ignored after we create it, are we going to send notifications and so on?

@JoshFerge
Copy link
Member Author

If we set the status to ignored after we create it, are we going to send notifications and so on?

#69478

@JoshFerge JoshFerge enabled auto-merge (squash) April 24, 2024 20:10
@JoshFerge JoshFerge merged commit 41f055c into master Apr 24, 2024
48 checks passed
@JoshFerge JoshFerge deleted the jferg/spam-ignore branch April 24, 2024 20:40
MichaelSun48 pushed a commit that referenced this pull request Apr 25, 2024
- If the message is spam, set it to be ignored by producing a status
change message to the occurrence consumer.

There is not a way currently to set an issues state to ignored upon
creation, but this should set it to ignored pretty close to immediate.

Note that there is sometimes buggy with issue occurrence messages
sometimes processed out of order, but there is some ongoing work with
issue platform to fix this soon.
@github-actions github-actions bot locked and limited conversation to collaborators May 10, 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 participants