Process content review decisions without a known job#24679
Open
eviljeff wants to merge 1 commit intomozilla:masterfrom
Open
Process content review decisions without a known job#24679eviljeff wants to merge 1 commit intomozilla:masterfrom
eviljeff wants to merge 1 commit intomozilla:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: mozilla/addons#16155
Description
Change the webhook handling code to not baulk at an unknown cinder job uuid, but to create a decision anyway, if the entity exists.
Context
Was originally going to be the PR for mozilla/addons#15973 but the webhook changes turned out to be substantial. (They can be reused for mozilla/addons#16052 - there's nothing that actually restricts the changes to just the content review queue)
The restriction that the created date match the add-on wasn't specified anywhere, it was just an idea I had to avoid too much cross-contamination on dev and stage. Maybe it's unnecessary? (it shouldn't happen on prod anyway)
Testing
tmp/payload.json; replay locally with./manage.py fake_cinder_webhookIf you chose the takedown policy you can also try the request new review button - a job should be opened, and if you approve the content in Cinder (and replay) it will change the add-on listing back to the previous state.
Checklist
#ISSUENUMat the top of your PR to an existing open issue in the mozilla/addons repository.