You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The purpose of the refactoring was to address many issues arising from the old assets management code:
uBO can now change the underlying URL of a stock filter list seamlessly, without having to change the subscription itself (what I referred to as "technical debt" in this pull request).
Stock filter lists (and other assets such as the Public Suffix List) can now be given more than one URL as to where the resource must be fetched. This hardens uBO if ever a specific remote server stops responding -- uBO will fall back on alternative URL(s) if any.
uBO will now respect the Expires: directive in Adblock Plus-compatible filter lists, if present. However the minimal interval is set to 2 days.
uBO no longer uses checksums.txt resource hosted on GitHub to find out whether some specific assets have changed: the update logic is now completely time-based.
checksums.txt will be deprecated and will no longer be updated. Eventually in some future it will be removed from the repository.
You can view the list of all stock assets in uBO in assets/assets.json, which is itself an update-able asset from uBO's point of view.
The setting assetsBootstrapLocation can be used by derivative works of uBO to provide a different set of stock assets, including which filter lists should be enabled by default at install time. There is also a corresponding setting assetsBootstrapLocation which can be used by admins to tell uBO what are the stock assets and which filter lists are enabled by default at install time.
assets/ublock/filter-lists.json will be deprecated and will no longer be updated. Eventually in some future it will be removed from the repository.
The transition to the new asset management code is seamless from the user point of view, i.e. uBO 1.10.5b10 is backward compatible.
1.11.0 (release version of current beta) will also be forward compatible for a limited time ("forward compatible" means one can load newer uBO data in older versions of uBO -- mostly useful to beta testers). This forward compatibility will be removed once 1.11+ is widespread (being forward compatible requires uBO to duplicate data structures in its storage).
The auto-updater has also been refactored (simplified), and as a result the manual update has changed: there is no more modal widget when manually launching an update operation from the dashboard. Manually launching an update operation merely launches the execution of the exact same code used by auto-updater except with tighter timings.
Various notes:
The "3rd-party filters" pane in the dashboard now renders incrementally (whereas before the lists of filter lists was re-generated from scratch in the DOM).
Various "hidden" settings have been added to enable the customization of the assets updater timings (see "Advanced settings").
That makes sense. I just thought whoever uploads the list can decide how much load they want to have on their server by updating the Expires: directive. They're still under control even if uBO accepted shorter intervals, right?
can I still force an update of ublock-resources by updating another ublock-list?
No resources.txt won't be marked as out-of-date if purging one filter list. I hadn't thought of this case.
What I could do is to automatically mark resources.txt as out of date when purging "uBlock filters", since this is the filter list which relies the most on resources.txt.
The removed code was quite old, and was about how user filters were
persisted before/after uBO version 1.11, related to the following
issue:
- #2314
The assets storage refactoring was released in:
- https://github.com/gorhill/uBlock/releases/tag/1.11.0
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.
This fixes the following issues: #2281, #2037, #1961, #1749, #1429, #1293, #1275, #344.
The purpose of the refactoring was to address many issues arising from the old assets management code:
Expires:
directive in Adblock Plus-compatible filter lists, if present. However the minimal interval is set to 2 days.checksums.txt
resource hosted on GitHub to find out whether some specific assets have changed: the update logic is now completely time-based.checksums.txt
will be deprecated and will no longer be updated. Eventually in some future it will be removed from the repository.assets/assets.json
, which is itself an update-able asset from uBO's point of view.assetsBootstrapLocation
can be used by derivative works of uBO to provide a different set of stock assets, including which filter lists should be enabled by default at install time. There is also a corresponding settingassetsBootstrapLocation
which can be used by admins to tell uBO what are the stock assets and which filter lists are enabled by default at install time.assets/ublock/filter-lists.json
will be deprecated and will no longer be updated. Eventually in some future it will be removed from the repository.