Bug 6834 - provide way to download artifacts from the build environment
Summary: provide way to download artifacts from the build environment
Status: VERIFIED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: 1.8
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 1.8 M2
Assignee: Alexandru Damian
QA Contact: Ionut Chisanovici
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-10-14 12:33 UTC by Alexandru Damian
Modified: 2015-01-20 16:22 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Damian 2014-10-14 12:33:02 UTC
Toaster must provide infrastructure to download information from the build environments, provided that the information is still there.
Comment 1 Alexandru Damian 2014-10-14 12:56:55 UTC
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
Comment 2 Belen Barros Pena 2014-10-15 16:26:27 UTC
(In reply to comment #1)
> Ready for review, with the considerations -
> 
> * only task log files and log message files are available for download

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

> * it does not collect files, only retrieves them if the build environment is
> 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 'in progress implementation' for the moment, since the current implementation seems a bit premature. 

> * the UI changes are made only for demo purposes, and they need to be redone
> 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.
Comment 3 Belen Barros Pena 2014-10-15 16:32:16 UTC
ah, I just saw that the original bug was broken down: my bad. Changing back to in progress review.
Comment 4 Belen Barros Pena 2014-11-05 17:45:31 UTC
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:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.messages',
'django.contrib.sessions',
'django.contrib.admin',
'django.contrib.staticfiles',
'django.contrib.humanize',
'orm',
'toastermain',
'south',
'toastergui',
'bldviewer',
'bldcontrol')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')


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

Exception Type: ImportError at
/toastergui/build/2/artifact/tasklogfile/id/2127
Exception Value: No module named magic
Comment 5 Alexandru Damian 2014-12-05 15:23:54 UTC
Sent for review to the toaster mail list.
Comment 6 Belen Barros Pena 2015-01-04 11:36:24 UTC
(In reply to comment #5)
> Sent for review to the toaster mail list.

Review posted to the mailing list

https://lists.yoctoproject.org/pipermail/toaster/2014-December/001525.html
Comment 7 Alexandru Damian 2015-01-09 11:56:18 UTC
Merged in master.
Comment 8 Ionut Chisanovici 2015-01-20 16:22:52 UTC
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