Merge lp:~jtv/launchpad/bug-358404 into lp:launchpad
Proposed by
Jeroen T. Vermeulen
Status: | Merged |
---|---|
Approved by: | Jeroen T. Vermeulen |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~jtv/launchpad/bug-358404 |
Merge into: | lp:launchpad |
Diff against target: |
52 lines 2 files modified
lib/lp/translations/doc/translationimportqueue.txt (+9/-5) lib/lp/translations/model/translationimportqueue.py (+1/-2) |
To merge this branch: | bzr merge lp:~jtv/launchpad/bug-358404 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Eleanor Berger (community) | Approve | ||
Review via email: mp+12430@code.launchpad.net |
To post a comment you must log in.
= Bug 358404 =
This bug just rose in relevance after an unknown number of Translations changed" property on the entries was not updated during
import queue entries got approved for import into the wrong templates.
We found out about the problem within hours, and it would have been easy
to identify the exact queue entries that had the problem. But because
the "date_status_
approval or import, and because the entries were old, the cleanup that
was supposed to have removed them 3 days after import deleted them
instantly instead.
Here's a branch to change that. We had already isolated the setting of
an entry's status into a setStatus method (mostly to simplify API work),
and that is the perfect place to update the date_status_changed as well.
One test was updated very slightly. The reason is relatively complex:
two of these dates were being compared, but the one that was supposed to
be further into the past is getting an extra "refresh" from this change.
In addition, the timestamp used is the beginning of the current database
transaction. Consequently the clock doesn't advance between actions in
the same transaction, and this contributed to the "older" date not being
further in the past than the "newer" one.
I fixed this with an extra commit, and took the opportunity to add a
check around just the setStatus() call.
Tests: rtqueue
{{{
./bin/test -vv -t translationimpo
}}}
For Q/A, pick an entry on the import queue (/+imports) that is at least approve- imports. py to execute the cleanup.
3 days old, and is in a Needs Review state. Approve it. Wait for the
import to occur (watch it go to Imported, which means it should be
cleaned up after three days), and then wait for an hour or two more to
let the cleanup process run. Or if we're talking launchpad.dev, import
the file by running the rosetta-poimport.py cron job; and then run
rosetta-
The cleanup will clean up the entry 3 days after the import attempt,
not 3 days after the upload.
No lint.
Jeroen