buildbot_nix: allows to restart a build

This commit is contained in:
Jörg Thalheim 2024-07-05 12:46:20 +02:00 committed by mergify[bot]
parent 2ca8d94427
commit c94738d1a1

View file

@ -678,8 +678,14 @@ class AnyProjectEndpointMatcher(EndpointMatcherBase):
if res is None:
return None
builder = yield self.master.data.get(("builders", res["builderid"]))
builder_name = normalize_virtual_builder_name(builder["name"])
builderid = res.get("builderid")
if builderid is None:
builder_name = res["builder_names"][0]
else:
builder = yield self.master.data.get(("builders", builderid))
builder_name = builder["name"]
builder_name = normalize_virtual_builder_name(builder_name)
if builder_name in self.builders:
log.warn(
"Builder {builder} allowed by {role}: {builders}",
@ -696,6 +702,14 @@ class AnyProjectEndpointMatcher(EndpointMatcherBase):
builders=self.builders,
)
def match_ForceSchedulerEndpoint_force( # noqa: N802
self,
epobject: Any,
epdict: dict[str, Any],
options: dict[str, Any],
) -> defer.Deferred[Match]:
return self.check_builder(epobject, epdict, "build")
def match_BuildEndpoint_rebuild( # noqa: N802
self,
epobject: Any,