PR#4075: taskinfo CLI and webUI info message why output is not in the list
Merges #4075 https://pagure.io/koji/pull-request/4075 Fixes: #4074 https://pagure.io/koji/issue/4074 add note that files are cleared when getTaskResults returns some results but listTaskOutput returns an empty result
This commit is contained in:
commit
2bf10c7010
3 changed files with 30 additions and 2 deletions
|
|
@ -4845,14 +4845,21 @@ def _printTaskInfo(session, task_id, topdir, level=0, recurse=True, verbose=True
|
|||
for root in buildroot_infos:
|
||||
print("%s %s/%s-%d-%d/" %
|
||||
(indent, BUILDDIR, root['tag_name'], root['id'], root['repo_id']))
|
||||
print("%sLog Files:" % indent)
|
||||
if logs:
|
||||
print("%sLog Files:" % indent)
|
||||
for log_path in logs:
|
||||
print("%s %s" % (indent, log_path))
|
||||
else:
|
||||
print("%s No outputs reported [1]" % indent)
|
||||
print("%sOutput:" % indent)
|
||||
if output:
|
||||
print("%sOutput:" % indent)
|
||||
for file_path in output:
|
||||
print("%s %s" % (indent, file_path))
|
||||
else:
|
||||
print("%s No outputs reported [1]" % indent)
|
||||
if not logs or not output:
|
||||
print("%s[1] Not all tasks produce outputs, and task outputs are not retained "
|
||||
"indefinitely." % indent)
|
||||
|
||||
# white space
|
||||
print('')
|
||||
|
|
|
|||
|
|
@ -407,6 +407,11 @@ State: closed
|
|||
Created: Thu Jan 1 00:16:40 1970
|
||||
Started: Thu Jan 1 00:33:20 1970
|
||||
Finished: Thu Jan 1 00:50:00 1970
|
||||
Log Files:
|
||||
No outputs reported [1]
|
||||
Output:
|
||||
No outputs reported [1]
|
||||
[1] Not all tasks produce outputs, and task outputs are not retained indefinitely.
|
||||
|
||||
Task: 2
|
||||
Type: createrepo
|
||||
|
|
@ -421,6 +426,9 @@ Finished: Thu Jan 1 00:50:00 1970
|
|||
Log Files:
|
||||
%s
|
||||
%s
|
||||
Output:
|
||||
No outputs reported [1]
|
||||
[1] Not all tasks produce outputs, and task outputs are not retained indefinitely.
|
||||
|
||||
""" % tuple('/mnt/koji/work/tasks/2/2/' + k for k in task_output.keys())
|
||||
|
||||
|
|
@ -520,6 +528,11 @@ Started: Thu Jan 1 00:33:20 1970
|
|||
Finished: Thu Jan 1 00:50:00 1970
|
||||
Host: kojibuilder
|
||||
Build: bash-4.4.12-5.fc26 (1)
|
||||
Log Files:
|
||||
No outputs reported [1]
|
||||
Output:
|
||||
No outputs reported [1]
|
||||
[1] Not all tasks produce outputs, and task outputs are not retained indefinitely.
|
||||
|
||||
Task: 2
|
||||
Type: buildArch
|
||||
|
|
@ -562,6 +575,11 @@ Build: bash-4.4.12-5.fc26 (1)
|
|||
Started: Thu Jan 1 00:33:20 1970
|
||||
Finished: Thu Jan 1 00:50:00 1970
|
||||
Host: kojibuilder
|
||||
Log Files:
|
||||
No outputs reported [1]
|
||||
Output:
|
||||
No outputs reported [1]
|
||||
[1] Not all tasks produce outputs, and task outputs are not retained indefinitely.
|
||||
|
||||
"""
|
||||
with mock.patch('sys.stdout', new_callable=six.StringIO) as stdout:
|
||||
|
|
|
|||
|
|
@ -269,6 +269,9 @@ $value
|
|||
#end if
|
||||
<br/>
|
||||
#end for
|
||||
#if not $output
|
||||
<div title="Not all tasks produce outputs, and task outputs are not retained indefinitely.">No outputs reported</div>
|
||||
#end if
|
||||
#if $task.state not in ($koji.TASK_STATES.CLOSED, $koji.TASK_STATES.CANCELED, $koji.TASK_STATES.FAILED) and \
|
||||
$task.method in ('buildSRPMFromSCM', 'buildArch', 'createLiveMedia', 'buildMaven', 'wrapperRPM', 'vmExec', 'createrepo', 'runroot', 'createAppliance', 'createLiveCD')
|
||||
<br/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue