Closed Bug 1395490 Opened 9 years ago Closed 9 years ago

Fix KeyError on sync if changes are made after repos have been pulled

Categories

(Webtools Graveyard :: Pontoon, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mathjazz, Unassigned)

Details

There are two cases that lead to a KeyError in VCSResource constructor's for locale in locales loop: 1. A regression from bug 1383252: if changes are made to a locale during sync - after the "pull phase" - and we haven't pulled that locale. 2. An old bug: if a new locale is enabled for a project during sync - after the "pull phase". Note: the bug does not cause destructive changes: it breaks the project sync which then completes on the next run. However, if new source strings are added and the error occures, we hit bug 1383271.
Commit pushed to master at https://github.com/mozilla/pontoon https://github.com/mozilla/pontoon/commit/250eb63a981656da96435ed4b572bbd346720fb3 Fix bug 1395490: fix KeyError on sync (#694) When detecting changed resources, only take into account changes made before the sync job started. Otherwise we might end up trying to sync locales we didn't pull files for, which will lead to KeyError in VCSResource constructor's for locale in locales loop. This is a regression from bug 1383252. That same error is also thrown when a new locale is enabled for a project during sync - after the "pull phase". We fix it by checking that all locales identified as needing sync have been pulled. This is an old bug we never fixed. Note: None of these two bugs is causing destructive changes: they break the project sync which then completes on the next run. However, if new source strings are added and the error occures, we hit bug 1383271.
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.