Add timestamp parsing to render logs in backend
Description
With the introduction of FF_TIMESTAMPS
to runner, logs of a any runner contain extra metadata data in each log line that we can pass when we transform the log into json or html format.
Proposal
Modify our parser libraries to consider a possible line prefix which contains the timestamps.
-
lib/gitlab/ci/ansi2json.rb
: Add the timestamp to the json data to contain a date. -
lib/gitlab/ci/ansi2html.rb
: Ignore the timestamp (but parse correctly) the log lines.
Once the json data has been extended we can proceed to display this data in our frontend #455582 (closed) when present.
Additional Note
FF_SCRIPT_SECTIONS
also changes the output of logs, so we should make sure the we maintain compatibility with this flag as well.
Edited by Miguel Rincon