nix-community / nix-review-tools

WIP tooling
22 stars 10 forks source link

fetch.rb:31:in `read': No such file or directory #6

Closed worldofpeace closed 4 years ago

worldofpeace commented 4 years ago

Whenever I try to use it, it fails like

./eval-report 1571115
Downloading https://hydra.nixos.org/eval/1571115?full=1...
Downloading https://hydra.nixos.org/build/113104577...
Parsing build_113104577
Downloading https://hydra.nixos.org/build/113083476...
Parsing build_113083476
Downloading https://hydra.nixos.org/build/113082122...
Parsing build_113082122
Downloading https://hydra.nixos.org/build/113080561...
Parsing build_113080561
Downloading https://hydra.nixos.org/build/113081999...
Traceback (most recent call last):
    13: from -e:1:in `<main>'
    12: from -e:1:in `load'
    11: from /home/worldofpeace/Code/nix/nix-review-tools/eval-report:16:in `<top (required)>'
    10: from /home/worldofpeace/Code/nix/nix-review-tools/eval-report:16:in `map'
     9: from /home/worldofpeace/Code/nix/nix-review-tools/eval-report:16:in `block in <top (required)>'
     8: from /home/worldofpeace/Code/nix/nix-review-tools/lib/hydra/eval.rb:20:in `get'
     7: from /home/worldofpeace/Code/nix/nix-review-tools/lib/hydra/eval.rb:20:in `map'
     6: from /home/worldofpeace/Code/nix/nix-review-tools/lib/hydra/eval.rb:37:in `block in get'
     5: from /home/worldofpeace/Code/nix/nix-review-tools/lib/hydra/eval.rb:37:in `tap'
     4: from /home/worldofpeace/Code/nix/nix-review-tools/lib/hydra/eval.rb:39:in `block (2 levels) in get'
     3: from /home/worldofpeace/Code/nix/nix-review-tools/lib/hydra/build.rb:13:in `get'
     2: from /home/worldofpeace/Code/nix/nix-review-tools/lib/hydra/fetch.rb:44:in `build'
     1: from /home/worldofpeace/Code/nix/nix-review-tools/lib/hydra/fetch.rb:31:in `_get'
/home/worldofpeace/Code/nix/nix-review-tools/lib/hydra/fetch.rb:31:in `read': No such file or directory @ rb_sysopen - build_113081999 (Errno::ENOENT)

Tried on different evals as well.

samueldr commented 4 years ago

I added detection for failures to fetch in https://github.com/samueldr/nix-review-tools/commit/15c23dad314d913b7f4cefe513538e8c6da9a7b2. I think this is what is happening.

Now, it's obvious that the next step is to fetch in the script, rather than hackily rely on curl, to better introspect why it fails.