Due to the fixed-output derivation hashing scheme, there can be multiple derivations of the same output path. But build logs are indexed by derivation path. Thus, we may not be able to find the log of a build or build step using its derivation. So as a fallback, Hydra now looks for other derivations with the same output paths.
ZH6B56XRZON7AGKUPGKABU2SWOIQSYBTXVOMR66X6P6MG25Y4WZAC
PEU6WJ4ILC5YIJBABC3NU2JIZPPMQHVFFG2WMBEMM5NCWYQXCVZQC
LZVO64YG43JD7YMZSCTZNOBS5ROZA4FMPKJW2YOMHX2V5PTGBVWQC
HN3V252LIH47SV655UM22DJUWEXVFAT265A7AGKLG6W73E3FE3ZAC
PMNWRTGJ4GVSMSSAWSUD57B26PCRAHMZIQ5SIWJIK7A74ENKEQLAC
LBNVQXUBEZ45SOTGVXK5UEZXIAIZTJLWZNUYFI4JZ6J65N3KPDVQC
H47WLVATPA42U4UQEPR2O736DZMVGRW33ENHW6YZY3EKYFPFUUBQC
MMJYE535PZ6Z2XX4KOA5YZUJE64GUJ62UYBZQRTFOUTWQAXE4APQC
FU4GO5VN3PKQ3DKOHVHJTMHUKOKMKWS27TIULQ3FMEFXRED5Q44AC
Y6AHH4THYQA43V77L43YM42DYRPCMDSWLUV4NKWAQYMPL4NTUIPQC
6F4UNDTCAW7LYSKTUUUCX32BLAAGYPUPK2LXMMZ32Y6H3CBWP6TQC
SAIUFDP3EFXENSB3XS4OKXNOTGLCYGPW3QNHCXASXBDEEDGYRWUAC
MMDLWWZ2W2XVHHOTG2S5XCPITVNIJQ6F7GLCF2MKQANFNFEID7DAC
QE253KG464JLXJHTILULXUIK527FGXT42IHHDE3BR6ASIYC44MWAC
YPDYBK5GXGNHZMJWC2EHO3T4BIMYK5LMP2G3ABGHOKGIWV4ONIYAC
5EIPRLDD7XE6BZQPU4C43IAE53AVZP7HGE54GYJA3OYQRXCT6FSQC
2GK5DOU7ODF4WBSN3QTD3WIO52VTL2LOAXKGCDEMMAQPTEO4A4HAC
VH5ZABDRP565VZIG55YHNYYPST53NQ2J6YM362NSLXCAHI5WPH4AC
IN272KZWHENW2TCR3LWQ6OZAEESJL5S7AEL3GYLJTWHJUDE6HADAC
RBHHV7P7MMFXUNWCJFNYKLGVLG2NQEDUKJ2IUCZ3WFMHH3SZRUHQC
OZDDUMVPLAIDDD4H43JOP75WYF6XOXL737GEUIHVDTKQAGFHYTBAC
XKXMU5PVXDNCWV6JDO2VWHB4HRAXI3H4ADRSTBJ227WIJBLHRFJAC
J5UVLXOK6EDIL5I7VKWH4V2QDS4DPD7FHRK6XBWSXFRQS4JKXFZQC
2GUAKGTBTNFFER343SQWSLFYIXXHJLDSGH5JHF7QMC3AVZB7Q3TQC
M6WGSGNMB53OI77MZKW4BRFFX3YNARSBKZI37RIOJY5FJKWIRTJAC
3PNG7NIBQQURUUPRVQXYL342OT7JUUYOMY2JJNP6YDX7SYJDZMYAC
7IJXKGHDJRP4V72E37GRKA4EVC7QO7QCVLCKMUY2EJS4U4IAYS5AC
XDDCO6CHPWGXFV3RSMMUYY45DTXJXQNYYHUT2PCYAGRODK43MD6AC
return undef;
}
# Find the log of the derivation denoted by $drvPath. It it doesn't
# exist, try other derivations that produced its outputs (@outPaths).
sub findLog {
my ($c, $drvPath, @outPaths) = @_;
if (defined $drvPath) {
my $logPath = getDrvLogPath($drvPath);
return $logPath if defined $logPath;
}
return undef if scalar @outPaths == 0;
my @steps = $c->model('DB::BuildSteps')->search(
{ path => { -in => [@outPaths] } },
{ select => ["drvpath"]
, distinct => 1
, join => "buildstepoutputs"
});
foreach my $step (@steps) {
my $logPath = getDrvLogPath($step->drvpath);
return $logPath if defined $logPath;
}
sub ellipsize {
my ($self, $c, $s, $n) = @_;
return length $s <= $n ? $s : substr($s, 0, $n - 3) . "...";
sub buildStepLogExists {
my ($self, $c, $step) = @_;
my @outPaths = map { $_->path } $step->buildstepoutputs->all;
return defined findLog($c, $step->drvpath, @outPaths);