Merge lp:~wgrant/launchpad/refactor-slave-architecture-check into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Julian Edwards |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~wgrant/launchpad/refactor-slave-architecture-check |
Merge into: | lp:launchpad |
Diff against target: |
195 lines (+71/-18) 5 files modified
lib/lp/buildmaster/buildergroup.py (+1/-1) lib/lp/buildmaster/doc/builder.txt (+40/-3) lib/lp/buildmaster/interfaces/builder.py (+5/-4) lib/lp/buildmaster/model/builder.py (+16/-7) lib/lp/soyuz/tests/soyuzbuilddhelpers.py (+9/-3) |
To merge this branch: | bzr merge lp:~wgrant/launchpad/refactor-slave-architecture-check |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Nelson (community) | code | Approve | |
Review via email: mp+22010@code.launchpad.net |
Commit message
Builder.
Description of the change
This step in my buildd-manager cleanup regime moves the DistroArchSerie
The archtag matching hack is currently somewhat concealed in the buildd-manager mess. It goes something like this:
- buildd-manager finds all the DASes.
- buildd-manager collects all builders with a processor matching each DAS's family.
- buildd-manager iterates through the builders attached to each DAS, checking their arch tag against the DAS arch tag, and processing the builders in other ways.
So it's checking a DAS<->builder relationship, when there is in fact no such unique relationship. It's terribly fragile and will break in very obscure ways if a DAS happens to have a different archtag from others in its processor family.
By distilling the hack into this method it becomes a lot more obvious, and buildd-manager can be cleaned up to just iterate straight through all of the registered builders, forgetting about the DAS mess entirely.
In addition, multi-arch builder support requires a rethink of the slave identification mechanism, and this hack can evaporate during that. I hope to get to it soon, so it might be short-lived.
For what it's worth, r=me
09:53 < noodles775> wgrant: I don't see what's worse about your check, than the one you removed? Both check whether the slave's builder_arch matches a das.architecturetag (only difference being that the das used to be passed in)? canonical/ launchpad/ danilos] has joined #launchpad-dev
09:53 < noodles775> So it seems like a good refactoring to me.
09:53 < wgrant> Right.
09:53 < wgrant> Both are making the best of a terrible situation.
09:53 * wgrant will argue with bigjools when he returns.
09:54 < noodles775> wgrant: You're probably planning to anyway, but pls add a bug to that XXX reference at some point :)
09:56 < noodles775> wgrant: Why not include the processorfamily in the original query rather than as a separate check?
09:57 -!- danilos [~danilo@
09:57 < wgrant> noodles775: This lets us give a slightly better error.
09:57 < noodles775> That would make your new code almost identical in functionality?
09:57 < noodles775> Ah, ok.
09:57 < wgrant> I suppose I could just say 'Mismatched slave architecture tag: foo'
09:58 < wgrant> But the old one gave the correct value too..
09:59 < wgrant> noodles775: Can you do a quick search for that bug? Lots of that sort of thing are still private.
09:59 < wgrant> There surely is one.
09:59 < noodles775> OK, I would have thought it would have been included in the XXX if there was noe. Checking now.
10:01 < noodles775> So just back to your raised exception, you could raise "Mismatched slave architecture, Architecture tag: %s, Processor family: %s"?
10:01 < wgrant> noodles775: I could, true.