Skip to content

Add feature flag for spam blocking

Ian Anderson requested to merge feature-flag-spam-blocking into master

What does this MR do and why?

The current deployment of the spamcheck service does not return blocking spam verdicts. The model accuracy has gotten to the point that we are ready to implement blocking. Adding a feature flag around that functionality will enable us to easily revert blocking if there are any unintended consequences for legitimate users.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

[1] pry(main)> Feature.disable(:block_spam)
=> true
[2] pry(main)> i = Issue.last
=> #<Issue id:684 regular_user/bulk-upload#6>
[3] pry(main)> i.spam!
=> nil
[4] pry(main)> i.spam
=> false
[5] pry(main)> Feature.enable(:block_spam)                                                                                                                                                                                                                                                                                                                                                                          
=> true
[6] pry(main)> i.spam!
=> true
[7] pry(main)> i.spam
=> true

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports