Fix up a few loose ends

This commit is contained in:
puck 2024-03-10 23:09:27 +00:00 committed by eldritch horrors
parent 4d73275123
commit 9a15348984

View file

@ -153,6 +153,7 @@ class BuildTrigger(steps.BuildStep):
@defer.inlineCallbacks @defer.inlineCallbacks
def run(self): def run(self):
self.running = True
build_props = self.build.getProperties() build_props = self.build.getProperties()
source = f"nix-eval-lix" source = f"nix-eval-lix"
@ -184,7 +185,7 @@ class BuildTrigger(steps.BuildStep):
failed = [] failed = []
all_results = SUCCESS all_results = SUCCESS
ss_for_trigger = self.prepareSourcestampListForTrigger() ss_for_trigger = self.prepareSourcestampListForTrigger()
while len(build_schedule_order) > 0 or len(scheduled) > 0: while not self.ended and (len(build_schedule_order) > 0 or len(scheduled) > 0):
print('Scheduling..') print('Scheduling..')
schedule_now = [] schedule_now = []
for build in list(build_schedule_order): for build in list(build_schedule_order):
@ -229,11 +230,10 @@ class BuildTrigger(steps.BuildStep):
print(f' Found finished build {job.get("attr")}, result {util.Results[result].upper()}') print(f' Found finished build {job.get("attr")}, result {util.Results[result].upper()}')
if result != SUCCESS: if result != SUCCESS:
failed_checks = [] failed_checks = []
failed_paths = [] failed_paths = [job.get('drvPath')]
removed = [] removed = []
while True: while True:
old_paths = list(failed_paths) old_paths = list(failed_paths)
print(failed_checks, old_paths)
for build in list(build_schedule_order): for build in list(build_schedule_order):
deps = all_deps.get(build.get("drvPath"), []) deps = all_deps.get(build.get("drvPath"), [])
for path in old_paths: for path in old_paths:
@ -253,6 +253,8 @@ class BuildTrigger(steps.BuildStep):
if job.get("drvPath") in all_deps[dep]: if job.get("drvPath") in all_deps[dep]:
all_deps[dep].remove(job.get("drvPath")) all_deps[dep].remove(job.get("drvPath"))
print('Done!') print('Done!')
if self.ended:
return util.CANCELLED
return all_results return all_results
def getCurrentSummary(self) -> dict[str, str]: # noqa: N802 def getCurrentSummary(self) -> dict[str, str]: # noqa: N802