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

delegate review actions to cinder #23004

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

Conversation

eviljeff
Copy link
Member

@eviljeff eviljeff commented Jan 21, 2025

Fixes: mozilla/addons#1982

Description

Refactors code in the ContentAction classes, and ReviewHelper to allow activity logging to be consistently generated; migrates Disable Add-on action from the reviewer tools to ContentAction classes.

Context

The primary motivation for this work (what this blocks) is 2nd level approvals for reviewer tools originated decisions - and only certain types of decision (add-on disables and addon version rejections) will be held - so not all actions need to be rewritten at this point. This PR starts with disable_addon as it's a) already implemented for cinder originated decisions and b) relatively straightforward.

I had to tinker with some existing migrations to fix breakage caused by migrations executing in a different order now (though they were only a problem in CI or with a fresh database anyway)

Testing

The main change is how Disable Addon is executed from the reviewer tools:

  • For a "normal" add-on, select force disable action from reviewer tools, and choose a reason.
  • verify that the addon was disabled; and the email we send out contains the reason text
  • check the activity log created is linked to the addon, current_version of the addon, decision, policy, and reason.

Repeat with an add-on that would be considered high profile - e.g. a Recommended or Notable add-on.

  • select force disable from the reviewer tools, etc.
  • verify that the add-on was not disabled, and the review history includes that the action was held. (no email to developer either)
  • Go to 2nd level approval queue and release the hold - proceed with the action.
  • verify that the addon was disabled; and the email we send out contains the reason text
  • check the activity log created is linked to the addon, current_version of the addon, decision, policy, and reason.

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 1982-delegate-review-actions-to-cinder branch from d2f8bfa to 7c4d143 Compare January 21, 2025 20:41
@eviljeff eviljeff force-pushed the 1982-delegate-review-actions-to-cinder branch from f4c8e7e to fb3e679 Compare January 22, 2025 09:06
@eviljeff eviljeff marked this pull request as ready for review January 23, 2025 14:37
@eviljeff eviljeff requested a review from diox January 23, 2025 14:38
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.

delegate review actions to CinderActions
1 participant