blob: 5768262432eb46f87f41fb2974f60d18cda3a864 [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
14<div class="row span11">
15 <div class="page-header">
16 <h1><a href="{%url 'recipe' build.pk task.recipe.pk %}">{{task.recipe.name}}_{{task.recipe.version}}</a> {{task.task_name}}</h1>
17 </div>
18
19{# Outcome section #}
20<h2 {{ task|task_color:True }}>
21 {{task.get_outcome_display}}
22 <i class="icon-question-sign get-help heading-help" title="{{task.get_outcome_help}}"></i>
23</h2>
24{%if task.task_executed %}
25 {# executed tasks outcome #}
26 {% if task.logfile %}
27 <a class="btn btn-large" href="{% url 'build_artifact' build.id "tasklogfile" task.pk %}" style="margin:15px;">Download task log</a>
28 {% endif %}
29 {# show stack trace for failed task #}
30 {% if task.outcome == task.OUTCOME_FAILED and log_head %}
31 <h3>Python stack trace</h3>
32 <div>
33 <pre style="min-height:160px;">
34 <code>{{log_head}}</code><a id="full-trace-show" data-target="#fulltrace" data-toggle="collapse" class="btn btn-mini">...</a>
35 <div id="fulltrace" class="collapse" style="margin-top: -20px; height: 0px;">
36 <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>
37 </div>
38 {% endif %}
39{% else %}
40{# not executed tasks outcome #}
41 {% if task.outcome == task.OUTCOME_PREBUILT %}
42 {% if not showing_matches %}
43 <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>
44 {% elif matching_tasks %}
45 <h3 class="details">Prebuilt task could be based on
46 <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>
47 </h3>
48 <table class="table table-bordered table-hover">
49 <thead>
50 <th>
51 <i class="icon-question-sign get-help" title="The name of the recipe to which each task applies"></i>
52 Recipe
53 </th>
54 <th>
55 <i class="icon-question-sign get-help" title="The name of the task"></i>
56 Task
57 </th>
58 <th>
59 <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>
60 Executed
61 </th>
62 <th>
63 <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>
64 Outcome
65 </th>
66 <th>
67 <i class="icon-question-sign get-help" title="The date and time the build finished"></i>
68 Build completed on
69 </th>
70 </thead>
71 <tbody>
72 {% for match in matching_tasks %}
73 <tr {{ match|task_color }}>
74 <td>
75 <a href="{%url "task" match.build.pk match.pk%}">{{match.recipe.name}}</a>
76 </td>
77 <td>
78 <a href="{%url "task" match.build.pk match.pk%}">{{match.task_name}}</a>
79 {% if task.get_description %}
80 <i class="icon-question-sign get-help hover-help" title="{{task.get_description}}"></i>
81 {% endif %}
82 </td>
83 <td>
84 <a href="{%url "task" match.build.pk match.pk%}">{{match.get_executed_display}}</a>
85 </td>
86 <td>
87 <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>
88 </td>
89 <td>
90 <a href="{%url "task" match.build.pk match.pk%}">{{match.build.completed_on|date:"d/m/y H:i"}}</a>
91 </td>
92 </tr>
93 {% endfor %}
94 </tbody>
95 </table>
96 {% else %}
97 <p class="alert">
98 <strong> We have found no tasks matching this prebuilt task</strong><br/>
99 The task you are looking for could belong to a build for which Toaster has no data.
100 </p>
101 {% endif %}
102 {% elif task.outcome == task.OUTCOME_COVERED %}
103 <dl class="dl-horizontal">
104 <dt>
105 <i class="icon-question-sign get-help" title="The task(s) providing the outcome of this task"></i> Task covered by
106 </dt>
107 <dd>
108 <ul>
109 {% for t in covered_by %}
110 <li>
111 <a href="{%url 'task' t.build.pk t.pk%}"
112 class="task-info"
113 title="{{t.get_executed_display}} | {{t.get_outcome_display}}">
114 {{t.recipe.name}}_{{t.recipe.version}}
115 {{t.task_name}}
116 </a>
117 </li>
118 {% endfor %}
119 </ul>
120 </dd>
121 </dl>
122 {%elif task.outcome == task.OUTCOME_CACHED%}
123 {% for t in task.get_related_setscene %}
124 {% if forloop.last %}
125 <a class="btn btn-large" href="{% url 'build_artifact' build.id "tasklogfile" t.pk %}" style="margin:15px;">Download task log</a>
126 {% endif %}
127 {% endfor %}
128
129 {%elif task.outcome == task.OUTCOME_EMPTY%}
130 <div class="alert alert-info details">
131 This task is empty because it has the <code>noexec</code> flag set to <code>1</code>, or the task function is empty
132 </div>
133 {% endif %}
134{% endif %}
135
136{# Execution section #}
137 {% if task.task_executed %}
138 <h2>
139 Executed
140 <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>
141 {% else %}
142 <h2 class="muted">
143 Not Executed
144 <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>
145 {% endif %}
146 </h2>
147
148<dl class="dl-horizontal">
149 <dt>
150 <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>
151 Task inputs signature
152 </dt>
153 <dd>
154 {{task.sstate_checksum}}
155 </dd>
156</dl>
157 {% if task.sstate_result != task.SSTATE_NA %}
158 <div class="alert alert-info">Attempting to restore output from sstate cache
159 <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>
160 </div>
161 <dl class="dl-horizontal">
162 <dt>
163 <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>
164 File searched for
165 </dt>
166 <dd><code>{{task.path_to_sstate_obj}}</code></dd>
167 <dt>
168 <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>
169 URI(s) searched
170 </dt>
171 <dd><ul>{% for uri in uri_list %}<li><code>{{uri}}</code></li>{% endfor %}</ul></dd>
172 </dl>
173 {% endif %}
174 {% if task.sstate_result == task.SSTATE_MISS %}
175 <div class="alert alert-info">
176 <strong>File not in sstate cache.</strong> Running the real task instead.
177 </div>
178 {% elif task.sstate_result == task.SSTATE_FAILED%}
179 <div class="alert">
180 <strong>Failed</strong> to restore output from sstate cache. The file was found but could not be unpacked.
181 </div>
182 <dl class="dl-horizontal">
183 <a href="{% url 'build_artifact' build.id "tasklogfile" task.pk %}" style="margin:15px;">Download log</a>
184 </dl>
185 <div class="alert alert-info">
186 Running the real task instead.
187 </div>
188 {% elif task.sstate_result == task.SSTATE_RESTORED %}
189 <div class="alert alert-info">
190 Output <strong>successfully restored</strong> from sstate cache.
191 </div>
192 {% endif %}
193 <dl class="dl-horizontal">
194 <dt>
195 <i class="icon-question-sign get-help" title="The running sequence of each task in the build"></i>
196 Task order
197 </dt>
198 <dd><a href="{%url "tasks_task" build.pk task.order %}#{{task.order}}">{{task.order}}</a></dd>
199 {% if task.task_executed %}
200 <dt>
201 <i class="icon-question-sign get-help" title="Indicates if this task executes a Python or Shell function(s)"></i>
202 Task script type
203 </dt>
204 <dd>{{task.get_script_type_display}}</dd>
205 {% endif %}
206<!--
207 <dt>
208 <i class="icon-question-sign get-help" title="The code executed by the task"></i>
209 Task executable output
210 </dt>
211 <dd><code>{{task.source_url}}</code></dd>
212-->
213 <dt>
214 <i class="icon-question-sign get-help" title="Task dependency chain (i.e. other tasks)"></i>
215 Dependencies
216 </dt>
217 <dd>
218 <ul>
219 {% for dep in deps %}
220 <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>
221 {% empty %}
222 <li class="muted">This task has no dependencies</li>
223 {% endfor %}
224 </ul>
225 </dd>
226 <dt>
227 <i class="icon-question-sign get-help" title="Tasks that depend on this task"></i>
228 Reverse dependencies
229 </dt>
230 <dd>
231 <ul>
232 {% for dep in rdeps %}
233 <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>
234 {% empty %}
235 <li class="muted">This task has no reverse dependencies</li>
236 {% endfor %}
237 </ul>
238</dl>
239
240{# Performance section - shown only for executed tasks #}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500241{%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 -0500242 <h2 class="details">Performance</h2>
243{% endif %}
244 <dl class="dl-horizontal">
245 {% if task.elapsed_time %}
246 <dt>
247 <i class="icon-question-sign get-help" title="How long it took the task to finish in seconds"></i>
248 Time (secs)
249 </dt>
250 <dd>{{task.elapsed_time|format_none_and_zero|floatformat:2}}</dd>
251 {% endif %}
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500252 {% if task.cpu_time_user > 0 %}
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500253 <dt>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500254 <i class="icon-question-sign get-help" title="Total amount of time spent executing in user mode, in seconds. Note that this time can be greater than the task time due to parallel execution."></i>
255 User CPU time (secs)
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500256 </dt>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500257 <dd>{{task.cpu_time_user|format_none_and_zero|floatformat:2}}</dd>
258 {% endif %}
259 {% if task.cpu_time_system > 0 %}
260 <dt>
261 <i class="icon-question-sign get-help" title="Total amount of time spent executing in kernel mode, in seconds. Note that this time can be greater than the task time due to parallel execution."></i>
262 System CPU time (secs)
263 </dt>
264 <dd>{{task.cpu_time_system|format_none_and_zero|floatformat:2}}</dd>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500265 {% endif %}
266 {% if task.disk_io > 0 %}
267 <dt>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500268 <i class="icon-question-sign get-help" title="Number of bytes written to and read from the disk during the task"></i>
269 Disk I/O (bytes)
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500270 </dt>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -0500271 <dd>{{task.disk_io|format_none_and_zero|intcomma}}</dd>
Patrick Williamsc124f4f2015-09-15 14:41:29 -0500272 {% endif %}
273 </dl>
274
275</div>
276{% endblock %}
277