-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Task]: Generate separate bloomfilter for soft-blocks #15014
Comments
@diox while the base (full) bloom filter should be a distinct attachment, we'd want to have a single stash with both the hard and soft blocks. Something like this: {
"stash": {
"blocked": [
"[email protected]:1.1",
"[email protected]:1.2"
],
"softblocked": [
"[email protected]:1.3"
],
"unblocked": [
"[email protected]:1.0"
]
},
"key_format": "{guid}:{version}",
"stash_time": 1587990900999,
} |
@willdurand do we have an understanding of the data structure expected by FX? Does it match the json structure you've presented above? |
Yeah, it does match the json structure above. |
I tried on dev today got to scenario 5 (had some issues about dicts, lang packs that needed to be clarified so I interrupted this) All looked good until scenario 5. I am not sure why I've a guid at 3 [email protected]:4.4.3 (dictionary) config set to 2, I've made 2 restrictions for later edit it's #15214 |
Yes, and FTR the collection looks like this: {
"data": [
{
"schema": 1732887589439,
"attachment": {
"hash": "5ffacca4d39196f792956f7733ecc421a4b916126572fefdd169de34c85fff75",
"size": 1845,
"filename": "filter.bin",
"location": "staging/addons-bloomfilters/fcda007e-3a9f-4b4e-a4b6-82c034987905.bin",
"mimetype": "application/octet-stream"
},
"key_format": "{guid}:{version}",
"attachment_type": "bloomfilter-base",
"generation_time": 1732892587553,
"id": "707dc060-839c-4212-941b-d39285f8a5ae",
"last_modified": 1732892593067
},
{
"stash": {
"blocked": [],
"unblocked": [],
"softblocked": [
"{20a53c5d-b1b9-4098-956b-cdb1ec429992}:2.0",
"{ff4177a2-f967-469f-a9e0-ccb4fe21ae89}:2.0"
]
},
"schema": 1732892592675,
"key_format": "{guid}:{version}",
"stash_time": 1732892587553,
"id": "59585b7a-6d22-4df0-89a0-74ada37006fa",
"last_modified": 1732892593064
},
{
"schema": 1732882989019,
"attachment": {
"hash": "f9c5e9d82d880709c79d466a7b4dca68cb369922f425f883a053834f74dc8c47",
"size": 2334,
"filename": "filter.bin",
"location": "staging/addons-bloomfilters/3fb3e734-6c3b-409c-be60-b9eab44994a7.bin",
"mimetype": "application/octet-stream"
},
"key_format": "{guid}:{version}",
"attachment_type": "softblocks-bloomfilter-base",
"generation_time": 1732887584214,
"id": "c16628a5-fe0e-4fff-a3c6-848126cea627",
"last_modified": 1732887589318
},
{
"stash": {
"blocked": [
"[email protected]:4.4.3"
],
"unblocked": [],
"softblocked": []
},
"schema": 1732887589012,
"key_format": "{guid}:{version}",
"stash_time": 1732887584214,
"id": "2a1df6c6-7f27-43a0-aafe-2e95f3d5206d",
"last_modified": 1732887589315
}
]
} |
I am not sure of any of the test results I got today, and confused about some scenarios
When I soften a hard block shouldn't I be expecting(4) instead of (2) ?
I think here's expecting(2) ?
What's the exact str? or it's delete a block/restriction |
@ioanarusiczki I updated the description. I hope this helps make the scenarios more clear. I was trying to save space/time with the addition logic but I think that led to mistakes and confusion. |
Tried yesterday 1-4 I think it should be alright. What got me confused was that sometimes there were old stashes not deleted (thing in which I've run again today, but it's a known issue) I'm going to set back to 5000 the config on dev. I keep having remote settings errors yet the changes made on the extensions are there after the sync. -> maybe I should ping again someone from remote settings |
cc @willdurand I'm not sure if these signature errors are in scope for us or if they are maybe a part of the changes you had mentioned in remote settings? |
These errors seem to be unrelated. |
Description
Depends on #15012
Once the backend for soft-blocking is done, we want to be able to generate a separate bloomfilter for soft-blocks and make it have its own set of stashes. The "original" bloomfilter and stashes for blocks should then only consider hard-blocked version as blocked.
Acceptance Criteria
Milestones/checkpoints
Scenarios
The following are some of the edge cases that we ran into during development. All of these should be run in dev/stage to ensure we produce the expected stash/filter records in remote settings. Some scenarios are the sum of other scenarios.
Prerequisites:
blocklist_base_replace_threshold
and set the value to a low number e.g. 2For each scenario:
1. add enough hard blocks to recreate hard block filter
bloomfilter-base
filter in remote settingsattachment_type
to be deleted2. add enough hard block to create a stash, but not a filter
Note
'stash_time' should match the time at which we ran the cron
3. add enough soft blocks to recreate a soft block filter
softblocks-bloomfilter-base
filter in remote settingsattachment_type
to be deleted4. add enough soft blocks to create a stash, but not a filter
Note
'stash_time' should match the time at which we ran the cron
5. Add enough hard blocks to create a new filter + add not enough soft blocks to create a new filter (hard filter + soft stash)
For the hard block:
bloomfilter-base
filter in remote settingsattachment_type
to be deletedFor the soft block:
stash_time
andgeneration_time
of the filter and stash should match6. Add not enough hard blocks to create a new filter + add enough soft blocks to create a filter (hard stash + soft filter)
For the hard block:
stash_time
andgeneration_time
of the two records should matchFor the soft block:
softblocks-bloomfilter-base
filter in remote settingsattachment_type
to be deleted7. soften not enough hard blocks to create a new soft filter (soft stash)
Note
You don't expect the block to be included in the notblocked list, only the softblocked
8. soften not enough hard blocks to create a new filter + add not enough soft blocks to create a new filter (soft stash)
9. harden not enough soft blocks to create a new soft filter (hard stash)
10. harden not enough soft blocks to create a new soft filter + add not enough hard block to create a new filter (hard stash)
11. Delete a block, update the block list, and recreate the same block
STR:
Note
This should work for any combination of hard and soft blocks assuming you do not reach either threshold for recreating the given filter
Checks
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: