bobderrico80 / rhythm-randomizer-v2

Version 2 of the Rhythm Randomizer project
https://www.rhythmrandomizer.com
GNU General Public License v3.0
7 stars 2 forks source link

Updates to translation files are not automatically invalidated on CloudFront #55

Open bobderrico80 opened 3 years ago

bobderrico80 commented 3 years ago

Reproduction Steps

  1. Make an update to a translation on Google Sheets
  2. Run the S3 Deploy GH Action to redeploy the master branch
  3. Observe the translation change made

Expected Result

Actual Result

Notes

This is due to two different issues:

  1. The S3 Deploy script is only invalidating index.html. This is because it is assumed that all other files are named with a hash to indicate their version, providing automatic cache invalidation when the files' contents change.
  2. The translation.json files do not contain such a mechanism.

To address, we'll need to ensure that either (a) the translation.json files are explicitly invalidated during deploys (this might incur additional AWS costs), or (b) ensure that the translation.json file names are appropriately versioned. We'll need to investigate how to accomplish this with i18next.