Skip to contentSkip to conversation

python3 issues

DISCUSSION Barros Pena, Belen 2 participants 3 messages Jun 2, 2016 – Jun 3, 2016

lore
Share & tools
lore
#0 lore raw

I was asked to look at the branch that makes sure Toaster works with python 3

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=ed/oe/python3

I've found a few issues. I am not a 100% sure if they are this branch only or if they also happen in master (python3 changes apparently have been merged), but I thought I'd share early. Here comes the list:

* We need to remove old releases from toasterconf.json, since the change to Python 3 means we can no longer support those. Ed is already on the case, I believe

* Image artifact downloads don't seem to be working (all other artifacts are fine)

Environment:

Request Method: GET
Request URL:
http://icarus.isw.intel.com:8000/toastergui/build/4/artifact/imagefile/id/1

Django Version: 1.8.13
Python Version: 3.4.3
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.messages', 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.staticfiles', 'django.contrib.humanize',
'bldcollector',
'toastermain',
'bldcontrol',
'orm',
'toastergui')
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 "/home/belen/.local/lib/python3.4/site-packages/django/core/handlers/base.p y" in get_response
132. response = wrapped_callback(request,
*callback_args, **callback_kwargs)
File "/home/belen/toaster-python3/bitbake/lib/toaster/toastergui/views.py" in build_artifact
2991. response = HttpResponse(fsock, content_type =
content_type)
File "/home/belen/.local/lib/python3.4/site-packages/django/http/response.py" in __init__
342. self.content = content
File "/home/belen/.local/lib/python3.4/site-packages/django/http/response.py" in content
363. value = b''.join(self.make_bytes(chunk) for chunk in
value)
File "/home/belen/.local/lib/python3.4/site-packages/django/http/response.py" in <genexpr>
363. value = b''.join(self.make_bytes(chunk) for chunk in
value)
File "/usr/lib/python3.4/codecs.py" in decode
319. (result, consumed) = self._buffer_decode(data, self.errors,
final)

Exception Type: UnicodeDecodeError at /toastergui/build/4/artifact/imagefile/id/1
Exception Value: 'utf-8' codec can't decode byte 0xdb in position 1032:
invalid continuation byte

==============================================================

* Filters in the tasks page (build information) don't seem to be working. All of them return an error

Environment:

Request Method: GET
Request URL:
http://icarus.isw.intel.com:8000/toastergui/build/4/tasks/?orderby=order%3A
%2B&count=25&filter=task_executed%3A1&page=1&search=

Django Version: 1.8.13
Python Version: 3.4.3
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.messages', 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.staticfiles', 'django.contrib.humanize',
'bldcollector',
'toastermain',
'bldcontrol',
'orm',
'toastergui')
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 "/home/belen/.local/lib/python3.4/site-packages/django/core/handlers/base.p y" in get_response
132. response = wrapped_callback(request,
*callback_args, **callback_kwargs)
File "/home/belen/toaster-python3/bitbake/lib/toaster/toastergui/views.py" in tasks
1263. return tasks_common(request, build_id, 'tasks', '')
File "/home/belen/toaster-python3/bitbake/lib/toaster/toastergui/views.py" in tasks_common
1066. queryset = _get_queryset(Task, queryset_all,
filter_string, search_term, ordering_string, 'order')
File "/home/belen/toaster-python3/bitbake/lib/toaster/toastergui/views.py" in _get_queryset
354. filter_query = _get_filtering_query(filter_string)
File "/home/belen/toaster-python3/bitbake/lib/toaster/toastergui/views.py" in _get_filtering_query
271. x = __get_q_for_val(k, val)

Exception Type: NameError at /toastergui/build/4/tasks/ Exception Value: name 'k' is not defined

========================================================

* The variables table returns an error

Environment:

Request Method: GET
Request URL:
http://icarus.isw.intel.com:8000/toastergui/build/4/configvars?orderby=vari
able_name%3A%2B&page=1&filter=description__regex%3A.%2B&count=100

Django Version: 1.8.13
Python Version: 3.4.3
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.messages', 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.staticfiles', 'django.contrib.humanize',
'bldcollector',
'toastermain',
'bldcontrol',
'orm',
'toastergui')
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 "/home/belen/.local/lib/python3.4/site-packages/django/core/handlers/base.p y" in get_response
132. response = wrapped_callback(request,
*callback_args, **callback_kwargs)
File "/home/belen/toaster-python3/bitbake/lib/toaster/toastergui/views.py" in configvars
1419. queryset = _get_queryset(Variable, queryset, filter_string,
search_term, ordering_string, 'variable_name')
File "/home/belen/toaster-python3/bitbake/lib/toaster/toastergui/views.py" in _get_queryset
354. filter_query = _get_filtering_query(filter_string)
File "/home/belen/toaster-python3/bitbake/lib/toaster/toastergui/views.py" in _get_filtering_query
271. x = __get_q_for_val(k, val)

Exception Type: NameError at /toastergui/build/4/configvars Exception Value: name 'k' is not defined

===========================================

* In the custom image details page, the add | remove filter is not
working: the filtering does not happen

* The all projects table is showing builds in progress information (builds in progress information should not appear in any tables)

* My builds for custom images don't seem to be working. I start them, but I never see any progress in the UI. The toaster_ui.log doesn't show them at all, so I am kind of confused.

I think that's it so far.

Cheers

Belén

