From a596d6c3c19e859e21781d2700531a553b2c87b9 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 17 Mar 2024 12:57:59 +0100 Subject: [PATCH] Only show stepname if it doesn't equal the name of the drv When building e.g. nixpkgs, the "Running builds" view will mostly look like this hello.x86_64-linux (Build of hello-X.Y) exa.x86_64-linux (Build of exa-X.Y) ... This doesn't provide any useful information. Showing the step name only makes sense if it's not a child of the job's derivation. With this patch, that information will only be shown if the drv name (i.e. w/o `/nix/store/` prefix, .drv ext & hash) is not equal to the drv name of the job itself (build.nixname). --- src/root/common.tt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/root/common.tt b/src/root/common.tt index 60e71609..f8f61fea 100644 --- a/src/root/common.tt +++ b/src/root/common.tt @@ -96,8 +96,10 @@ BLOCK renderDrvInfo; .substr(11) # strip `/nix/store/` .split('-').slice(1).join("-") # strip hash part .substr(0, -4); # strip `.drv` - IF step.type == 0; action = "Build"; ELSE; action = "Substitution"; END; - IF drvname; %] ([% action %] of [% drvname %])[% END; + IF drvname != releasename; + IF step.type == 0; action = "Build"; ELSE; action = "Substitution"; END; + IF drvname; %] ([% action %] of [% drvname %])[% END; + END; END; @@ -143,7 +145,7 @@ BLOCK renderBuildListBody; [% IF !hideJobsetName %][%build.jobset.get_column("project")%]:[%build.jobset.get_column("name")%]:[% END %][%build.get_column("job")%] [% IF showStepName %] - [% INCLUDE renderDrvInfo step=build.buildsteps %] + [% INCLUDE renderDrvInfo step=build.buildsteps releasename=build.nixname %] [% END %] [% END %]