Skip to content

add tasks that submit new addons and changes for content review to cinder#24642

Merged
eviljeff merged 3 commits intomozilla:masterfrom
eviljeff:15969-submit-content-review-to-cinder-task
Mar 24, 2026
Merged

add tasks that submit new addons and changes for content review to cinder#24642
eviljeff merged 3 commits intomozilla:masterfrom
eviljeff:15969-submit-content-review-to-cinder-task

Conversation

@eviljeff
Copy link
Copy Markdown
Member

@eviljeff eviljeff commented Mar 23, 2026

Fixes: mozilla/addons#15969

Description

Adds tasks for submitting an add-on submission to Cinder for content review; and for content changes. Most of the work is in the Cinder entity classes that send an event to a workflow.

Context

See Cinder for the workflow. We will need to replicate this on Cinder prod before the tasks will work there (workflows can be exported and imported, afaik)

I'm in communication with the Cinder developers about what the queue job page displays, because currently the metadata we send is somewhat hidden away. If we have to make changes to what/how we send the event we can file a follow-up.

Testing

  • identify an add-on you have locally. The testing will be more clean if the pk of add-on you report does not already have an open job in the queue. Close the job if the add-on has a job in the queue.
  • (make sure your CINDER_API_TOKEN is defined in local_settings)
  • to test initial content review: in a django shell,
    • from olympia.abuse.tasks import submit_addon_for_content_review
    • submit_addon_for_content_review(addon_pk=xxx)
    • there should be no output if the call succeeds
  • check in the cinder queue - there should be a new job for the add-on
    • in the job the add-on will show a "report" with the reasoning "add-on submission"
  • identify a metadata change activity log instance (ActivityLog.objects.filter(action=208)). Again, this will be cleaner if the job doesn't already exist, so clean up any open job for an add-on with the same pk.
  • to test metadata change content review: in a django shell,
    • from olympia.abuse.tasks import submit_addon_change_for_content_review
    • submit_addon_change_for_content_review(activity_log_id=xxx)
    • there should be no output if the call succeeds
  • check in the cinder queue - there should be a new job for the add-on
    • in the job the add-on will show a "report" with the reasoning "add-on YYY change", where YYY is the field that was changed in the EDIT_ADDON_PROPERTY activity.
    • The main review page should show the current metadata values, and the relationships tab should show the values added and changed for that field. (you might need to customize the table options to show those values - also part of the conversion with the Cinder folks)

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 15969-submit-content-review-to-cinder-task branch from ef9b3c4 to 51ceb0e Compare March 24, 2026 10:08
@eviljeff eviljeff changed the title 15969 submit content review to cinder task add tasks that submit new addons and changes for content review to cinder Mar 24, 2026
@eviljeff eviljeff marked this pull request as ready for review March 24, 2026 10:36
@eviljeff eviljeff requested a review from diox March 24, 2026 10:55
@diox
Copy link
Copy Markdown
Member

diox commented Mar 24, 2026

submit_addon_change_for_content_review(activity_log_id=xxx)

submit_addon_change_for_content_review(activity_log_pk=xxx)

@eviljeff eviljeff merged commit dc436df into mozilla:master Mar 24, 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]: Add task that submits add-on for content review to Cinder

2 participants