mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
Skip counting log length when parseLogRow return nil (#176)
Fix:  Regression of #149, `LogLength` could be incorrect. It may be related to https://github.com/go-gitea/gitea/issues/24458 Reviewed-on: https://gitea.com/gitea/act_runner/pulls/176 Reviewed-by: Zettat123 <zettat123@noreply.gitea.io> Reviewed-by: wxiaoguang <wxiaoguang@noreply.gitea.io>
This commit is contained in:
parent
609c0a0773
commit
de4160b023
7 changed files with 266 additions and 10 deletions
|
@ -139,11 +139,13 @@ func (r *Reporter) Fire(entry *log.Entry) error {
|
|||
}
|
||||
if v, ok := entry.Data["raw_output"]; ok {
|
||||
if rawOutput, ok := v.(bool); ok && rawOutput {
|
||||
if step.LogLength == 0 {
|
||||
step.LogIndex = int64(r.logOffset + len(r.logRows))
|
||||
if row := r.parseLogRow(entry); row != nil {
|
||||
if step.LogLength == 0 {
|
||||
step.LogIndex = int64(r.logOffset + len(r.logRows))
|
||||
}
|
||||
step.LogLength++
|
||||
r.logRows = append(r.logRows, row)
|
||||
}
|
||||
step.LogLength++
|
||||
r.logRows = appendIfNotNil(r.logRows, r.parseLogRow(entry))
|
||||
}
|
||||
} else if !r.duringSteps() {
|
||||
r.logRows = appendIfNotNil(r.logRows, r.parseLogRow(entry))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue