Toaster compatibility issues

"Awais Belal" <[email protected]> Mon, 21 Oct 2024 08:25:50 -0700
Newsgroups org.yoctoproject.lists.toaster
Message-ID <[email protected]>
--vW93U4LfGLtqyA2TveCy
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Hello,

We are using an implementation of a build server which utilizes toaster for=
 build artifact/stage presentation. In order to achieve this we run a main =
instance with nobuild which lives outside of our build environments i.e. ht=
tps://docs.yoctoproject.org/4.3.4/toaster-manual/setup-and-use.html#setting=
-up-toaster-without-a-build-server ( https://docs.yoctoproject.org/4.3.4/to=
aster-manual/setup-and-use.html#setting-up-toaster-without-a-build-server )=
 as we only want the web interface to catch and show our command line build=
s
cd /var/www/toaster/
source poky/oe-init-build-env
source toaster start nobuild
then from our build environments we run a noweb instance i.e. https://docs.=
yoctoproject.org/4.3.4/toaster-manual/setup-and-use.html#setting-up-toaster=
-without-a-web-server
source /projects/project1/poky/oe-init-build-env
source toaster start noweb
bitbake target
source toaster stop
and all is good. This works well where projects as well as the main instanc=
e of poky used to launch the webserver share the same version, say gatesgar=
th.

However, then comes a time where one of the projects moves on to a later ve=
rsion of poky, say scarthgap, and the noweb launch starts having issues. We=
 setup a venv in that particular build env and install all the toaster reqs=
. Starting the noweb instance at this point
$ cd /projects/project2/
$ source poky/oe-init build
$ source venv/bin/activate
$ source toaster start noweb
The system will start.
Traceback (most recent call last):
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/db/backends/mysql/base.py", line 15, in <module>
=C2=A0 =C2=A0 import MySQLdb as Database
ModuleNotFoundError: No module named 'MySQLdb'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
=C2=A0 File "/projects/project2/sources/poky/bitbake/bin/../lib/toaster/man=
age.py", line 16, in <module>
=C2=A0 =C2=A0 execute_from_command_line(sys.argv)
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/core/management/__init__.py", line 419, in execute_from_command_line
=C2=A0 =C2=A0 utility.execute()
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/core/management/__init__.py", line 395, in execute
=C2=A0 =C2=A0 django.setup()
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/__init__.py", line 24, in setup
=C2=A0 =C2=A0 apps.populate(settings.INSTALLED_APPS)
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/apps/registry.py", line 114, in populate
=C2=A0 =C2=A0 app_config.import_models()
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/apps/config.py", line 301, in import_models
=C2=A0 =C2=A0 self.models_module =3D import_module(models_module_name)
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/importlib/__init__=
.py", line 126, in import_module
=C2=A0 =C2=A0 return _bootstrap._gcd_import(name[level:], package, level)
 File "<frozen importlib._bootstrap>", line 994, in _gcd_import
=C2=A0 File "<frozen importlib._bootstrap>", line 971, in _find_and_load
=C2=A0 File "<frozen importlib._bootstrap>", line 955, in _find_and_load_un=
locked
=C2=A0 File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
=C2=A0 File "<frozen importlib._bootstrap_external>", line 678, in exec_mod=
ule
=C2=A0 File "<frozen importlib._bootstrap>", line 219, in _call_with_frames=
_removed
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/contrib/auth/models.py", line 3, in <module>
=C2=A0 =C2=A0 from django.contrib.auth.base_user import AbstractBaseUser, B=
aseUserManager
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/contrib/auth/base_user.py", line 48, in <module>
=C2=A0 =C2=A0 class AbstractBaseUser(models.Model):
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/db/models/base.py", line 122, in __new__
=C2=A0 =C2=A0 new_class.add_to_class('_meta', Options(meta, app_label))
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/db/models/base.py", line 326, in add_to_class
=C2=A0 =C2=A0 value.contribute_to_class(cls, name)
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/db/models/options.py", line 207, in contribute_to_class
=C2=A0 =C2=A0 self.db_table =3D truncate_name(self.db_table, connection.ops=
.max_name_length())
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/utils/connection.py", line 15, in __getattr__
=C2=A0 =C2=A0 return getattr(self._connections[self._alias], item)
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/utils/connection.py", line 62, in __getitem__
=C2=A0 =C2=A0 conn =3D self.create_connection(alias)
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/db/utils.py", line 204, in create_connection
=C2=A0 =C2=A0 backend =3D load_backend(db['ENGINE'])
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/db/utils.py", line 111, in load_backend
=C2=A0 =C2=A0 return import_module('%s.base' % backend_name)
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/importlib/__init__=
.py", line 126, in import_module
=C2=A0 =C2=A0 return _bootstrap._gcd_import(name[level:], package, level)
=C2=A0 File "/projects/project2/build/venv/lib/python3.6/site-packages/djan=
go/db/backends/mysql/base.py", line 20, in <module>
=C2=A0 =C2=A0 ) from err
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
Failed migrations, halting system start
Failed start.
Any ideas what might be going wrong here? Also, any suggestions of doing th=
is in a way that could save us from compatibility issues when the poky vers=
ion moves?

