Merge lp:~jtv/launchpad/bug-435699 into lp:launchpad/db-devel
Proposed by
Jeroen T. Vermeulen
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | not available | ||||
Proposed branch: | lp:~jtv/launchpad/bug-435699 | ||||
Merge into: | lp:launchpad/db-devel | ||||
Diff against target: |
82 lines 2 files modified
lib/lp/translations/model/potemplate.py (+4/-0) lib/lp/translations/tests/test_autoapproval.py (+32/-8) |
||||
To merge this branch: | bzr merge lp:~jtv/launchpad/bug-435699 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | release-critical | Approve | |
Michael Nelson (community) | code | Approve | |
Review via email: mp+12338@code.launchpad.net |
To post a comment you must log in.
= Bug 435699 =
To fix crashes in the translations auto-approver last cycle, I rewrote getPOTemplateBy PathAndOrigin. Where the old version would
POTemplateSet.
crash if multiple templates matched (which happened rarely, fortunately)
the new version detected the condition and logged it.
Now, post-rollout, I find that it logs far too much. As it turns out,
the new version forgets to match on distroseries, so any template that
exists unchanged between Ubuntu releases will seem to have multiple
matches!
This branch fixes that. A test broke in the process, but that seems to PathAndOrigin. To stay faithful
be from using a fixed name for a package, and then not _passing_ the
distroseries argument to getPOTemplateBy
to the known interface, which does not require the distroseries argument
(even if it's probably always given in practice), I fixed it by using a
unique name for the package.
What I test for is not the logging, but the more serious consequence of
the condition that's beeing seen (and logged) where it isn't supposed to
be: multiple matches mean that templates are not found, and so uploads
are not approved.
Test:
{{{
./bin/test test_autoapproval
}}}
No lint.
Jeroen