TheAfroOfDoom / omega-flowey-minecraft-remastered

MIT License
3 stars 1 forks source link

support stale-cache restoring in AJ export CI action #160

Closed TheAfroOfDoom closed 6 days ago

TheAfroOfDoom commented 3 weeks ago

a follow-up to https://github.com/TheAfroOfDoom/omega-flowey-minecraft-remastered/issues/81

the most common case of the AJ export cache becoming outdated will be when we update a relatively small amount of .ajblueprint files.

currently, the AJ exporter logic in CI (under the datapack/test job) will have to re-export every .ajblueprint, even if only a few actually changed


we can speed up this process significantly by utilizing our last_exported_hashes.json logic and the cache action's restore-keys field:

together, these allow us to perform a partial restore using an old cache (e.g. one where most of the AJ export files are still up-to-date).

the auto-exporter already reads last_exported_hashes.json and automatically determines what .ajblueprints it actually needs to re-export. it skips over up-to-date export files. this would decrease the auto-exporter time down from a few minutes to a few seconds (depending on how many .ajblueprint files were updated in a commit)


TODO of this ticket is to: