Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildbot create-master command fails with python 3.12 #7506

Open
linuxdude42 opened this issue Apr 11, 2024 · 4 comments
Open

buildbot create-master command fails with python 3.12 #7506

linuxdude42 opened this issue Apr 11, 2024 · 4 comments

Comments

@linuxdude42
Copy link

This is on a new install of Fedora 40. I would guess this is a python 3.12 issue, since Fedora 39 with python 3.11 doesn't fail.

heimdall:/tmp/bbtest$ buildbot create-master
updating existing installation
creating /tmp/bbtest/master.cfg.sample
creating database (sqlite:///state.sqlite)
Got fatal Exception on DB
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/twisted/python/threadpool.py", line 285, in
inContext.theWork = lambda: context.call( # type: ignore[attr-defined]
File "/usr/lib/python3.12/site-packages/twisted/python/context.py", line 117, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python3.12/site-packages/twisted/python/context.py", line 82, in callWithContext
return func(*args, **kw)
File "/usr/lib/python3.12/site-packages/buildbot/db/pool.py", line 235, in __thd
log.err(e, 'Got fatal Exception on DB')
--- ---
File "/usr/lib/python3.12/site-packages/buildbot/db/pool.py", line 208, in __thd
rv = callable(arg, *args, **kwargs)
File "/usr/lib/python3.12/site-packages/buildbot/db/model.py", line 1114, in thd
test_unicode(conn)
File "/usr/lib/python3.12/site-packages/buildbot/db/migrate_utils.py", line 33, in test_unicode
test_unicode.create()
builtins.TypeError: Table.create() missing 1 required positional argument: 'bind'

Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/twisted/internet/defer.py", line 913, in errback
self._startRunCallbacks(fail)
File "/usr/lib/python3.12/site-packages/twisted/internet/defer.py", line 981, in _startRunCallbacks
self._runCallbacks()
File "/usr/lib/python3.12/site-packages/twisted/internet/defer.py", line 1075, in _runCallbacks
current.result = callback( # type: ignore[misc]
File "/usr/lib/python3.12/site-packages/twisted/internet/defer.py", line 1946, in _gotResultInlineCallbacks
_inlineCallbacks(r, gen, status, context)
--- ---
File "/usr/lib/python3.12/site-packages/twisted/internet/defer.py", line 1996, in _inlineCallbacks
result = context.run(
File "/usr/lib/python3.12/site-packages/twisted/python/failure.py", line 519, in throwExceptionIntoGenerator
return g.throw(self.value.with_traceback(self.tb))
File "/usr/lib/python3.12/site-packages/buildbot/scripts/create_master.py", line 99, in createMaster
yield createDB(config)
File "/usr/lib/python3.12/site-packages/twisted/internet/defer.py", line 1996, in _inlineCallbacks
result = context.run(
File "/usr/lib/python3.12/site-packages/twisted/python/failure.py", line 519, in throwExceptionIntoGenerator
return g.throw(self.value.with_traceback(self.tb))
File "/usr/lib/python3.12/site-packages/buildbot/scripts/create_master.py", line 90, in createDB
yield db.model.upgrade()
File "/usr/lib/python3.12/site-packages/twisted/internet/defer.py", line 1996, in _inlineCallbacks
result = context.run(
File "/usr/lib/python3.12/site-packages/twisted/python/failure.py", line 519, in throwExceptionIntoGenerator
return g.throw(self.value.with_traceback(self.tb))
File "/usr/lib/python3.12/site-packages/buildbot/db/model.py", line 1140, in upgrade
yield self.db.pool.do(thd)
File "/usr/lib/python3.12/site-packages/twisted/internet/defer.py", line 1996, in _inlineCallbacks
result = context.run(
File "/usr/lib/python3.12/site-packages/twisted/python/failure.py", line 519, in throwExceptionIntoGenerator
return g.throw(self.value.with_traceback(self.tb))
File "/usr/lib/python3.12/site-packages/buildbot/db/pool.py", line 245, in do
ret = yield threads.deferToThreadPool(self.reactor, self._pool,
File "/usr/lib/python3.12/site-packages/twisted/python/threadpool.py", line 269, in inContext
result = inContext.theWork() # type: ignore[attr-defined]
File "/usr/lib/python3.12/site-packages/twisted/python/threadpool.py", line 285, in
inContext.theWork = lambda: context.call( # type: ignore[attr-defined]
File "/usr/lib/python3.12/site-packages/twisted/python/context.py", line 117, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python3.12/site-packages/twisted/python/context.py", line 82, in callWithContext
return func(*args, **kw)
File "/usr/lib/python3.12/site-packages/buildbot/db/pool.py", line 208, in __thd
rv = callable(arg, *args, **kwargs)
File "/usr/lib/python3.12/site-packages/buildbot/db/model.py", line 1114, in thd
test_unicode(conn)
File "/usr/lib/python3.12/site-packages/buildbot/db/migrate_utils.py", line 33, in test_unicode
test_unicode.create()
builtins.TypeError: Table.create() missing 1 required positional argument: 'bind'
heimdall:/tmp/bbtest$

@pmisik
Copy link
Contributor

pmisik commented Apr 14, 2024

Hi,

  • can you please tell us what version of BuildBot you have installed (buildbot --version)?
  • does the problem you are observing also manifest itself with the latest version of BuildBot?
  • can you please tell us what mechanism you used to install Buildbot (using Python PIP, my Linux distribution package manager, ...)?

Release 3.11.1 may address your problem see https://github.com/buildbot/buildbot/releases/tag/v3.11.1

If your BuildBot installation does not run on the latest release, can you please check whether the latest release solves your problem?

@linuxdude42
Copy link
Author

Here are the version numbers:

Buildbot version: 3.11.1
Twisted version: 23.10.0

Here's a complete list of steps I used to recreate the problem:

  1. create a new VM
  2. install Fedora 40
  3. update all packages using dnf
  4. install buildbot using dnf
  5. run the 'buildbot create-master' command

@pmisik
Copy link
Contributor

pmisik commented Apr 16, 2024

I confirm I've reproduced problem based on your steps.

@pmisik
Copy link
Contributor

pmisik commented Apr 16, 2024

Well, it seems problem is that Buildbot has frozen SQLAlchemy to 1.5 however Fedora 40 installs 2.0.29.
Simple solution seems to be install Buildbot into virtualenv.

cd ~
mkdir bb
cd bb
virtualenv .venv
. .venv/bin/activate
pip install --upgrade pip
pip install buildbot
buildbot create-master master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants