<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>6834</bug_id>
          
          <creation_ts>2014-10-14 12:33:02 +0000</creation_ts>
          <short_desc>provide way to download artifacts from the build environment</short_desc>
          <delta_ts>2015-01-20 16:22:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Toaster</product>
          <component>toaster</component>
          <version>1.8</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.8 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexandru Damian">alexandru.damian</reporter>
          <assigned_to name="Alexandru Damian">alexandru.damian</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>alexandru.damian</cc>
    
    <cc>belen.barros.pena</cc>
    
    <cc>bluelightning</cc>
    
    <cc>cristiana.voicu</cc>
          
          <qa_contact name="Ionut Chisanovici">ionutx.chisanovici</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>46310</commentid>
    <comment_count>0</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2014-10-14 12:33:02 +0000</bug_when>
    <thetext>Toaster must provide infrastructure to download information from the build environments, provided that the information is still there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46316</commentid>
    <comment_count>1</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2014-10-14 12:56:55 +0000</bug_when>
    <thetext>Ready for review, with the considerations -

* only task log files and log message files are available for download
* it does not collect files, only retrieves them if the build environment is still there
* the UI changes are made only for demo purposes, and they need to be redone to complete bug 6837</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46342</commentid>
    <comment_count>2</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2014-10-15 16:26:27 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Ready for review, with the considerations -
&gt; 
&gt; * only task log files and log message files are available for download

I don&apos;t think we can set this to &apos;in progress review&apos; without providing a way to download the root file system files. Without this functionality, Toaster is badly crippled.

&gt; * it does not collect files, only retrieves them if the build environment is
&gt; still there

When we discussed the scope of this feature we agreed that failed task logs and cooker logs for failed builds would be kept independently of the existence of the build directory.

I am going to change this back to &apos;in progress implementation&apos; for the moment, since the current implementation seems a bit premature. 

&gt; * the UI changes are made only for demo purposes, and they need to be redone
&gt; to complete bug 6837

Just a note: the UI was designed for the full scope that we agreed when we discussed this feature. Whomever tries to implement might find some pieces missing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46343</commentid>
    <comment_count>3</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2014-10-15 16:32:16 +0000</bug_when>
    <thetext>ah, I just saw that the original bug was broken down: my bad. Changing back to in progress review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46764</commentid>
    <comment_count>4</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2014-11-05 17:45:31 +0000</bug_when>
    <thetext>Review of this posted to the mailing list

https://lists.yoctoproject.org/pipermail/toaster/2014-October/001443.html

I can see that for executed tasks, the path to the log file is now a link.
But when I click this link to download the task log, I get this error:

Environment:


Request Method: GET
Request URL:
http://0.0.0.0:8000/toastergui/build/2/artifact/tasklogfile/id/2127

Django Version: 1.6
Python Version: 2.7.3
Installed Applications:
(&apos;django.contrib.auth&apos;,
&apos;django.contrib.contenttypes&apos;,
&apos;django.contrib.messages&apos;,
&apos;django.contrib.sessions&apos;,
&apos;django.contrib.admin&apos;,
&apos;django.contrib.staticfiles&apos;,
&apos;django.contrib.humanize&apos;,
&apos;orm&apos;,
&apos;toastermain&apos;,
&apos;south&apos;,
&apos;toastergui&apos;,
&apos;bldviewer&apos;,
&apos;bldcontrol&apos;)
Installed Middleware:
(&apos;django.middleware.common.CommonMiddleware&apos;,
&apos;django.contrib.sessions.middleware.SessionMiddleware&apos;,
&apos;django.middleware.csrf.CsrfViewMiddleware&apos;,
&apos;django.contrib.auth.middleware.AuthenticationMiddleware&apos;,
&apos;django.contrib.messages.middleware.MessageMiddleware&apos;)


Traceback:
File &quot;/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py&quot;
in get_response
  114.                     response = wrapped_callback(request,
*callback_args, **callback_kwargs)
File &quot;/home/yocto/toaster2/bitbake/lib/toaster/toastergui/views.py&quot; in
build_artifact
  2639.                 content_type =
b.buildrequest.environment.get_artifact_type(file_name)
File &quot;/home/yocto/toaster2/bitbake/lib/toaster/bldcontrol/models.py&quot;
in get_artifact_type
  45.             import magic

Exception Type: ImportError at
/toastergui/build/2/artifact/tasklogfile/id/2127
Exception Value: No module named magic</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47399</commentid>
    <comment_count>5</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2014-12-05 15:23:54 +0000</bug_when>
    <thetext>Sent for review to the toaster mail list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47722</commentid>
    <comment_count>6</comment_count>
    <who name="Belen Barros Pena">belen.barros.pena</who>
    <bug_when>2015-01-04 11:36:24 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Sent for review to the toaster mail list.

Review posted to the mailing list

https://lists.yoctoproject.org/pipermail/toaster/2014-December/001525.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47830</commentid>
    <comment_count>7</comment_count>
    <who name="Alexandru Damian">alexandru.damian</who>
    <bug_when>2015-01-09 11:56:18 +0000</bug_when>
    <thetext>Merged in master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48093</commentid>
    <comment_count>8</comment_count>
    <who name="Ionut Chisanovici">ionutx.chisanovici</who>
    <bug_when>2015-01-20 16:22:52 +0000</bug_when>
    <thetext>Hi,

The issue is fixed and verified in master 1.8 M2 RC1.
Tasks log files and image artifacts can be downloaded.

Cheers,
Ionut C</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>