Skip to content

Unblock addon versions from follow-up actions on appeal#24799

Merged
eviljeff merged 1 commit intomozilla:masterfrom
eviljeff:16119-unblock-on-appeal
Apr 28, 2026
Merged

Unblock addon versions from follow-up actions on appeal#24799
eviljeff merged 1 commit intomozilla:masterfrom
eviljeff:16119-unblock-on-appeal

Conversation

@eviljeff
Copy link
Copy Markdown
Member

@eviljeff eviljeff commented Apr 24, 2026

Fixes: mozilla/addons#16119

Description

Adds appeal support for follow-up actions - which are (currently) delayed block actions. Blocked versions are unblocked; pending BlocklistSubmissions are deleted or amended.

Context

In this patch I added a reverse_action to the ContentActionDelayedXxxYyyBlockAddon classes, because I didn't like how ContentActionTargetAppealApprove.process_action was getting longer and longer. The thinking was that we can delegate the reversal of an action to the class that executed it. If it seems like a good model we can rewrite the other actions to work the same way. Though it's not without it's problems - we often want different functionality (e.g. target_versions; emails) for an appeal that reverses an action compared to the initial action.

Follow-up actions are always executed after a primary action. The filtering in the view prevents any of AMO_FU_DELAY_XXX_YYY_BLOCK_ADDON decision actions from being primary actions, but I've attempted to write the action class support so if it was executed as a primary action the appeal would still work.

Testing

  • report an add-on
  • add or one more enforcement actions to a policy in Cinder
    • e.g. short soft block + mid hard block
  • process the job in cinder using that policy
  • replay the webhook locally
    • double check the payload that all the enforcement actions are there
    • existing functionality:
      • you will have to 2nd level approve if the add-on is promoted
      • the add-on should be disabled
      • there should be follow-up actions executed - 2 pending (delayed) blocklistsubmissions if you followed the e.g.
  • to test all the functionality (i.e. the block deletes too), edit one of the blocklistsubmissions to remove the delayed date and save, so the block is added immediately
    • check that block exists now in django admin
  • appeal the decision with the link from the email in admin
  • process the appeal in Cinder, overriding the decision, to Approve
  • replay the webhook to process the appeal
  • the add-on should be re-enabed
  • the block should be removed
  • the blocksubmission should be deleted

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 16119-unblock-on-appeal branch from 14c44a4 to 7d4c4c1 Compare April 24, 2026 13:26
@eviljeff eviljeff marked this pull request as ready for review April 24, 2026 14:04
@eviljeff eviljeff requested a review from diox April 24, 2026 14:13
@eviljeff eviljeff merged commit f22e062 into mozilla:master Apr 28, 2026
43 checks passed
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]: Automatically unblock add-ons after a succesful appeal

2 participants