blob: 214c7778318b667a32e2b42a233975d563302d88 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001{% extends "basebuilddetailpage.html" %}
2
3{% load projecttags %}
4{% load humanize %}
5
Patrick Williamsf1e5d692016-03-30 15:21:19 -05006{% block title %} {{task.recipe.name}}_{{task.recipe.version}} {{task.task_name}} - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster {% endblock %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -05007{% block localbreadcrumb %}
8<li><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
9<li>{{task.recipe.name}}_{{task.recipe.version}} {{task.task_name}}</li>
10{% endblock %}
11
12{% block pagedetailinfomain %}
13
Patrick Williamsc0f7c042017-02-23 20:41:17 -060014<div class="row">
15 <div class="col-md-12">
16 <div class="page-header build-data">
Patrick Williamsc124f4f2015-09-15 14:41:29 -050017 <h1><a href="{%url 'recipe' build.pk task.recipe.pk %}">{{task.recipe.name}}_{{task.recipe.version}}</a> {{task.task_name}}</h1>
18 </div>
19
20{# Outcome section #}
21<h2 {{ task|task_color:True }}>
22 {{task.get_outcome_display}}
Patrick Williamsc0f7c042017-02-23 20:41:17 -060023 <span class="glyphicon glyphicon-question-sign get-help" title="{{task.get_outcome_help}}"></i>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050024</h2>
25{%if task.task_executed %}
26 {# executed tasks outcome #}
27 {% if task.logfile %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -060028 <a class="btn btn-default btn-lg"
29 href="{% url 'build_artifact' build.id 'tasklogfile' task.pk %}">
30 Download task log
31 </a>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032 {% endif %}
33 {# show stack trace for failed task #}
34 {% if task.outcome == task.OUTCOME_FAILED and log_head %}
35 <h3>Python stack trace</h3>
36 <div>
37 <pre style="min-height:160px;">
Patrick Williamsc0f7c042017-02-23 20:41:17 -060038 <code>{{log_head}}</code><a id="full-trace-show" data-target="#fulltrace" data-toggle="collapse" class="btn btn-xs">...</a>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039 <div id="fulltrace" class="collapse" style="margin-top: -20px; height: 0px;">
Patrick Williamsc0f7c042017-02-23 20:41:17 -060040 <code>{{log_body}}</code><br><a id="full-trace-hide" class="btn btn-xs collapsed" style="font-family:Helvetica Neue" data-target="#fulltrace" data-toggle="collapse">Collapse stack trace<i class="icon-caret-up"></i></a></div></pre>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050041 </div>
42 {% endif %}
43{% else %}
44{# not executed tasks outcome #}
45 {% if task.outcome == task.OUTCOME_PREBUILT %}
46 {% if not showing_matches %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -060047 <a class="btn btn-default"
48 href="javascript:reload_params({'show_matches' : 'true'
49 })">Match to tasks in previous builds <span class="glyphicon
50glyphicon-question-sign get-help" title="This shows you a list of tasks from
51previous builds with the same signature generated from the same inputs as used
52in the prebuilt task. Any of them could be the task that generated the output
53this prebuilt task is reusing"></span></a>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050054 {% elif matching_tasks %}
55 <h3 class="details">Prebuilt task could be based on
Patrick Williamsc0f7c042017-02-23 20:41:17 -060056 <span class="glyphicon glyphicon-question-sign get-help" title="This
57 table shows a list of tasks from previous builds with the
58 same signature generated from the same inputs as used in the
59 prebuilt task. Any of them could be the task that generated the
60 output this prebuilt task is reusing"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050061 </h3>
Patrick Williamsc0f7c042017-02-23 20:41:17 -060062 <div class="table-responsive">
Patrick Williamsc124f4f2015-09-15 14:41:29 -050063 <table class="table table-bordered table-hover">
64 <thead>
65 <th>
Patrick Williamsc0f7c042017-02-23 20:41:17 -060066 <span class="glyphicon glyphicon-question-sign
67 get-help" title="The name of the recipe to which
68 each task applies"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050069 Recipe
70 </th>
71 <th>
Patrick Williamsc0f7c042017-02-23 20:41:17 -060072 <span class="glyphicon glyphicon-question-sign get-help" title="The name
73 of the task"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050074 Task
75 </th>
76 <th>
Patrick Williamsc0f7c042017-02-23 20:41:17 -060077 <span class="glyphicon glyphicon-question-sign get-help" title="This
78 value tells you if a task had to run (executed) in
79 order to generate the task output, or if the output was
80 provided by another task and therefore the task didn't need
81 to run (not executed)"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050082 Executed
83 </th>
84 <th>
Patrick Williamsc0f7c042017-02-23 20:41:17 -060085 <span class="glyphicon glyphicon-question-sign
86 get-help" title="This column tells you if
87 'executed' tasks succeeded or failed. The column also
88 tells you why 'not executed' tasks did not need to
89 run"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050090 Outcome
91 </th>
92 <th>
Patrick Williamsc0f7c042017-02-23 20:41:17 -060093 <span class="glyphicon glyphicon-question-sign
94 get-help" title="The date and time the build
95 finished"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050096 Build completed on
97 </th>
98 </thead>
99 <tbody>
100 {% for match in matching_tasks %}
101 <tr {{ match|task_color }}>
102 <td>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600103 {{match.recipe.name}}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500104 </td>
105 <td>
106 <a href="{%url "task" match.build.pk match.pk%}">{{match.task_name}}</a>
107 {% if task.get_description %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600108 <span class="glyphicon
109 glyphicon-question-sign get-help
110 hover-help"
111 title="{{task.get_description}}"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500112 {% endif %}
113 </td>
114 <td>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600115 {{match.get_executed_display}}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500116 </td>
117 <td>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600118 {{match.get_outcome_display}}
119 <span class="glyphicon glyphicon-question-sign
120 get-help hover-help"
121 title="{{match.get_outcome_help}}"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500122 </td>
123 <td>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600124 {{match.build.completed_on|date:"d/m/y H:i"}}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500125 </td>
126 </tr>
127 {% endfor %}
128 </tbody>
129 </table>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600130 </div>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500131 {% else %}
132 <p class="alert">
133 <strong> We have found no tasks matching this prebuilt task</strong><br/>
134 The task you are looking for could belong to a build for which Toaster has no data.
135 </p>
136 {% endif %}
137 {% elif task.outcome == task.OUTCOME_COVERED %}
138 <dl class="dl-horizontal">
139 <dt>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600140 <span class="glyphicon glyphicon-question-sign get-help" title="The task(s)
141 providing the outcome of this task"></span> Task covered by
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500142 </dt>
143 <dd>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600144 <ul class="list-unstyled">
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500145 {% for t in covered_by %}
146 <li>
147 <a href="{%url 'task' t.build.pk t.pk%}"
148 class="task-info"
149 title="{{t.get_executed_display}} | {{t.get_outcome_display}}">
150 {{t.recipe.name}}_{{t.recipe.version}}
151 {{t.task_name}}
152 </a>
153 </li>
154 {% endfor %}
155 </ul>
156 </dd>
157 </dl>
158 {%elif task.outcome == task.OUTCOME_CACHED%}
159 {% for t in task.get_related_setscene %}
160 {% if forloop.last %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600161 <a class="btn btn-default btn-lg"
162 href="{% url 'build_artifact' build.id "tasklogfile" t.pk %}">
163 Download task log
164 </a>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500165 {% endif %}
166 {% endfor %}
167
168 {%elif task.outcome == task.OUTCOME_EMPTY%}
169 <div class="alert alert-info details">
170 This task is empty because it has the <code>noexec</code> flag set to <code>1</code>, or the task function is empty
171 </div>
172 {% endif %}
173{% endif %}
174
175{# Execution section #}
176 {% if task.task_executed %}
177 <h2>
178 Executed
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600179 <span class="glyphicon glyphicon-question-sign get-help"
180 title="'Executed' tasks are those that need to run in order to
181 generate the task output"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500182 {% else %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600183 <h2>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500184 Not Executed
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600185 <span class="glyphicon glyphicon-question-sign get-help" title="'Not
186 executed' tasks don't need to run because their outcome is provided
187 by another task"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500188 {% endif %}
189 </h2>
190
191<dl class="dl-horizontal">
192 <dt>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600193 <span class="glyphicon glyphicon-question-sign get-help" title="To make builds more
194 efficient, the build system detects changes in the 'inputs' to a
195 given task by creating a 'task signature'. If the signature changes,
196 the build system assumes the inputs have changed and the task needs to be
197rerun"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500198 Task inputs signature
199 </dt>
200 <dd>
201 {{task.sstate_checksum}}
202 </dd>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500203 {% if task.sstate_result != task.SSTATE_NA %}
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600204 </dl>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500205 <div class="alert alert-info">Attempting to restore output from sstate cache
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600206 <span class="glyphicon glyphicon-question-sign get-help
207 get-help-blue" title="The build system is searching for the
208 task output in your <code>sstate-cache</code> directory and
209 mirrors. If the build system finds the task output, it will reuse it
210 instead of building it from scratch by running the real task. Reusing the
211 task output makes the build faster"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500212 </div>
213 <dl class="dl-horizontal">
214 <dt>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600215 <span class="glyphicon glyphicon-question-sign get-help" title="The name of the
216 file searched for in your <code>sstate-cache</code>
217 directory and mirrors"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500218 File searched for
219 </dt>
220 <dd><code>{{task.path_to_sstate_obj}}</code></dd>
221 <dt>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600222 <span class="glyphicon glyphicon-question-sign get-help" title="The locations
223 searched for the above file (i.e. your
224 <code>sstate-cache</code> directory and any mirrors you have
225 set up)"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500226 URI(s) searched
227 </dt>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600228 <dd><ul class="list-unstyled">{% for uri in uri_list %}<li><code>{{uri}}</code></li>{% endfor %}</ul></dd>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500229 </dl>
230 {% endif %}
231 {% if task.sstate_result == task.SSTATE_MISS %}
232 <div class="alert alert-info">
233 <strong>File not in sstate cache.</strong> Running the real task instead.
234 </div>
235 {% elif task.sstate_result == task.SSTATE_FAILED%}
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600236 <div class="alert alert-warning">
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500237 <strong>Failed</strong> to restore output from sstate cache. The file was found but could not be unpacked.
238 </div>
239 <dl class="dl-horizontal">
240 <a href="{% url 'build_artifact' build.id "tasklogfile" task.pk %}" style="margin:15px;">Download log</a>
241 </dl>
242 <div class="alert alert-info">
243 Running the real task instead.
244 </div>
245 {% elif task.sstate_result == task.SSTATE_RESTORED %}
246 <div class="alert alert-info">
247 Output <strong>successfully restored</strong> from sstate cache.
248 </div>
249 {% endif %}
250 <dl class="dl-horizontal">
251 <dt>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600252 <span class="glyphicon glyphicon-question-sign get-help" title="The
253 running sequence of each task in the build"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500254 Task order
255 </dt>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600256 <dd><a href="{%url "tasks" build.pk %}?page={{task_in_tasks_table_pg}}&limit=25#task-{{task.order}}">{{task.order}}</a></dd>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500257 {% if task.task_executed %}
258 <dt>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600259 <span class="glyphicon glyphicon-question-sign get-help"
260 title="Indicates if this task executes a Python or Shell
261 function(s)"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500262 Task script type
263 </dt>
264 <dd>{{task.get_script_type_display}}</dd>
265 {% endif %}
266<!--
267 <dt>
268 <i class="icon-question-sign get-help" title="The code executed by the task"></i>
269 Task executable output
270 </dt>
271 <dd><code>{{task.source_url}}</code></dd>
272-->
273 <dt>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600274 <span class="glyphicon glyphicon-question-sign get-help" title="Task dependency chain
275 (i.e. other tasks)"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500276 Dependencies
277 </dt>
278 <dd>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600279 <ul class="list-unstyled">
280 {% for dep in deps %}
281 <li><a href="{%url 'task' dep.build.pk dep.pk%}" class="task-info" title="{{dep.get_executed_display}} | {{dep.get_outcome_display}}">{{dep.recipe.name}}_{{dep.recipe.version}} <span class="task-name">{{dep.task_name}}</span></a></li>
282 {% empty %}
283 <li class="text-muted" style="margin-bottom: -10px;">This task has no dependencies</li>
284 {% endfor %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500285 </ul>
286 </dd>
287 <dt>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600288 <span class="glyphicon glyphicon-question-sign get-help" title="Tasks that depend on this
289 task"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500290 Reverse dependencies
291 </dt>
292 <dd>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600293 <ul class="list-unstyled">
294 {% for dep in rdeps %}
295 <li><a href="{%url 'task' dep.build.pk dep.pk%}" class="task-info" title="{{dep.get_executed_display}} | {{dep.get_outcome_display}}">{{dep.recipe.name}}_{{dep.recipe.version}} <span class="task-name">{{dep.task_name}}</span></a></li>
296 {% empty %}
297 <li class="text-muted">This task has no reverse dependencies</li>
298 {% endfor %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500299 </ul>
300</dl>
301
302{# Performance section - shown only for executed tasks #}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500303{%if task.elapsed_time or task.cpu_time_user or task.cpu_time_system or task.disk_io %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500304 <h2 class="details">Performance</h2>
305{% endif %}
306 <dl class="dl-horizontal">
307 {% if task.elapsed_time %}
308 <dt>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600309 <span class="glyphicon glyphicon-question-sign get-help" title="How
310 long it took the task to finish in seconds"></span>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500311 Time (secs)
312 </dt>
313 <dd>{{task.elapsed_time|format_none_and_zero|floatformat:2}}</dd>
314 {% endif %}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500315 {% if task.cpu_time_user > 0 %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500316 <dt>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600317 <span class="glyphicon glyphicon-question-sign get-help" title="Total amount of time
318 spent executing in user mode, in seconds. Note that this time
319 can be greater than the task time due to parallel
320 execution."></span>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500321 User CPU time (secs)
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500322 </dt>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500323 <dd>{{task.cpu_time_user|format_none_and_zero|floatformat:2}}</dd>
324 {% endif %}
325 {% if task.cpu_time_system > 0 %}
326 <dt>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600327 <span class="glyphicon glyphicon-question-sign get-help" title="Total amount of time
328 spent executing in kernel mode, in seconds. Note that this time
329 can be greater than the task time due to parallel
330 execution."></span>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500331 System CPU time (secs)
332 </dt>
333 <dd>{{task.cpu_time_system|format_none_and_zero|floatformat:2}}</dd>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500334 {% endif %}
335 {% if task.disk_io > 0 %}
336 <dt>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600337 <span class="glyphicon glyphicon-question-sign get-help" title="Number of bytes
338 written to and read from the disk during the task"></span>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500339 Disk I/O (bytes)
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500340 </dt>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500341 <dd>{{task.disk_io|format_none_and_zero|intcomma}}</dd>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500342 {% endif %}
343 </dl>
344
345</div>
Patrick Williamsc0f7c042017-02-23 20:41:17 -0600346
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500347{% endblock %}
348