--keep-going does not keep going with remote builders involved #928

Closed
opened 2025-07-22 11:05:15 +00:00 by raito · 2 comments
Owner

Describe the bug

Consider:

{ pkgs ? import <nixpkgs> { } }: 
{
  a = pkgs.runCommand "test" { } ''
    sleep 1; exit 1
  '';

  b = pkgs.runCommand "unfailing" { } ''
    sleep 3
    echo toto > $out
  '';
}

If you do nix-build on such a file with keep-going, you expect that the a failure should not abort the build, including the one of b which should succeed.

Steps To Reproduce

  1. Have remote builders
  2. Use the above reproducer.
  3. Build it with keep-going.
  4. See instantaneous abortion.

Expected behavior

A workaround is to disable the remote builders and would produce the following output.

❯ nix-build --keep-going test.nix --builders ''
these 2 derivations will be built:
  /nix/store/4wa1bkwchh29037ccjjbxi14nwkf45mr-unfailing.drv
  /nix/store/slxpnb0l1q7i9ljflvcdsdzxnhwsply1-test.drv
building '/nix/store/4wa1bkwchh29037ccjjbxi14nwkf45mr-unfailing.drv'...
building '/nix/store/slxpnb0l1q7i9ljflvcdsdzxnhwsply1-test.drv'...
error: builder for '/nix/store/slxpnb0l1q7i9ljflvcdsdzxnhwsply1-test.drv' failed with exit code 1

nix --version output

Reported happening by @mweinelt, confirmed by @raito on:

  • nix (Lix, like Nix) 2.94.0-devpre20250720_2fc47b6
  • 2.94.0-dev20250720162504-raito-edition

Additional context

This is very most likely related to the RPC changes.

## Describe the bug Consider: ```nix { pkgs ? import <nixpkgs> { } }: { a = pkgs.runCommand "test" { } '' sleep 1; exit 1 ''; b = pkgs.runCommand "unfailing" { } '' sleep 3 echo toto > $out ''; } ``` If you do `nix-build` on such a file with keep-going, you expect that the `a` failure should not abort the build, including the one of `b` which should succeed. ## Steps To Reproduce 1. Have remote builders 2. Use the above reproducer. 3. Build it with keep-going. 4. See instantaneous abortion. ## Expected behavior A workaround is to disable the remote builders and would produce the following output. ``` ❯ nix-build --keep-going test.nix --builders '' these 2 derivations will be built: /nix/store/4wa1bkwchh29037ccjjbxi14nwkf45mr-unfailing.drv /nix/store/slxpnb0l1q7i9ljflvcdsdzxnhwsply1-test.drv building '/nix/store/4wa1bkwchh29037ccjjbxi14nwkf45mr-unfailing.drv'... building '/nix/store/slxpnb0l1q7i9ljflvcdsdzxnhwsply1-test.drv'... error: builder for '/nix/store/slxpnb0l1q7i9ljflvcdsdzxnhwsply1-test.drv' failed with exit code 1 ``` ## `nix --version` output Reported happening by @mweinelt, confirmed by @raito on: - `nix (Lix, like Nix) 2.94.0-devpre20250720_2fc47b6` - `2.94.0-dev20250720162504-raito-edition` ## Additional context This is very most likely related to the RPC changes.
Member

Works as expected on ca12657a68.

Works as expected on ca12657a6805045a7e81b2ea761e1af66c4ea1a7.
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/3705 ("libstore: fix remote build failures killing everything")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/3705", "number": 3705, "kind": "commit message"}], "cl_meta": {"3705": {"change_title": "libstore: fix remote build failures killing everything"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/3705](https://gerrit.lix.systems/c/lix/+/3705) ("libstore: fix remote build failures killing everything")
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#928
No description provided.