blob: 635098a0245d2c238331b9d94cd28f87342a1cb0 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001{% extends "basebuilddetailpage.html" %}
2
3{% load projecttags %}
4{% load humanize %}
5
6{% block localbreadcrumb %}
7<li><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
8<li>{{task.recipe.name}}_{{task.recipe.version}} {{task.task_name}}</li>
9{% endblock %}
10
11{% block pagedetailinfomain %}
12
13<div class="row span11">
14 <div class="page-header">
15 <h1><a href="{%url 'recipe' build.pk task.recipe.pk %}">{{task.recipe.name}}_{{task.recipe.version}}</a> {{task.task_name}}</h1>
16 </div>
17
18{# Outcome section #}
19<h2 {{ task|task_color:True }}>
20 {{task.get_outcome_display}}
21 <i class="icon-question-sign get-help heading-help" title="{{task.get_outcome_help}}"></i>
22</h2>
23{%if task.task_executed %}
24 {# executed tasks outcome #}
25 {% if task.logfile %}
26 <a class="btn btn-large" href="{% url 'build_artifact' build.id "tasklogfile" task.pk %}" style="margin:15px;">Download task log</a>
27 {% endif %}
28 {# show stack trace for failed task #}
29 {% if task.outcome == task.OUTCOME_FAILED and log_head %}
30 <h3>Python stack trace</h3>
31 <div>
32 <pre style="min-height:160px;">
33 <code>{{log_head}}</code><a id="full-trace-show" data-target="#fulltrace" data-toggle="collapse" class="btn btn-mini">...</a>
34 <div id="fulltrace" class="collapse" style="margin-top: -20px; height: 0px;">
35 <code>{{log_body}}</code><br><a id="full-trace-hide" class="btn btn-mini collapsed" style="font-family:Helvetica Neue" data-target="#fulltrace" data-toggle="collapse">Collapse stack trace<i class="icon-caret-up"></i></a></div></pre>
36 </div>
37 {% endif %}
38{% else %}
39{# not executed tasks outcome #}
40 {% if task.outcome == task.OUTCOME_PREBUILT %}
41 {% if not showing_matches %}
42 <a class="btn" href="javascript:reload_params({'show_matches' : 'true' })">Match to tasks in previous builds <i class="icon-question-sign get-help" style="margin-top:20px;" title="This shows you a list of tasks from previous builds with the same signature generated from the same inputs as used in the prebuilt task. Any of them could be the task that generated the output this prebuilt task is reusing"></i></a>
43 {% elif matching_tasks %}
44 <h3 class="details">Prebuilt task could be based on
45 <i class="icon-question-sign get-help heading-help" title="This table shows a list of tasks from previous builds with the same signature generated from the same inputs as used in the prebuilt task. Any of them could be the task that generated the output this prebuilt task is reusing"></i>
46 </h3>
47 <table class="table table-bordered table-hover">
48 <thead>
49 <th>
50 <i class="icon-question-sign get-help" title="The name of the recipe to which each task applies"></i>
51 Recipe
52 </th>
53 <th>
54 <i class="icon-question-sign get-help" title="The name of the task"></i>
55 Task
56 </th>
57 <th>
58 <i class="icon-question-sign get-help" title="This value tells you if a task had to run (executed) in order to generate the task output, or if the output was provided by another task and therefore the task didn't need to run (not executed)"></i>
59 Executed
60 </th>
61 <th>
62 <i class="icon-question-sign get-help" title="This column tells you if 'executed' tasks succeeded or failed. The column also tells you why 'not executed' tasks did not need to run"></i>
63 Outcome
64 </th>
65 <th>
66 <i class="icon-question-sign get-help" title="The date and time the build finished"></i>
67 Build completed on
68 </th>
69 </thead>
70 <tbody>
71 {% for match in matching_tasks %}
72 <tr {{ match|task_color }}>
73 <td>
74 <a href="{%url "task" match.build.pk match.pk%}">{{match.recipe.name}}</a>
75 </td>
76 <td>
77 <a href="{%url "task" match.build.pk match.pk%}">{{match.task_name}}</a>
78 {% if task.get_description %}
79 <i class="icon-question-sign get-help hover-help" title="{{task.get_description}}"></i>
80 {% endif %}
81 </td>
82 <td>
83 <a href="{%url "task" match.build.pk match.pk%}">{{match.get_executed_display}}</a>
84 </td>
85 <td>
86 <a href="{%url "task" match.build.pk match.pk%}">{{match.get_outcome_display}} </a><i class="icon-question-sign get-help hover-help" title="{{match.get_outcome_help}}"></i>
87 </td>
88 <td>
89 <a href="{%url "task" match.build.pk match.pk%}">{{match.build.completed_on|date:"d/m/y H:i"}}</a>
90 </td>
91 </tr>
92 {% endfor %}
93 </tbody>
94 </table>
95 {% else %}
96 <p class="alert">
97 <strong> We have found no tasks matching this prebuilt task</strong><br/>
98 The task you are looking for could belong to a build for which Toaster has no data.
99 </p>
100 {% endif %}
101 {% elif task.outcome == task.OUTCOME_COVERED %}
102 <dl class="dl-horizontal">
103 <dt>
104 <i class="icon-question-sign get-help" title="The task(s) providing the outcome of this task"></i> Task covered by
105 </dt>
106 <dd>
107 <ul>
108 {% for t in covered_by %}
109 <li>
110 <a href="{%url 'task' t.build.pk t.pk%}"
111 class="task-info"
112 title="{{t.get_executed_display}} | {{t.get_outcome_display}}">
113 {{t.recipe.name}}_{{t.recipe.version}}
114 {{t.task_name}}
115 </a>
116 </li>
117 {% endfor %}
118 </ul>
119 </dd>
120 </dl>
121 {%elif task.outcome == task.OUTCOME_CACHED%}
122 {% for t in task.get_related_setscene %}
123 {% if forloop.last %}
124 <a class="btn btn-large" href="{% url 'build_artifact' build.id "tasklogfile" t.pk %}" style="margin:15px;">Download task log</a>
125 {% endif %}
126 {% endfor %}
127
128 {%elif task.outcome == task.OUTCOME_EMPTY%}
129 <div class="alert alert-info details">
130 This task is empty because it has the <code>noexec</code> flag set to <code>1</code>, or the task function is empty
131 </div>
132 {% endif %}
133{% endif %}
134
135{# Execution section #}
136 {% if task.task_executed %}
137 <h2>
138 Executed
139 <i class="icon-question-sign get-help heading-help" title="'Executed' tasks are those that need to run in order to generate the task output"></i>
140 {% else %}
141 <h2 class="muted">
142 Not Executed
143 <i class="icon-question-sign get-help heading-help" title="'Not executed' tasks don't need to run because their outcome is provided by another task"></i>
144 {% endif %}
145 </h2>
146
147<dl class="dl-horizontal">
148 <dt>
149 <i class="icon-question-sign get-help" title="To make builds more efficient, the build system detects changes in the 'inputs' to a given task by creating a 'task signature'. If the signature changes, the build system assumes the inputs have changed and the task needs to be rerun"></i>
150 Task inputs signature
151 </dt>
152 <dd>
153 {{task.sstate_checksum}}
154 </dd>
155</dl>
156 {% if task.sstate_result != task.SSTATE_NA %}
157 <div class="alert alert-info">Attempting to restore output from sstate cache
158 <i class="icon-question-sign get-help get-help-blue" title="The build system is searching for the task output in your <code>sstate-cache</code> directory and mirrors. If the build system finds the task output, it will reuse it instead of building it from scratch by running the real task. Reusing the task output makes the build faster"></i>
159 </div>
160 <dl class="dl-horizontal">
161 <dt>
162 <i class="icon-question-sign get-help" title="The name of the file searched for in your <code>sstate-cache</code> directory and mirrors"></i>
163 File searched for
164 </dt>
165 <dd><code>{{task.path_to_sstate_obj}}</code></dd>
166 <dt>
167 <i class="icon-question-sign get-help" title="The locations searched for the above file (i.e. your <code>sstate-cache</code> directory and any mirrors you have set up)"></i>
168 URI(s) searched
169 </dt>
170 <dd><ul>{% for uri in uri_list %}<li><code>{{uri}}</code></li>{% endfor %}</ul></dd>
171 </dl>
172 {% endif %}
173 {% if task.sstate_result == task.SSTATE_MISS %}
174 <div class="alert alert-info">
175 <strong>File not in sstate cache.</strong> Running the real task instead.
176 </div>
177 {% elif task.sstate_result == task.SSTATE_FAILED%}
178 <div class="alert">
179 <strong>Failed</strong> to restore output from sstate cache. The file was found but could not be unpacked.
180 </div>
181 <dl class="dl-horizontal">
182 <a href="{% url 'build_artifact' build.id "tasklogfile" task.pk %}" style="margin:15px;">Download log</a>
183 </dl>
184 <div class="alert alert-info">
185 Running the real task instead.
186 </div>
187 {% elif task.sstate_result == task.SSTATE_RESTORED %}
188 <div class="alert alert-info">
189 Output <strong>successfully restored</strong> from sstate cache.
190 </div>
191 {% endif %}
192 <dl class="dl-horizontal">
193 <dt>
194 <i class="icon-question-sign get-help" title="The running sequence of each task in the build"></i>
195 Task order
196 </dt>
197 <dd><a href="{%url "tasks_task" build.pk task.order %}#{{task.order}}">{{task.order}}</a></dd>
198 {% if task.task_executed %}
199 <dt>
200 <i class="icon-question-sign get-help" title="Indicates if this task executes a Python or Shell function(s)"></i>
201 Task script type
202 </dt>
203 <dd>{{task.get_script_type_display}}</dd>
204 {% endif %}
205<!--
206 <dt>
207 <i class="icon-question-sign get-help" title="The code executed by the task"></i>
208 Task executable output
209 </dt>
210 <dd><code>{{task.source_url}}</code></dd>
211-->
212 <dt>
213 <i class="icon-question-sign get-help" title="Task dependency chain (i.e. other tasks)"></i>
214 Dependencies
215 </dt>
216 <dd>
217 <ul>
218 {% for dep in deps %}
219 <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>
220 {% empty %}
221 <li class="muted">This task has no dependencies</li>
222 {% endfor %}
223 </ul>
224 </dd>
225 <dt>
226 <i class="icon-question-sign get-help" title="Tasks that depend on this task"></i>
227 Reverse dependencies
228 </dt>
229 <dd>
230 <ul>
231 {% for dep in rdeps %}
232 <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>
233 {% empty %}
234 <li class="muted">This task has no reverse dependencies</li>
235 {% endfor %}
236 </ul>
237</dl>
238
239{# Performance section - shown only for executed tasks #}
240{%if task.elapsed_time or task.cpu_usage or task.disk_io %}
241 <h2 class="details">Performance</h2>
242{% endif %}
243 <dl class="dl-horizontal">
244 {% if task.elapsed_time %}
245 <dt>
246 <i class="icon-question-sign get-help" title="How long it took the task to finish in seconds"></i>
247 Time (secs)
248 </dt>
249 <dd>{{task.elapsed_time|format_none_and_zero|floatformat:2}}</dd>
250 {% endif %}
251 {% if task.cpu_usage > 0 %}
252 <dt>
253 <i class="icon-question-sign get-help" title="The percentage of task CPU utilization"></i>
254 CPU usage
255 </dt>
256 <dd>{{task.cpu_usage|format_none_and_zero|floatformat:2}}%</dd>
257 {% endif %}
258 {% if task.disk_io > 0 %}
259 <dt>
260 <i class="icon-question-sign get-help" title="Number of miliseconds the task spent doing disk input and output"></i>
261 Disk I/O (ms)
262 </dt>
263 <dd>{{task.disk_io|format_none_and_zero}}</dd>
264 {% endif %}
265 </dl>
266
267</div>
268{% endblock %}
269