Merge lp://staging/~jtv/launchpad/bug-409686 into lp://staging/launchpad

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: no longer in the source branch.
Merged at revision: 10941
Proposed branch: lp://staging/~jtv/launchpad/bug-409686
Merge into: lp://staging/launchpad
Diff against target: 356 lines (+205/-15)
4 files modified
lib/lp/translations/doc/translations-export-to-branch.txt (+57/-8)
lib/lp/translations/emailtemplates/unpushed-branch.txt (+38/-0)
lib/lp/translations/scripts/tests/test_translations_to_branch.py (+68/-4)
lib/lp/translations/scripts/translations_to_branch.py (+42/-3)
To merge this branch: bzr merge lp://staging/~jtv/launchpad/bug-409686
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+26179@code.staging.launchpad.net

Commit message

Notify owners of unpushed translations branches.

Description of the change

= Bug 409686 =

The Code UI unfortunately allows users to "register" a branch without populating it. From the Launchpad database's point of view, this is a perfectly good branch. From bzr's point of view, it just doesn't exist. With our daily translations exports to bzr branches, this situation has been showing up in logs as NotBranchError exceptions. I've been notifying these people of the problem by hand, but I got tired of it and the LOSA team got sick of looking at the log output on error-reports.

Here's a fix that catches this condition, logs it separately from "real" errors, and notifies the branch owner by email. (The branch owner is normally also the project owner; where they're not the same, it's the branch owner who should perform the necessary bzr steps). The branch owner will be receiving this every day, hopefully pushing towards a rapid resolution.

We won't be able to Q/A this on staging, beyond ensuring that the script doesn't break altogether. On production, we can pick a translatable project and temporarily enable translations exports to a branch we registered ourselves (but did not push to the server). Of course we'll also want to make sure that the regular exports still work as well.

To test:
{{{
./bin/test -vv -t 'translations.*to.branch'
}}}

No lint.

Jeroen

To post a comment you must log in.
Revision history for this message
Abel Deuring (adeuring) wrote :

Hi Jeroen,

a nice branch. Just one remark:

Reading

> + bzr launchpad-login LOGIN
> +
> +Instead of LOGIN, type your Launchpad login name. Then:

raised a mental parser warning for me. This may be due to an undercaffeinated brain, but "...login LOGIN" looks a bit odd. What about "bzr launchpad-login your-launchpad-user-name" instead?

review: Approve (code)
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Thanks. Replaced with USERNAME as per IRC.

Revision history for this message
Robert Collins (lifeless) wrote :

Rather than unpushed, I suggest calling them 'neverpushed' - its a bit
clearer IMO.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.