mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
124 stars 53 forks source link

[Task]: send enforcement action to cinder api when notifying about a decision #14778

Closed eviljeff closed 2 weeks ago

eviljeff commented 3 weeks ago

Description

resolves https://mozilla-hub.atlassian.net/browse/AMO2-592

Currently, decisions taken by AMO internal review tool are sent to Cinder via create_decision API call. Cinder has updated this call to accept enforcement_action_slugs in addition to policy_uuids. See new docs. So we can now independently specify the Enforcement Actions in a decision. This is needed for Transparency Reporting purposes.

Acceptance Criteria

### Acceptance Criteria
- [x] api call to cinder includes `enforcement_action` too.
- [x] add amo-reject-version-addon (and -warning variant) actions to cinder stage
- [x] add amo-reject-version-addon (and -warning variant) actions to cinder prod### Checks

┆Issue is synchronized with this Jira Task

ioanarusiczki commented 2 weeks ago

I think I should look around reported extensions or themes that are reviewed from AMO. Probably the same for https://github.com/mozilla/addons/issues/14779 ?

eviljeff commented 2 weeks ago

For this issue:

I'll comment in #14779

ioanarusiczki commented 2 weeks ago

Still looking around, I finally have the expected results but I don't know why I didn't get this for my first 2 tests.

reject for an extension https://stage.cinder.nonprod.webservices.mozgcp.net/investigate/amo_addon/630843/decisions?filters=%7B%7D reject for an escalated theme https://stage.cinder.nonprod.webservices.mozgcp.net/investigate/amo_addon/630844/decisions?filters=%7B%7D

eviljeff commented 2 weeks ago

@ioanarusiczki not all the policies are set/linked up on dev/stage, but that's not a new problem. That the enforcement action is sent is this issue.

ioanarusiczki commented 2 weeks ago

Yeah I tried again for an extension , reporting it for add-on policies with location inside the add-on so it's flagged for rev tools then I rejected a version, also tried disabling it and I see the actions in the Decision tab

https://stage.cinder.nonprod.webservices.mozgcp.net/investigate/amo_addon/630845/decisions?filters=%7B%7D

I have 2 ids which didn't get the information https://stage.cinder.nonprod.webservices.mozgcp.net/investigate/amo_addon/630841/decisions?filters=%7B%7D https://stage.cinder.nonprod.webservices.mozgcp.net/investigate/amo_addon/630842/decisions?filters=%7B%7D and I've no idea why yet, I remember assigning the job from the infringement queue but not sure that would have to do with anything.

ioanarusiczki commented 2 weeks ago

I get the Enforcement Action in Decisions tab now for reject "AMO Reject Version (Addon)", disable "AMO Disable Addon" and clear human review as "AMO Approve" (used when reporter is notified that the content won't be disabled) https://stage.cinder.nonprod.webservices.mozgcp.net/investigate/amo_addon/630846/decisions?filters=%7B%7D

Force-enable and Approve actions from rev tools are not present here. Not sure if it's expected so let me know if you need a followup.

eviljeff commented 2 weeks ago

@ioanarusiczki force-enable and approve actions should be present too - can you file a follow-up?

eviljeff commented 2 weeks ago

@ioanarusiczki force-enable and approve actions should be present too - can you file a follow-up?

fwiw, I think sentry bot already picked this up as https://mozilla.sentry.io/issues/5348822972/

ioanarusiczki commented 2 weeks ago

@eviljeff I've no access to sentry but I filed it https://github.com/mozilla/addons/issues/14788