NixOS / hydra

Hydra, the Nix-based continuous build system
http://nixos.org/hydra
GNU General Public License v3.0
1.1k stars 291 forks source link

"attribute '%s' is %s, which is not supported" error silently discarded, leading to continuous retrying of evaluation #1390

Open srd424 opened 2 weeks ago

srd424 commented 2 weeks ago

Describe the bug If the nix expression to be evaluated contains unexpected attributes, a TypeError is raised:

https://github.com/NixOS/hydra/blob/b3e0d9a8b78d55e5fea394839524f5a24d694230/src/hydra-eval-jobs/hydra-eval-jobs.cc#L277

However only EvalErrors are actually caught:

https://github.com/NixOS/hydra/blob/b3e0d9a8b78d55e5fea394839524f5a24d694230/src/hydra-eval-jobs/hydra-eval-jobs.cc#L279-L286

This seems to lead to (a) the error message being silently discarded (it does not end up in any logs), and (b) the evaluation is continuously retried, presumably because it is never marked as failed.

To Reproduce

I hit this trying to build https://git.auxolotl.org/auxolotl/labs/src/commit/8e9cb4fbe92205d0256bb9bc759f86c5d45ca487/tidepool/default.nix without realising I needed to select the packages attribute.

Expected behavior

The error message should be reported somewhere visible to the end-user (or at minimum, the administrator), and the evaluation should fail cleanly, not loop indefinitely.

Hydra Server:

Please fill out this data as well as you can, but don't worry if you can't -- just do your best.