mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
127 stars 41 forks source link

[Task]: Reduce the amount of static files in site-static/ for addons-server #15183

Open bqbn opened 1 day ago

bqbn commented 1 day ago

Description

Starting from early September 2024, the addons-server has begun to put tens of thousands of files in its site-static directory. Consequently, we are currently uploading over 15,000 files to Google Cloud Storage (GCS) during each deployment, 99% of which are never accessed.

The goal is to optimize the site-static directory by retaining only the essential files. This optimization would offer several advantages, such as:

The task is to devise a strategy for managing the directory contents more efficiently, ensuring that we only upload what is necessary to our infrastructure.

Acceptance Criteria

Retain only the truly essential files in the site-static directory.

Checks

┆Issue is synchronized with this Jira Task

diox commented 1 day ago

This was caused by https://github.com/mozilla/addons-server/pull/22613 and the introduction of django-node-assets to replace our custom copying of files.

Maybe we could still use django-node-assets with a custom finder to avoid exporting so many useless files (from all our node_modules/) to site-static/ ...