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

Running builds view: show build step names #1372

Open Ma27 opened 3 months ago

Ma27 commented 3 months ago

When using Hydra to build machine configurations, you'll often see "nixosConfigurations.foo" five times, i.e. for each build step being run. This isn't very helpful I think because in such a case, a single build step can also be compiling the Linux kernel.

This change also fetches the drvpath and type from the buildsteps relation. We're already joining it, so this doesn't make much difference (confirmed via query logging that this doesn't cause extra SQL queries).

Unfortunately build steps don't have a human readable name, so I'm deriving it from the drvpath by stripping away the hash (assuming that it'll never contain a - and that /nix/store/ is used as prefix). I decided against using the Nix bindings for that to avoid too much overhead due to store operations for each build step.

mweinelt commented 3 months ago

Annoyingly that page already takes >20s to load, but whether that is related to this change, or whether it was previously this slow (it was slow), is probably something you can tell.

https://hydra.nixos.org/status

mweinelt commented 3 months ago

Also seems redundant with the Package / release name field.

image

Ma27 commented 3 months ago

Also seems redundant with the Package / release name field.

We could skip that part in the UI if step name equals package name. It's only really interesting if you have something like a VM test or nixos configuration with lots of steps before.

Ma27 commented 3 months ago

I didn't get to deploy bd380f6 yet, but locally it seems as if it'd resolve the issue about showing too much information.

mweinelt commented 3 months ago

Deployed on hydra.nixos.org.

image

Ericson2314 commented 3 months ago

@mweinelt

but whether that is related to this change, or whether it was previously this slow (it was slow), is probably something you can tell.

So you are fine with the performance of this, now that it deployed?

mweinelt commented 3 months ago

No, https://hydra.nixos.org/status is really slow compared to https://hydra.nixos.org/machines, while vaguely showing the same things.