Translations-copying script fails

Bug #891929 reported by Jeroen T. Vermeulen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Jeroen T. Vermeulen

Bug Description

The copy-translations-from-parent.py script, used to open translations for a new Ubuntu distroseries, has a habit of failing in production after succeeding on test servers.

Here's my guess at what may be going wrong: once a POTemplate has been copied into the new series, it becomes part of an existing message-sharing equivalence class. Nowadays, new POFiles are created for all templates in an equivalence class at once. There may be circumstances where a POFile already exists in the older series, but gets created in the new series before the existing one can be copied. This breaks the copy: there already is a POFile for that template and language!

To maintain integrity of POFileTranslator, we really want the copy and not the fresh POFile — so we can't simply back off from copying the version from the previous series. And new POFileTranslator records may already refer to the fresh POFile, so we can't just delete the fresh one either. At a minimum we'd have to delete attached POFileTranslators as well.

Something similar probably holds for POFileTranslator, which is even more worrying because of the larger volume. But at least there, it's safe to skip duplicates.

Now that we no longer need to copy massive numbers of TranslationMessages for each Ubuntu opening, it may make sense to abandon MultiTableCopy altogether and re-design this whole procedure to operate on a transactional, per-template basis.

See also bug 576822 (which could have saved us some time here) and bug 778430 (which we want to keep in mind while fixing this one).

Tags: qa-ok

Related branches

Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Changed in launchpad:
assignee: nobody → Jeroen T. Vermeulen (jtv)
tags: added: qa-needstesting
Changed in launchpad:
status: Triaged → Fix Committed
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

The attached branch skips copying of POFileTranslator (ran in 4 minutes on qastaging!) and keeps unexpected POFiles in favour of their copies.

tags: added: qa-ok
removed: qa-needstesting
William Grant (wgrant)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.