NPM dependency proxy: metadata cache update background job
🔥 Problem
The NPM dependency proxy will leverage the metadata caches to store the the metadata content from the remote files.
The problem is that this content contain links to the tgz
files. This links are pointing to the remote registry (as it should be).
However, when using the dependency proxy, those links should point to the dependency proxy.
🚒 Solution
- Create a background job that will:
- take a metadata cache id and the dependency proxy settings.
- read the metadata cache content.
- update all the
tgz
links to the dependency proxy url. - update the metadata content on the object storage file.
- Gate the changes behind a feature flag