Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: b86b6ded1dae
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 3a9c57c93b87
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Nov 26, 2020

  1. release-lib: Don't use tryEval for packagePlatforms

    This use of tryEval causes hydra to fully ignore evaluation failures of
    packages that occur while trying to evaluate the hydra platforms it should be
    built on. This includes failures that occur during evaluation of:
    - The `.type` attribute value
    - The `.meta.hydraPlatforms` or `.meta.platforms` attribute value
      - The `.version` attribute, since this can determine whether
        `.meta.position` is set
    - For non-derivations, `.recurseForDerivations` or `.recurseForRelease`
    
    Here's a minimal `release.nix` file, showcasing how a `.version` failure
    is ignored:
    
      let
        packages = pkgs: {
          success = pkgs.stdenv.mkDerivation {
            name = "success";
          };
          ignoredFailure = pkgs.stdenv.mkDerivation {
            pname = "ignored-failure";
            version = throw "version error";
          };
          caughtFailure = pkgs.stdenv.mkDerivation {
            name = "caught-failure";
            src = throw "src error";
          };
        };
    
        releaseLib = import <nixpkgs/pkgs/top-level/release-lib.nix> {
          packageSet = args: packages (import <nixpkgs> args);
          supportedSystems = [ "x86_64-linux" ];
        };
      in
      releaseLib.mapTestOn (releaseLib.packagePlatforms releaseLib.pkgs)
    
    Evaluating this with `hydra-eval-jobs` before this change yields:
    
      $ hydra-eval-jobs release.nix -I nixpkgs=/path/to/nixpkgs
      warning: `--gc-roots-dir' not specified
      error: "error: --- ThrownError --- hydra-eval-jobs\nsrc error"
      {
        "caughtFailure.x86_64-linux": {
          "error": "error: --- ThrownError --- hydra-eval-jobs\nsrc error"
        },
        "success.x86_64-linux": {
          "description": "",
          "drvPath": "/nix/store/q1sw933xd9bxfx6rcp0kqksbprj1wmwj-success.drv",
          "homepage": "",
          "isChannel": false,
          "license": "",
          "maintainers": "",
          "maxSilent": 7200,
          "nixName": "success",
          "outputs": {
            "out": "/nix/store/7awrz6hss4jjxvgbwi4wlyikncmslb7a-success"
          },
          "schedulingPriority": 100,
          "system": "x86_64-linux",
          "timeout": 36000
        }
      }
    
    Where you can see that there is no job for the `ignoredFailure`
    derivation. Compare this to after this change:
    
      $ hydra-eval-jobs release.nix -I nixpkgs=/path/to/nixpkgs
      warning: `--gc-roots-dir' not specified
      error: "error: --- ThrownError --- hydra-eval-jobs\nsrc error"
      error: "error: --- ThrownError --- hydra-eval-jobs\nversion error"
      {
        "caughtFailure.x86_64-linux": {
          "error": "error: --- ThrownError --- hydra-eval-jobs\nsrc error"
        },
        "ignoredFailure": {
          "error": "error: --- ThrownError --- hydra-eval-jobs\nversion error"
        },
        "success.x86_64-linux": {
          "description": "",
          "drvPath": "/nix/store/q1sw933xd9bxfx6rcp0kqksbprj1wmwj-success.drv",
          "homepage": "",
          "isChannel": false,
          "license": "",
          "maintainers": "",
          "maxSilent": 7200,
          "nixName": "success",
          "outputs": {
            "out": "/nix/store/7awrz6hss4jjxvgbwi4wlyikncmslb7a-success"
          },
          "schedulingPriority": 100,
          "system": "x86_64-linux",
          "timeout": 36000
        }
      }
    
    Notice how `ignoredFailure` is now part of the result.
    infinisil committed Nov 26, 2020
    Copy the full SHA
    86f4de6 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2020

  1. Merge pull request #105042 from Infinisil/remove-release-tryEval

    release-lib: Don't use tryEval for packagePlatforms
    edolstra committed Nov 30, 2020
    Copy the full SHA
    3a9c57c View commit details
    Browse the repository at this point in the history