Merge lp:~jtv/launchpad/db-bug-435655 into lp:launchpad/db-devel
Proposed by
Jeroen T. Vermeulen
Status: | Merged |
---|---|
Approved by: | Brad Crittenden |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~jtv/launchpad/db-bug-435655 |
Merge into: | lp:launchpad/db-devel |
Diff against target: |
108 lines 3 files modified
lib/lp/translations/doc/translations-export-to-branch.txt (+0/-1) lib/lp/translations/scripts/tests/test_translations_to_branch.py (+6/-1) lib/lp/translations/scripts/translations_to_branch.py (+23/-2) |
To merge this branch: | bzr merge lp:~jtv/launchpad/db-bug-435655 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | release-critical | Approve | |
Michael Nelson (community) | code | Approve | |
Review via email: mp+12333@code.launchpad.net |
To post a comment you must log in.
= Bug 435655 =
This branch fixes critical breakage in the translations- to-branch export
script.
In 3.0 we gave this script the ability to skip exports for POFiles in a
branch that hadn't changed since their previous export run. This change
broke because the timestamp on the bzr revision that we got this
information from is not a datetime. It's a float representing seconds
since the epoch, UTC-based.
As it turns out there was a test that exercised this code, and it did
trigger the exception, but since it happened in a script run and was
handled there, the exception did not propagate into the test. Explicit
checks of the script run's results were needed.
I had to do some reverse engineering to figure out the details. As it
turns out, even the bzr experts did not know exactly how to interpret
and convert the timestamp.
You may notice that I also made the script avoid its commit when there
are no changes. This is mostly duplicative of a similar check further
down the call tree, in DirectBranchCommit. But it also circumvents the
check for commit conflicts, which simplifies the tests. Otherwise, I'd
either have to patch up the last_scanned_id for the branch object, or
let the test spit out a "branch has changed" error when it's really not
supposed to change anything in the branch anyway.
Test: *to.branch
{{{
./bin/test -vv -t translations.
}}}
Q/A is difficult, since this script must run on the codehosting server
where the branches are hosted. This pretty much rules out staging.