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

process override decision payloads from webhook without cinder job #22829

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

eviljeff
Copy link
Member

@eviljeff eviljeff commented Nov 6, 2024

Fixes: mozilla/addons#15144

Description

Expands the cinder decision webhook to handle payloads where there is no cinder job id, but there is a reference to the previous decision, so we can get the job from there.

Context

I'm sure overrides on decisions on jobs used to send the original job id too, but either way, it doesn't now. As we track decision ids we can follow the fk on the ContentDecision back to the CinderJob.

Testing

Difficult because requires the webhook payload to be replayed via curl, etc. (as usual, you may want to comment out the auth in the view to make it easier)

  • report abuse for an add-on, (for a cinder handled reason, like legal)
  • resolve the job for that abuse in cinder with a policy that leads to DISABLE_ADDON (e.g. allowable content)
  • replay the webhook payload for that decision locally, to create the ContentDecision with the correct id
  • (see the add-on is now disabled, and we sent an email to the developer and reporter)
  • in cinder go back to the now closed job and override the decision (3 dot menu on the right) with an Approve policy
  • replay the webhook payload for that override locally
  • see the add-is now enabled, and we sent another email to the developer saying so (nothing more to the reporter)

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 marked this pull request as ready for review November 6, 2024 15:40
@eviljeff eviljeff requested review from a team and diox and removed request for a team November 6, 2024 15:40
@eviljeff eviljeff merged commit e4edcab into mozilla:master Nov 8, 2024
31 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]: verify Cinder override decisions work as expected
2 participants