--vW93U4LfGLtqyA2TveCy
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<div>Hello,</div>
<div>&nbsp;</div>
<div>We are using an implementation of a build server which utilizes toaste=
r for build artifact/stage presentation. In order to achieve this we run a =
main instance with nobuild which lives outside of our build environments i.=
e. <a href=3D"https://docs.yoctoproject.org/4.3.4/toaster-manual/setup-and-=
use.html#setting-up-toaster-without-a-build-server" target=3D"_blank" rel=
=3D"noopener">https://docs.yoctoproject.org/4.3.4/toaster-manual/setup-and-=
use.html#setting-up-toaster-without-a-build-server </a>as we only want the =
web interface to catch and show our command line builds</div>
<div>
<pre style=3D"box-sizing: border-box; line-height: 1.4; font-family: SFMono=
-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courie=
r, monospace; font-size: 12px; white-space: pre; margin: 0px; padding: 12px=
; display: block; overflow: auto; color: #333333; font-style: normal; font-=
variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; let=
ter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-=
transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0=
px; text-decoration-thickness: initial; text-decoration-style: initial; tex=
t-decoration-color: initial;"><span class=3D"nb" style=3D"box-sizing: borde=
r-box; color: #008000;">cd /var/www/toaster/<br />source poky/oe-init-build=
-env<br />source</span> toaster start nobuild</pre>
</div>
<div>then from our build environments we run a noweb instance i.e. <a href=
=3D"https://docs.yoctoproject.org/4.3.4/toaster-manual/setup-and-use.html#s=
etting-up-toaster-without-a-web-server" target=3D"_blank" rel=3D"noopener">=
https://docs.yoctoproject.org/4.3.4/toaster-manual/setup-and-use.html#setti=
ng-up-toaster-without-a-web-server</a></div>
<div>
<pre style=3D"box-sizing: border-box; line-height: 1.4; font-family: SFMono=
-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courie=
r, monospace; font-size: 12px; white-space: pre; margin: 0px; padding: 12px=
; display: block; overflow: auto; color: #333333; font-style: normal; font-=
variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; let=
ter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-=
transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0=
px; text-decoration-thickness: initial; text-decoration-style: initial; tex=
t-decoration-color: initial;"><span class=3D"nb" style=3D"box-sizing: borde=
r-box; color: #008000;">source</span> /projects/project1/poky/oe-init-build=
-env<br />source toaster start noweb<br />bitbake target<br />source toaste=
r stop</pre>
<div>and all is good. This works well where projects as well as the main in=
stance of poky used to launch the webserver share the same version, say gat=
esgarth.</div>
<div>&nbsp;</div>
<div>However, then comes a time where one of the projects moves on to a lat=
er version of poky, say scarthgap, and the noweb launch starts having issue=
s. We setup a venv in that particular build env and install all the toaster=
 reqs. Starting the noweb instance at this point</div>
<div>
<pre style=3D"box-sizing: border-box; line-height: 1.4; font-family: SFMono=
-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', Courie=
r, monospace; font-size: 12px; white-space: pre; margin: 0px; padding: 12px=
; display: block; overflow: auto; color: #333333; font-style: normal; font-=
variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; let=
ter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-=
transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0=
px; text-decoration-thickness: initial; text-decoration-style: initial; tex=
t-decoration-color: initial;">$ cd /projects/project2/<br />$ source poky/o=
e-init build<br />$ source venv/bin/activate<br />$ source toaster start no=
web<br />The system will start.<br />Traceback (most recent call last):<br =
/>&nbsp; File "/projects/project2/build/venv/lib/python3.6/site-packages/dj=
ango/db/backends/mysql/base.py", line 15, in &lt;module&gt;<br />&nbsp; &nb=
sp; import MySQLdb as Database<br />ModuleNotFoundError: No module named 'M=
ySQLdb'<br />The above exception was the direct cause of the following exce=
ption:<br />Traceback (most recent call last):<br />&nbsp; File "/projects/=
project2/sources/poky/bitbake/bin/../lib/toaster/manage.py", line 16, in &l=
t;module&gt;<br />&nbsp; &nbsp; execute_from_command_line(sys.argv)<br />&n=
bsp; File "/projects/project2/build/venv/lib/python3.6/site-packages/django=
/core/management/__init__.py", line 419, in execute_from_command_line<br />=
&nbsp; &nbsp; utility.execute()<br />&nbsp; File "/projects/project2/build/=
venv/lib/python3.6/site-packages/django/core/management/__init__.py", line =
395, in execute<br />&nbsp; &nbsp; django.setup()<br />&nbsp; File "/projec=
ts/project2/build/venv/lib/python3.6/site-packages/django/__init__.py", lin=
e 24, in setup<br />&nbsp; &nbsp; apps.populate(settings.INSTALLED_APPS)<br=
 />&nbsp; File "/projects/project2/build/venv/lib/python3.6/site-packages/d=
