Skip to content

Commit 6c91c19

Browse files
committed
fix log output on UI
1 parent 4581455 commit 6c91c19

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

pkg/coordinator/logger/dbwriter.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,15 @@ func (lh *logDBWriter) GetLogEntries(from, limit int) []*db.TaskLog {
182182

183183
if len(dbEntries) > 0 && dbEntries[len(dbEntries)-1].LogIndex >= bufEntries[0].LogIndex {
184184
// remove overlapping entries
185-
bufEntries = bufEntries[dbEntries[len(dbEntries)-1].LogIndex-bufEntries[0].LogIndex+1:]
185+
lastDBIndex := dbEntries[len(dbEntries)-1].LogIndex
186+
firstBufIndex := bufEntries[0].LogIndex
187+
bufEntries = bufEntries[lastDBIndex-firstBufIndex+1:]
186188
}
187189

188-
return append(bufEntries, dbEntries...)
190+
combinedEntries := append(dbEntries, bufEntries...)
191+
if len(combinedEntries) > limit {
192+
return combinedEntries[:limit]
193+
}
194+
195+
return combinedEntries
189196
}

playbooks/dev/execution-spec-tests-execute.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ tasks:
165165
--json-report \
166166
--json-report-file=report.json \
167167
--html=report.html \
168-
${EXTRA_FLAGS[@]}
168+
${EXTRA_FLAGS[@]} || true
169169
170170
echo "============================"
171171
echo "Exporting reports"

0 commit comments

Comments
 (0)