RunCommandLogs: identify and access via uuid
Using a sha1 of the command combined with the build ID is not a particularly good or unique identifier: * A build could fail, be restarted, and then succeed -- assuming no configuration changes, the sha1 hash of the command as well as the build ID will be the same. This would lead to an overwritten log file. * Allowing user input to influence filenames is not the best of ideas.
This commit is contained in:
@ -163,8 +163,7 @@ sub buildFinished {
|
||||
|
||||
$runlog->started();
|
||||
|
||||
my $filename = Hydra::Helper::Nix::constructRunCommandLogFilename(sha1_hex($command), $build->get_column('id'));
|
||||
my $logPath = Hydra::Helper::Nix::constructRunCommandLogPath($filename);
|
||||
my $logPath = Hydra::Helper::Nix::constructRunCommandLogPath($runlog->uuid);
|
||||
my $dir = dirname($logPath);
|
||||
my $oldUmask = umask();
|
||||
|
||||
|
Reference in New Issue
Block a user