-
Story
-
Resolution: Done
-
Normal
-
None
-
3
-
False
-
-
False
-
None
-
Unset
-
None
-
-
-
Plat-Ex Services Sprint 37, Plat-Ex Services Sprint 38
In order to enable persistent cache, we need to upload frontend resources to S3/minio - this will run inside of a container as a job (similar to our current cachebuster).
We should use a kubernetes Job. Similar to https://github.com/RedHatInsights/frontend-cache-bust - however this job will take the frontend assets and upload to s3/minio.
The new job should:
- Push assets into an S3/Minio bucket, in a folder representing a namespace for that app/build using the following structure:
data/<app_name>/<filepath>
- and creates manifest of all files created/updated during that build, in (this is NOT fed-modules - this is a new manifest with all possible files/assets uploaded)
manifests/<app_name>/<build_timestamp_in_secs>
- to allow for efficient cache pruning and management. This is a net new resource that is created by the population tool and is a JSON formatted list of all filepaths in S3 that were written during that population.
- fed-mods.json is always copied last, as it is the entrypoint to newer resources and is lightly cached, to avoid the problem of trying to load assets for a new manifest without all resources being available.
- The Job also cleans up aged-out assets for its own app namespace following the logic below:
- Manifests older than the threshold age are collected and the filepaths aggregated for deletion.
- Manifests newer than the threshold age are collected and filespaths removed
See https://docs.google.com/document/d/195I9HLu91PGUH5jtaRDdiW-TZi7QLVaTnrgvmo8hxXg/edit?tab=t.0 for more info
Pete's tool: https://github.com/RedHatInsights/valpop/