Closed Bug 1198106 Opened 9 years ago Closed 9 years ago

sync_projects does not create stats objects for locales with no updates

Categories

(Webtools Graveyard :: Pontoon, defect)

defect
Not set
normal

Tracking

(firefox43 affected)

RESOLVED FIXED
Tracking Status
firefox43 --- affected

People

(Reporter: osmose, Assigned: osmose)

Details

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).
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.