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:
@ -526,14 +526,14 @@ END;
|
||||
<div>Started at [% INCLUDE renderDateTime timestamp = runcommandlog.start_time; %]</div>
|
||||
[% IF runcommandlog.end_time != undef %]
|
||||
<div>Ran for [% INCLUDE renderDuration duration = runcommandlog.end_time - runcommandlog.start_time %]
|
||||
[% IF runcommandlog.log_relative_url() %]
|
||||
 — <a href="[% c.uri_for('/build', build.id, runcommandlog.log_relative_url()) %]">Logs</a>
|
||||
[% IF runcommandlog.uuid != undef %]
|
||||
 — <a href="[% c.uri_for('/build', build.id, 'runcommandlog', runcommandlog.uuid) %]">Logs</a>
|
||||
[% END %]
|
||||
</div>
|
||||
[% ELSE %]
|
||||
<div>Running for [% INCLUDE renderDuration duration = curTime - runcommandlog.start_time %]
|
||||
[% IF runcommandlog.log_relative_url() %]
|
||||
 — <a href="[% c.uri_for('/build', build.id, runcommandlog.log_relative_url()) %]">Logs</a>
|
||||
[% IF runcommandlog.uuid != undef %]
|
||||
 — <a href="[% c.uri_for('/build', build.id, 'runcommandlog', runcommandlog.uuid) %]">Logs</a>
|
||||
[% END %]
|
||||
</div>
|
||||
[% END %]
|
||||
|
Reference in New Issue
Block a user