Support uploading stash/filter from multiple block types #22884
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.
Relates to: mozilla/addons#15014
Description
Adds support for uploading filters and stashes simultaneously as well as supporting soft/hard filters.
Context
Supporting #22828
Testing
Setup
enable-soft-blocking
andblocklist_mlbf_submit
waffle switchsrc/olympia/constants/blocklist.py
See the test scenarios
Now you can call the
_blocked_addon
method to create an addon with block/version of the specified type.Ex:
This PR will not change any of the existing behavior so you expect to see a new stash record if >0Replace threshold changes, also if new filter expect previous stashes to be deleted.
Force recreate
First force recreate the filter
Expect only an attachment record, regardless of what was there before.
Create a stash
Create one new block
Expect a stash record uploaded
Repeat, expect another stash record
Repeat, now expect a new filter and all stashes deleted.
You can create as many soft blocks at any point in this flow and it should have zero impact.
Checklist
#ISSUENUM
at the top of your PR to an existing open issue in the mozilla/addons repository.