#1 lore raw

I've been testing this branch; notes below.

Quoted 9 lines · Belen

I was asked to look at the branch that makes sure Toaster works with python 3

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=ed/oe/python3

I've found a few issues. I am not a 100% sure if they are this branch only or if they also happen in master (python3 changes apparently have been merged), but I thought I'd share early. Here comes the list:

I'm working on master, which includes these changes (Ed's branch has diverged from master slightly, but the important commits match between them).

Quoted 5 lines

* We need to remove old releases from toasterconf.json, since the change to Python 3 means we can no longer support those. Ed is already on the case, I believe

I've supplied patches for this to the appropriate mailing lists. I also did patches for the krogoth and jethro branches to remove master from the releases.

Quoted 3 lines

* Image artifact downloads don't seem to be working (all other artifacts are fine)

I haven't had a chance to test this yet, but will.

Quoted 3 lines

* Filters in the tasks page (build information) don't seem to be working. All of them return an error

I also see this error ("Exception Value: name 'k' is not defined"). I'll have a look this afternoon.

* The variables table returns an error

Quoted 1 line

Note that this is the same 'k' error as for the tasks page.

* In the custom image details page, the add | remove filter is not

Quoted 2 lines

working: the filtering does not happen

This is the same 'k' error again.

Quoted 3 lines

* The all projects table is showing builds in progress information (builds in progress information should not appear in any tables)

I haven't seen this (yet). I'll keep testing and see if it crops up.

Quoted 4 lines

* My builds for custom images don't seem to be working. I start them, but I never see any progress in the UI. The toaster_ui.log doesn't show them at all, so I am kind of confused.

I haven't tried this yet, but will.

Note that the tests need a small fix, as the version of Selenium I got when I used Python3 pip was different. We don't have this in toaster-requirements.txt, as it's only required for running the tests, but we should perhaps change the instructions to fix Selenium to a known version, too.

Elliot

Signature · 3 lines
Elliot Smith
Software Engineer
Intel Open Source Technology Centre
#2 lore raw

Quick update on progress.

I have fixed the 'k' issue, got the tests running again, and fixed the table filters. My work is here:

elliot/toaster/python3

NB this is a branch from master, rather than toaster-next, though I think my work shouldn't clash with toaster-next too much (fingers crossed).

However, I am seeing build failures which look like this:

NOTE: Preparing RunQueue
NOTE: Logging error 2: {'pathname':
'/home/ell/dev/toaster/poky/_toaster_clones/_git_git.yoctoproject.org_poky_master/bitbake/lib/bb/runqueue.py', 'lineno': 1202, 'message': 'An uncaught exception occured in runqueue,
please see the failure below:', 'build': <Build: 1 Project object
core-image-minimal>, 'level': 2}
ERROR: An uncaught exception occured in runqueue, please see the failure
below:

I haven't been able to track this down, but I'm not sure it's related to Python 3 changes. It could be, but my guess is it's something screwed up in my environment.

(I also had an earlier build failure because the python pygobject recipe was referred to incorrectly somewhere (python rather than python3), so the recipe couldn't be found; I put this down to something in my sstate-cache and tried another build, which resulted in the above.)

I'll continue investigating the image file download next week, once I get an image build which works correctly.

I couldn't reproduce the issue where the in progress builds show in the project builds table, though.

Elliot

Quoted 84 lines · Elliot

I've been testing this branch; notes below.

Quoted 10 lines · Belen

I was asked to look at the branch that makes sure Toaster works with python 3

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=ed/oe/python3

I've found a few issues. I am not a 100% sure if they are this branch only or if they also happen in master (python3 changes apparently have been merged), but I thought I'd share early. Here comes the list:

I'm working on master, which includes these changes (Ed's branch has diverged from master slightly, but the important commits match between them).

Quoted 5 lines

* We need to remove old releases from toasterconf.json, since the change to Python 3 means we can no longer support those. Ed is already on the case, I believe

I've supplied patches for this to the appropriate mailing lists. I also did patches for the krogoth and jethro branches to remove master from the releases.

Quoted 3 lines

* Image artifact downloads don't seem to be working (all other artifacts are fine)

I haven't had a chance to test this yet, but will.

Quoted 3 lines

* Filters in the tasks page (build information) don't seem to be working. All of them return an error

I also see this error ("Exception Value: name 'k' is not defined"). I'll have a look this afternoon.

* The variables table returns an error

Quoted 1 line

Note that this is the same 'k' error as for the tasks page.

* In the custom image details page, the add | remove filter is not

Quoted 2 lines

working: the filtering does not happen

This is the same 'k' error again.

Quoted 3 lines

* The all projects table is showing builds in progress information (builds in progress information should not appear in any tables)

I haven't seen this (yet). I'll keep testing and see if it crops up.

Quoted 4 lines

* My builds for custom images don't seem to be working. I start them, but I never see any progress in the UI. The toaster_ui.log doesn't show them at all, so I am kind of confused.

I haven't tried this yet, but will.

Note that the tests need a small fix, as the version of Selenium I got when I used Python3 pip was different. We don't have this in toaster-requirements.txt, as it's only required for running the tests, but we should perhaps change the instructions to fix Selenium to a known version, too.

Elliot
--
Elliot Smith
Software Engineer
Intel Open Source Technology Centre

Signature · 3 lines
Elliot Smith
Software Engineer
Intel Open Source Technology Centre