sync_projects currently only creates/updates stats objects for locales that have translation updates. This excludes locales that only have creations. On prod, we ran into this issue when a new file was added to the Mozilla.org project; all locales except for en-GB had a Stats object created for the new file. I was able to replicate the missing stats object locally, but it was for every locale, not just en-GB. I suspect that the other locales had other updates during the sync where this was created that triggered their stats objects to be created. I think the solution here is to just always update stats objects after syncing, even if there were no updates. Stat creation probably isn't a huge bottleneck (and if it is I don't think an optimized stat creation routine would be slow anyway), and having sync always create/update makes the sync process self-correcting in case the data ever gets wrong for whatever reason.
The Stats object wasn't created only for thunderbird/features.lang resource and the following locales: bn-IN, en-GB, he, kn, ko, gu-IN, bn-BD, zh-CN Stats were created for the following locales: fr, rm, sr, pt-BR, uk, cs, es-AR, ro, sl I confirmed that locales stats were created for had the resource already partially translated. I agree with the proposed solution of updating Stats objects for all locales enabled for a project (which is what the old script did too).
Commit pushed to master at https://github.com/mozilla/pontoon https://github.com/mozilla/pontoon/commit/d5b65be10f407c1d8e95296627eed7b253ad79f6 Fix bug 1198106: Update all stats during sync.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.