/srv/irclogs.ubuntu.com/2013/07/25/#launchpad-dev.txt

=== jamesh_ is now known as jamesh
=== tasdomas_afk is now known as tasdomas
=== Ursinha-afk is now known as Ursinha
=== Ursinha is now known as Ursinha-afk
=== Ursinha-afk is now known as Ursinha
=== tasdomas is now known as tasdomas_afk
cjwatsonStevenK: sorry, it's in archivepublisher, not archiveuploader, because custom uploads15:06
cjwatsonStevenK: it appears to actually be in each CU implementation15:06
StevenKcjwatson: Yes, I just determined that, but thanks.15:07
cjwatsonwgrant: The semantics of BuilderStatus.ABORTED on the master side seem a bit different from what we want from BuildStatus.ABORTED.  BuilderStatus.ABORTED ends up in BuildFarmJobOld.jobAborted, which sets the status to BuildStatus.NEEDSBUILD; I think we want BuildStatus.ABORTED to end up in BuildStatus.CANCELLED.15:23
cjwatsonBut maybe that means that (a) we want it to be called CANCELLED on the slave side, (b) perhaps this isn't quite so compatible with the rescue case after all?15:23
wgrantcjwatson: It depends on the origin state15:23
wgrantBUILDING + ABORTED -> NEEDSBUILD15:24
wgrantCANCELLING + ABORTED -> CANCELLED15:24
cjwatsonIOW it should depend on that, not depends on that right now?15:24
cjwatson(Since I don't see that in the code)15:24
wgrantYeah15:24
wgrantThat's how it probably should work15:25
cjwatsonMkay15:25
wgrantThe slave doesn't need to know why it's being cancelled15:25
wgrantThat's purely a master-side policy decision15:25
wgrantThe slave may be being rescued, or it may be being cancelled.15:25
wgrantThey are identical from the slave POV.15:26
cjwatsonOK.  Bit confusing for BuildStatus.ABORTED not to necessarily be jobAborted, but I suppose there are only so many verbs.15:26
wgrantWell15:27
wgrantjobAborted is never called atm.15:27
wgrantBecause ABORTED is only ever hit after a rescue15:27
wgrantIn which case the job is no longer assigned to the builder, so there's no job to call jobAborted on.15:27
wgrantAn ABORTED slave for a BUILDING build should probably be an OOPS15:28
wgrantBecause I can't see how that could occur15:28
cjwatsonIt's quite possible it is an OOPS right now, then15:29
wgrantjobAborted might not even make sense.15:31
wgrantThe job is cancelled15:31
wgranthandleStatus_ABORTED might call jobCancelled when status was CANCELLING, and either set it back to NEEDSBUILD or OOPS and set to FAILEDTOBUILD for any other status15:32
cjwatsonwgrant: https://code.launchpad.net/~cjwatson/launchpad/buildstatus-aborted/+merge/17699016:31
wgrantcjwatson: I think that looks fairly sane16:39
wgrantI'll have to think about it16:40
wgrantWell16:40
wgrantAnd try it16:40
wgrantUntil it breaks16:40
StevenKcjwatson, wgrant: https://code.launchpad.net/~stevenk/launchpad/no-dead-custom-uploads/+merge/17699516:52
cjwatsonStevenK: the setComponents description in customupload.py should probably be more generic16:56
cjwatsonStevenK: and don't you want target_series.enabled_architectures instead of .architectures?16:57
StevenK-        """Set self.version and self.arch (if applicable)."""16:57
StevenK+        """Set instance variables based on decomposing the filename."""16:57
cjwatsonSeems fair16:58
StevenKcjwatson: That's a question, do we want to copy custom uploads for arches which are disabled?16:58
cjwatsonI don't think so16:58
StevenKThat's more a question for you, or infinity16:58
cjwatsonThat was the raring(?)/armel case16:58
StevenKRight. This also gives us grace to disable them from the get go, and then yay, no custom uploads on first publish16:59
cjwatsonOnce it's disabled, I think we want to pretend it doesn't exist, it's just that we can't delete it easily16:59
wgrantWell, the raring/armel case would still have worked17:02
wgrantBecause this is for the target arch check17:02
wgrantBut yes17:02
wgrantenabled_architectures should be the default17:02
cjwatsonhttps://code.launchpad.net/~cjwatson/launchpad-buildd/fix-abort/+merge/177003  *phew*17:34
=== Ursinha-afk is now known as Ursinha
=== Ursinha is now known as Ursinha-afk
=== Ursinha-afk is now known as Ursinha
cjwatsonwgrant: Is there a plausible way to get a callback in buildd-manager when a build goes to ABORTED (for the bit during cancellation that needs to wait for that), or do I just have to poll?21:56
wgrantcjwatson: You have to poll. I'd suggest using the separate handleStatus_ABORTED and just working off the state21:57
wgrantRather than doing it as part of the cancellation function21:57
cjwatsonHm, yeah, that makes sense.21:57
wgrantUnless you want to rewrite  buildd-manager's state machine21:58
cjwatsonNo :-)21:58
wgrantWhich somehow seems unlikely..21:58
cjwatsonStill need a timeout which I cancel, but I guess I can manage that21:58
wgrantYeah, I'm not quite sure how to do the timeout.21:58
wgrantPossibly store is as a local attribute in  buildd-manager21:59
wgrantIt means that a restart will reset the timeout, but meh21:59
wgrantReally doesn't matter21:59
wgrantAnd is probably cleaner21:59
cjwatsonWhy not just reactor.callLater?21:59
wgrantA good point.21:59
wgrantWell21:59
wgrantA restart would stop that from working21:59
cjwatsonThough I still need to store the Deferred somewhere22:00
wgranteg. I start cancelling a build, then buildd-manager restarts22:00
wgrantIf you just naively use callLater then it will never time out22:00
wgrantSo, I guess, ideally it would see slavestatus == BUILDING and masterstatus == CANCELLING, and call abort() and set a timeout22:01
wgrantIf it seeis slavestatus == ABORTING and masterstatus == CANCELLING, it might have to ensure that a timeout is set.22:02
cjwatsonMaybe the simplest answer is just to check each time SlaveScanner notices a masterstatus == CANCELLING build, since it's polling every 15 seconds anyway22:05
cjwatsonIt could easily just keep count of a multiple of that22:05
cjwatsonNot very Twisted, but22:05
wgrantYeah, indeed22:07
cjwatsonIf we were really trying hard then we could add a DB column on Builder for the timeout22:08
wgrantThat would be trying altogether too hard.22:13
=== _mup__ is now known as _mup_

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!