Skip to content

Rebuild cached failures on proper workers #454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions buildbot_nix/buildbot_nix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,20 @@ async def run(self) -> int:
error_log.addStderr("\n".join(msg) + "\n")
return util.FAILURE
self.build.addStepsAfterCurrentStep(
nix_build_steps(
self.project,
self.worker_names,
self.post_build_steps,
self.branch_config_dict,
self.outputs_path,
self.show_trace,
)
[
Trigger(
name="Rebuild cached failure",
waitForFinish=True,
schedulerNames=[f"{self.project.project_id}-rebuild"],
haltOnFailure=True,
flunkOnFailure=True,
sourceStamps=[],
alwaysUseLatest=False,
updateSourceStamp=False,
copy_properties=["attr", "system", "branch", "revision"],
set_properties={"reason": "rebuild"},
)
]
)
return util.SUCCESS

Expand Down Expand Up @@ -1075,6 +1081,11 @@ def config_for_project(
name=f"{project.project_id}-nix-register-gcroot",
builderNames=[f"{project.name}/nix-register-gcroot"],
),
# this is triggered from cached failure rebuilds
schedulers.Triggerable(
name=f"{project.project_id}-rebuild",
builderNames=[f"{project.name}/nix-eval"],
),
# allow to manually trigger a nix-build
schedulers.ForceScheduler(
name=f"{project.project_id}-force",
Expand Down