Skip to content
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

Hold actions on the back of decisions, rather than process them, if content is high profile #22766

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

eviljeff
Copy link
Member

@eviljeff eviljeff commented Oct 15, 2024

Fixes: mozilla/addons#15074

Description

This patch changes decision handling from Cinder, to check if the decision/content is high profile, and if so to not carry out the action - just log the action that should have happened.

Context

This is the first part of larger epic - further work will expose the held actions and allow them to be carried out (or not). No decisions are coming from Cinder at this time so we're pretty safe to land it half finished ... though it could be argued it should be behind a waffle switch 🤷

Testing

Bit of a pain to test fully, because it relies on having your cinder auth enabled for the report, and manually applying webhook payloads. But roughly:

  • find a promoted (recommended, line, spotlight, or notable) add-on locally
    • note: the add-on must be actively promoted (i.e. has at least one version approved for that Promoted class)
  • report that add-on to cinder under a category that is handled in cinder (e.g. legal reason)
  • in cinder stage, make a decision to disable on that add-on and copy the payload json from the admin section
  • apply the payload via curl, etc (easier if you comment out @permission_classes((CinderInboundPermission,))!)
  • go to reviewer review page for that add-on and see add-on is not disabled, but that the disable was attempted is displayed in the version history

Checklist

  • Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • Successfully verified the change locally.
  • The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
  • Add before and after screenshots (Only for changes that impact the UI).
  • Add or update relevant docs reflecting the changes made.

@eviljeff eviljeff force-pushed the 15074-cinder-decision-hold branch 2 times, most recently from 951d1b7 to 27fc9d5 Compare October 15, 2024 14:57
@eviljeff eviljeff changed the title 15074 cinder decision hold Make actions on the back of decisions held, rather than processed, if content is high profile Oct 15, 2024
@eviljeff eviljeff changed the title Make actions on the back of decisions held, rather than processed, if content is high profile Hold actions on the back of decisions, rather than process them, if content is high profile Oct 16, 2024
@eviljeff eviljeff marked this pull request as ready for review October 16, 2024 17:32
@eviljeff eviljeff requested review from a team and KevinMind and removed request for a team October 16, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Allow Decisions (from Cinder) to be held before action is carried out
1 participant