Merge lp://staging/~wgrant/launchpad/refactor-slavestatus into lp://staging/launchpad
Proposed by
William Grant
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Brad Crittenden | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp://staging/~wgrant/launchpad/refactor-slavestatus | ||||
Merge into: | lp://staging/launchpad | ||||
Diff against target: |
215 lines (+51/-70) 7 files modified
lib/lp/buildmaster/interfaces/buildfarmjobbehavior.py (+6/-4) lib/lp/buildmaster/model/builder.py (+11/-2) lib/lp/buildmaster/model/buildfarmjobbehavior.py (+2/-2) lib/lp/code/model/recipebuilder.py (+11/-23) lib/lp/soyuz/model/binarypackagebuildbehavior.py (+11/-24) lib/lp/translations/model/translationtemplatesbuildbehavior.py (+4/-14) lib/lp/translations/tests/test_translationtemplatesbuildbehavior.py (+6/-1) |
||||
To merge this branch: | bzr merge lp://staging/~wgrant/launchpad/refactor-slavestatus | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+22285@code.staging.launchpad.net |
Commit message
Factor out common IBuildFarmJobBe
Description of the change
This branch shuffles common things from IBuildFarmJobBe
To post a comment you must log in.
William thanks for the fix. The logic of what you have done looks good.
However, I don't like the idiom you've employed of mutating the status dictionary inside the slaveStatus methods and then returning it. If you didn't want to mutate the original dictionary then making a copy, changing it, and returning that copy would make sense. Otherwise just modifying the status dictionary in place and not returning it is a reasonable thing to do (and preferred barring no solid reason to do the former). But to mutate and then return would lead one to think the dictionary was not modified in place, which we know it was.
Changing the method to mutate will necessitate a small change to your new test code.
I'm marking this approved rather than needs fixing with the expectation you'll make that change. If you would prefer to discuss it further we can and I'd be eager to hear your thoughts.
As usual, I'm happy to land this for you when it is ready.