Merge lp://staging/~jtv/launchpad/bug-539499 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: not available
Proposed branch: lp://staging/~jtv/launchpad/bug-539499
Merge into: lp://staging/launchpad
Diff against target: 21 lines (+3/-1)
1 file modified
lib/lp/translations/model/translationtemplatesbuildjob.py (+3/-1)
To merge this branch: bzr merge lp://staging/~jtv/launchpad/bug-539499
Reviewer Review Type Date Requested Status
Abel Deuring (community) code Approve
Review via email: mp+21637@code.staging.launchpad.net

Commit message

Fix broken slave build id in TranslationTemplatesBuildJob.

Description of the change

= Bug 539499 =

This is a quick interim fix.

TranslationTemplatesBuildJob.getName was meant to produce a slave build id based on branch name and BuildQueue id. TranslationTemplatesBuildBehavior.verifySlaveBuildID checked it for consistency.

Unfortunately getName accidentally used Job.id—a stupid mistake but not unthinkable given the complexity of the build-farm infrastructure. In fact I had been pushing to ditch the whole system of getName/verifySlaveBuildID specializations in favour of a single pair of consistent functions for this.

In case you're wondering where the test is: it's in lib/lp/translations/tests/test_translationtemplatesbuildbehavior.py: test_verifySlaveBuildID_success. It's the perfect setup for detecting this problem. It failed to fail only because when that particular test ran, the Job.id happened to be the same as the BuildQueue.id. (As a test with a temporarily hacked-up extra check confirms).

Instead of hacking up a kludge to protect the test against failure to detect just this specific mistake, I propose I go in and clean up the entire getName/verifySlaveBuildID setup. We need a single pair of implementations using a hash of BuildQueue.id and a few other properties, as discussed on launchpad-dev. It's both safer and easier.

Jeroen

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

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.