Open liammulh opened 1 year ago
We now have a flush report object route and GUI (under the admin panel). If we discover incorrect stats, we should flush the incorrect report object(s). This route flushes the stats for a locale/sim combination from the report object cache in Rosetta's memory.
Long-term, it would be nice to pin down exactly what might be going wrong with the stats updates.
If you translate a common string, do all sims that have the common string have a "(pending update)" badge?
No, if you translate a common string, the sim that was translated will have a "(pending update)" badge, and (I think) the sims that share strings with it will have a "(pending update)" badge. The other sims that share the common string will not get a "(pending update)" badge.
@jbphet and I discussed flushing the whole translation report for a locale if a common string is translated in that locale. There are two big drawbacks to this approach:
Occasionally restarting Rosetta to deploy new patches and features has been (we think) working reasonably well so far. If @jbphet is going to put Rosetta on the back burner, it might make sense to have a cron-job that restarts Rosetta every once in a while? Or perhaps it would make sense to provide a button that reloads the stats for a given sim? Kind of like the "pull" button on phettest? I don't think we'd want to provide the users with a button that reloads a whole translation report because they might click it a lot, and we are limited on GitHub API requests.
Right now the behavior seems incorrect. @KatieWoe pointed this out to me in her testing of https://github.com/phetsims/qa/issues/931.
I think it would be a good idea to break this problem down into smaller problems:
When does the "(pending update)" badge appear?
How long does it take for the stats to update?
At this point, the only bottleneck for having perfectly up-to-date translation stats is the build server. We can get fresh sim metadata (since we bust the cache) and we can get fresh GitHub data (since we are now using Octokit).