jango/apps/registry.py", line 114, in populate<br />&nbsp; &nbsp; app_confi=
g.import_models()<br />&nbsp; File "/projects/project2/build/venv/lib/pytho=
n3.6/site-packages/django/apps/config.py", line 301, in import_models<br />=
&nbsp; &nbsp; self.models_module =3D import_module(models_module_name)<br /=
>&nbsp; File "/projects/project2/build/venv/lib/python3.6/importlib/__init_=
_.py", line 126, in import_module<br />&nbsp; &nbsp; return _bootstrap._gcd=
_import(name[level:], package, level)<br />  File "&lt;frozen importlib._bo=
otstrap&gt;", line 994, in _gcd_import<br />&nbsp; File "&lt;frozen importl=
ib._bootstrap&gt;", line 971, in _find_and_load<br />&nbsp; File "&lt;froze=
n importlib._bootstrap&gt;", line 955, in _find_and_load_unlocked<br />&nbs=
p; File "&lt;frozen importlib._bootstrap&gt;", line 665, in _load_unlocked<=
br />&nbsp; File "&lt;frozen importlib._bootstrap_external&gt;", line 678, =
in exec_module<br />&nbsp; File "&lt;frozen importlib._bootstrap&gt;", line=
 219, in _call_with_frames_removed<br />&nbsp; File "/projects/project2/bui=
ld/venv/lib/python3.6/site-packages/django/contrib/auth/models.py", line 3,=
 in &lt;module&gt;<br />&nbsp; &nbsp; from django.contrib.auth.base_user im=
port AbstractBaseUser, BaseUserManager<br />&nbsp; File "/projects/project2=
/build/venv/lib/python3.6/site-packages/django/contrib/auth/base_user.py", =
line 48, in &lt;module&gt;<br />&nbsp; &nbsp; class AbstractBaseUser(models=
.Model):<br />&nbsp; File "/projects/project2/build/venv/lib/python3.6/site=
-packages/django/db/models/base.py", line 122, in __new__<br />&nbsp; &nbsp=
; new_class.add_to_class('_meta', Options(meta, app_label))<br />&nbsp; Fil=
e "/projects/project2/build/venv/lib/python3.6/site-packages/django/db/mode=
ls/base.py", line 326, in add_to_class<br />&nbsp; &nbsp; value.contribute_=
to_class(cls, name)<br />&nbsp; File "/projects/project2/build/venv/lib/pyt=
hon3.6/site-packages/django/db/models/options.py", line 207, in contribute_=
to_class<br />&nbsp; &nbsp; self.db_table =3D truncate_name(self.db_table, =
connection.ops.max_name_length())<br />&nbsp; File "/projects/project2/buil=
d/venv/lib/python3.6/site-packages/django/utils/connection.py", line 15, in=
 __getattr__<br />&nbsp; &nbsp; return getattr(self._connections[self._alia=
s], item)<br />&nbsp; File "/projects/project2/build/venv/lib/python3.6/sit=
e-packages/django/utils/connection.py", line 62, in __getitem__<br />&nbsp;=
 &nbsp; conn =3D self.create_connection(alias)<br />&nbsp; File "/projects/=
project2/build/venv/lib/python3.6/site-packages/django/db/utils.py", line 2=
04, in create_connection<br />&nbsp; &nbsp; backend =3D load_backend(db['EN=
GINE'])<br />&nbsp; File "/projects/project2/build/venv/lib/python3.6/site-=
packages/django/db/utils.py", line 111, in load_backend<br />&nbsp; &nbsp; =
return import_module('%s.base' % backend_name)<br />&nbsp; File "/projects/=
project2/build/venv/lib/python3.6/importlib/__init__.py", line 126, in impo=
rt_module<br />&nbsp; &nbsp; return _bootstrap._gcd_import(name[level:], pa=
ckage, level)<br />&nbsp; File "/projects/project2/build/venv/lib/python3.6=
/site-packages/django/db/backends/mysql/base.py", line 20, in &lt;module&gt=
;<br />&nbsp; &nbsp; ) from err<br />django.core.exceptions.ImproperlyConfi=
gured: Error loading MySQLdb module.<br />Did you install mysqlclient?<br /=
>Failed migrations, halting system start<br />Failed start.</pre>
<div>Any ideas what might be going wrong here? Also, any suggestions of doi=
ng this in a way that could save us from compatibility issues when the poky=
 version moves?</div>
</div>
</div>

--vW93U4LfGLtqyA2TveCy--