Skip to content

Fixes EE-297 - Read parameters from file when adding a subscription

Pedro Diogo Machado requested to merge ee-297-reading-last-modified into master

When adding a new subscription, we currently read the "diffUrl" and "expires" from the recommendations file. At the same time, we also need to read the entire subscription file to add all the non-dnr filters to the engine. These subscription files also contain the "diffUrl", "expires" and "last modified" in their header. This MR adds the "last modified" field to the list of parameters we extract from the subscription file header and adds all these parameters to the subscription object without needing to read them from the recommendations.

This new approach makes it unnecessary to add these parameters to the recommendation files, we can possibly even remove the part of the code in the scripts that was dealing with these parameters.

This means:

  • shorter and simpler recommendation file
  • simpler scripts
  • if new header parameters become relevant, we will not need to update scripts and recommendation file
  • the subs-convert script won't need to rewrite the recommendation file anymore, which is annoying for the adblock release process as Thomas said in this slack message
  • overall less complexity

Merge request reports