Skip to content
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

nixpkgs-update-fetch-updatescript is broken #1180

Open
zowoq opened this issue Mar 30, 2024 · 7 comments
Open

nixpkgs-update-fetch-updatescript is broken #1180

zowoq opened this issue Mar 30, 2024 · 7 comments

Comments

@zowoq
Copy link
Contributor

zowoq commented Mar 30, 2024

cc @ryantm @rhendric

This fetcher seems to depend on being able to evaluate all of the updateScript's in nixpkgs without error. I've fixed a broken updateScript in nixpkgs once already for this fetcher but it'll probably be better if we could change it to ignore errors. Making ofborg enforce evaluation of updateScript might also be a possibility if ignoring errors isn't feasible?

Current error:

error: Package ‘cuda_cudart-11.8.89’ in nixpkgs/pkgs/development/cuda-modules/generic-builders/manifest.nix:325 has an unfree license (‘CUDA EULA’), refusing to evaluate.

With export NIXPKGS_ALLOW_UNFREE=1:

error: paddlepaddle has no binary-hashes.nix entry for 'x86_64-linux.cpu.cp311' attribute
@zowoq
Copy link
Contributor Author

zowoq commented Mar 31, 2024

Seems to have been fixed in nixpkgs but I'll leave this issue open until we make the fetcher able to handle nixpkgs breakage or we decide making against any changes here and just keep fixing breakage in nixpkgs as it is occurs.

@zowoq
Copy link
Contributor Author

zowoq commented Apr 30, 2024

Broken again:

error:
       … while evaluating the file '/nix/store/ay6fkwf1ivcgkz2zd0sm3w300gq6zwm8-packages-with-update-script.nix':
       … while calling the 'concatStringsSep' builtin
         at /nix/store/hjn3x00py1v9v28f9rfvd3yp4v1s5m01-source/lib/strings.nix:60:31:
           59|   */
           60|   concatMapStrings = f: list: concatStrings (map f list);
             |                               ^
           61|
       … while calling the 'map' builtin
         at /nix/store/hjn3x00py1v9v28f9rfvd3yp4v1s5m01-source/lib/strings.nix:60:46:
           59|   */
           60|   concatMapStrings = f: list: concatStrings (map f list);
             |                                              ^
           61|
       (stack trace truncated; use '--show-trace' to show the full trace)
       error: function 'anonymous lambda' called with unexpected argument 'rev'
       at /nix/store/hjn3x00py1v9v28f9rfvd3yp4v1s5m01-source/pkgs/common-updater/git-updater.nix:6:1:
            5|
            6| { pname ? null
             | ^
            7| , version ? null

@zowoq
Copy link
Contributor Author

zowoq commented Aug 12, 2024

error:
       … while evaluating the file '/nix/store/ay6fkwf1ivcgkz2zd0sm3w300gq6zwm8-packages-with-update-script.nix':
       … while calling the 'concatStringsSep' builtin
         at /nix/store/sd1cc3syrldcjws0k3z5qszmpi2n0j53-source/lib/strings.nix:95:31:
           94|   */
           95|   concatMapStrings = f: list: concatStrings (map f list);
             |                               ^
           96|
       … while calling the 'map' builtin
         at /nix/store/sd1cc3syrldcjws0k3z5qszmpi2n0j53-source/lib/strings.nix:95:46:
           94|   */
           95|   concatMapStrings = f: list: concatStrings (map f list);
             |                                              ^
           96|
       (stack trace truncated; use '--show-trace' to show the full trace)
       error: function 'anonymous lambda' called with unexpected argument 'tagPrefix'
       at /nix/store/sd1cc3syrldcjws0k3z5qszmpi2n0j53-source/pkgs/common-updater/git-updater.nix:6:1:
            5|
            6| { pname ? null
             | ^
            7| , version ? null

@zowoq
Copy link
Contributor Author

zowoq commented Nov 16, 2024

@infinisil I thought I'd ask you about this as you are working on the github actions eval checks.

Seems to be every few weeks an updateScript that doesn't evaluate is merged in nixpkgs, we then need to bisect and fix it as it breaks the service that generates a list of all the updateScripts for the nixpkgs-update bot.

We could try handling the eval failures on our side (in this file) and maybe even publish a list of packages with a broken updateScript but I expect we'd still get questions along the lines of "why isn't the bot working for my package".

How feasible would it be to extend the nixpkgs eval checks to enforce evaluation of passthru.updateScript?

@zowoq
Copy link
Contributor Author

zowoq commented Dec 7, 2024

$ nix-shell maintainers/scripts/update.nix --argstr package rtorrent
error:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:34:12:
           33|
           34|   strict = derivationStrict drvAttrs;
             |            ^
           35|

       … while evaluating derivation 'nixpkgs-update-script'
         whose name attribute is located at /home/zowoq/nixpkgs/pkgs/stdenv/generic/make-derivation.nix:336:7

       … while evaluating attribute 'shellHook' of derivation 'nixpkgs-update-script'
         at /home/zowoq/nixpkgs/maintainers/scripts/update.nix:230:3:
          229|   '';
          230|   shellHook = ''
             |   ^
          231|     unset shellHook # do not contaminate nested shells

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: function 'anonymous lambda' called with unexpected argument 'rev-prefix'
       at /home/zowoq/nixpkgs/pkgs/common-updater/unstable-updater.nix:15:1:
           14|
           15| { url ? null # The git url, if empty it will be set to src.gitRepoUrl
             | ^
           16| , branch ? null

@infinisil
Copy link

How feasible would it be to extend the nixpkgs eval checks to enforce evaluation of passthru.updateScript?

Not very easy, because the evaluation is done by nix-env -qa, and there's no way to make it go recurse into derivation attributes.

Instead what could work is to effectively have a separate nix-env evaluation that evaluates something along the lines of (untested)

mapAttrsRecursiveCond (v: !isDerivation v) (v: v.passthru or {}) pkgs

You could add another workflow like the one here for that.

@zowoq
Copy link
Contributor Author

zowoq commented Dec 20, 2024

Rather than adding another workflow could it be added to the existing meta checks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants