Replace last_content_review_pass with content_review_status #24437
+429
−108
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#16049; precursor to mozilla/addons#15989
Description
last_content_review_passdidn't store enough information, so it's replaced with an int with EnumChoices. Also addresses a deficiency with mozilla/addons#15988 - after a content review rejection the add-on was still in the queue.Context
Mainly test changes and migration code 🤷
Technically I didn't need to differentiate a content review, and a content review triggered after a previous pass, but it seemed like data we might want at some point.
CONTENT_REVIEW_STATUSES.UNREVIEWEDis reallyNonerather than0but because of reasonsNoneis annoying to have as as valid state (e.g. you can't have it in a Subset), so we need a0state.content_review_statuswill benull=Falsein a subsequent deploy.AddonApprovalCounter.CONTENT_REVIEW_STATUSESis quite wordy.... It could be improved with mozilla/addons#16015 ... so would it be more disruptive to do this at the same time, or less? In the end I left it alone - this pr has a functional changes; whereas mozilla/addons#16015 should be functionally identical, with just code refactoring.Testing
Some of this is impossible to real-test at this point, without the ability to request a new review directly, but you can test some parts, and tinker with the states otherwise:
Checklist
#ISSUENUMat the top of your PR to an existing open issue in the mozilla/addons repository.