Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f337ce9

Browse files
committed
Explain job log resolution reason
Signed-off-by: Babak K. Shandiz <[email protected]>
1 parent b652861 commit f337ce9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/cmd/run/view/view.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -668,9 +668,10 @@ func truncateAsUTF16(str string, max int) string {
668668
// where the ID can apparently be negative.
669669
func attachRunLog(rlz *zip.Reader, jobs []shared.Job) {
670670
for i, job := range jobs {
671-
// the normal job run log file is preferred over the legacy one. So, we
672-
// try to find the normal log file, and if we couldn't find it then we
673-
// look for the legacy one, if any.
671+
// As a highest priority, we try to use the step logs first. We have seen zips that surprisingly contain
672+
// step logs, normal job logs and legacy job logs. In this case, both job logs would be ignored. We have
673+
// never seen a zip containing both job logs and no step logs, however, it may be possible. In that case
674+
// let's prioritise the normal log over the legacy one.
674675
jobLog := matchFileInZIPArchive(rlz, jobLogFilenameRegexp(job))
675676
if jobLog == nil {
676677
jobLog = matchFileInZIPArchive(rlz, legacyJobLogFilenameRegexp(job))

0 commit comments

Comments
 (0)