Skip to content

succeedOnFailure = true broken on master #200663

@knedlsepp

Description

@knedlsepp

Describe the bug

succeedOnFailure is a feature of nixpkgs stdenv and hydra that makes it possible to host the build's output on hydra even in the light of a failure by respecting a file $out/nix-support/failed.
This feature is apparently broken in master, whereas it used to work in 21.05.

Steps To Reproduce

Put the following file into the nixpkgs root and build it:

let
  pkgs = import ./. { };
in pkgs.runCommand "foo" {
  succeedOnFailure = true;
  } ''
    mkdir $out
    echo foo > $out/foo
    exit 1
  ''

Expected behavior

The build should succeed with a similar output

build failed with exit code 1 (ignored)
/nix/store/966yi36fc32g9w1zwr95b6qh3xfh047a-foo

instead the build fails

building '/nix/store/akiv0nhwijmjmzf4ja92qxq955bqj66r-foo.drv'...
build failed with exit code 1 (ignored)
error: builder for '/nix/store/akiv0nhwijmjmzf4ja92qxq955bqj66r-foo.drv' failed with exit code 1;
       last 1 log lines:
       > build failed with exit code 1 (ignored)
       For full logs, run 'nix log /nix/store/akiv0nhwijmjmzf4ja92qxq955bqj66r-foo.drv'.

Notify maintainers

@SuperSandro2000 as bisecting this issue did point to #161079 as the first bad commit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions