Merge lp:~sinzui/launchpad/reimport-inactive-templates into lp:launchpad
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | j.c.sackett on 2012-11-01 | ||||
| Approved revision: | no longer in the source branch. | ||||
| Merged at revision: | 16223 | ||||
| Proposed branch: | lp:~sinzui/launchpad/reimport-inactive-templates | ||||
| Merge into: | lp:launchpad | ||||
| Diff against target: |
168 lines (+85/-1) 6 files modified
lib/lp/translations/interfaces/potemplate.py (+14/-1) lib/lp/translations/model/approver.py (+9/-0) lib/lp/translations/model/potemplate.py (+19/-0) lib/lp/translations/tests/test_potemplate.py (+14/-0) lib/lp/translations/tests/test_translationbranchapprover.py (+12/-0) lib/lp/translations/tests/test_translationbuildapprover.py (+17/-0) |
||||
| To merge this branch: | bzr merge lp:~sinzui/launchpad/reimport-inactive-templates | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| j.c.sackett (community) | 2012-10-31 | Approve on 2012-11-01 | |
|
Review via email:
|
|||
Commit Message
Do not recreate inactive translation templates.
Description of the Change
I created OOPS-91882635e8551f53a0bd423d85dadcd5 while investigating
question #211684. The series has inactive templates
https:/
and translation syncing is not seeing the two new POTS. I requested a
one-time import to see if a rescan would find the missing pots. Instead
the log shows an oops because org.openteacher
inactive.
IntegrityError: duplicate key value violates unique constraint
DETAIL: Key (productseries, name)=(40409, org.openteacher
already exists
-------
RULES
Pre-
* POTemplates are unique to (productseries, name) and
(
POTemplat
* Calls to new() assumes that the set represents the full
set of templates in a series, but since the set can be initialised
with iscurrent=True, all the inactive POTemplates are ignored.
* A bug was fixed 2 years ago that requires the set to iscurrent=True
to properly work with the found files, but the calls to make new
POTemplates still think the set is unfiltered.
* Add a guard to POTemplateSubse
series-
ensure we see the TB, not the Postgresql transaction error.
* POTemplateSubse
and each call is using a different strategy to determine if it
must create a new template. Some strategies do not know the name
unitl late in the process.
* Before calling new(), the code must check if the proposed series,
package, name combination exists and choose an exit strategy if
it does.
QA
* Visit https:/
* Choose "Change synchronization settings", then
"You can request a one-time import.", then "Request a one-time import"
* Ask a webops to run cronscripts/
* Ask for the output of check there there is no oopse for "teacher".
LINT
lib/
lib/
lib/
lib/
lib/
lib/

Looks good. Thanks, Curtis.