Bug 2313403 - Builbot worker doesn't support python 3.13
Summary: Builbot worker doesn't support python 3.13
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: buildbot
Version: 41
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-09-18 19:18 UTC by David Hampton
Modified: 2024-09-27 02:00 UTC (History)
7 users (show)

Fixed In Version: buildbot-4.0.2-2.fc41
Clone Of:
Environment:
Last Closed: 2024-09-27 02:00:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description David Hampton 2024-09-18 19:18:10 UTC
Buildbot worker on F41 fails every time it is assigned a job.  It crashes with a complaint that it can't find the "pipes" module.

Reproducible: Always

Steps to Reproduce:
1. Set up buildbot worker on F41
2. Run a job
Actual Results:  
Traceback (most recent call last):
  File "/buildbot_venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 913, in errback
    self._startRunCallbacks(fail)
  File "/buildbot_venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 981, in _startRunCallbacks
    self._runCallbacks()
  File "/buildbot_venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 1075, in _runCallbacks
    current.result = callback(  # type: ignore[misc]
  File "/buildbot_venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 1946, in _gotResultInlineCallbacks
    _inlineCallbacks(r, gen, status, context)
--- <exception caught here> ---
  File "/buildbot_venv/lib/python3.9/site-packages/buildbot/process/buildstep.py", line 537, in startStep
    self.results = yield self.run()
  File "/buildbot_venv/lib/python3.9/site-packages/buildbot/steps/shell.py", line 202, in run
    yield self.runCommand(cmd)
  File "/buildbot_venv/lib/python3.9/site-packages/buildbot/process/buildstep.py", line 860, in runCommand
    res = yield command.run(self, self.remote, self.build.builder.name)
  File "/buildbot_venv/lib/python3.9/site-packages/buildbot/process/remotecommand.py", line 167, in _finished
    yield self.remoteComplete(failure)
  File "/buildbot_venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 1996, in _inlineCallbacks
    result = context.run(
  File "/buildbot_venv/lib/python3.9/site-packages/twisted/python/failure.py", line 519, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/buildbot_venv/lib/python3.9/site-packages/buildbot/steps/shell.py", line 202, in run
    yield self.runCommand(cmd)
  File "/buildbot_venv/lib/python3.9/site-packages/twisted/internet/defer.py", line 1996, in _inlineCallbacks
    result = context.run(
  File "/buildbot_venv/lib/python3.9/site-packages/twisted/python/failure.py", line 519, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/buildbot_venv/lib/python3.9/site-packages/buildbot/process/buildstep.py", line 860, in runCommand
    res = yield command.run(self, self.remote, self.build.builder.name)
  File "/buildbot_venv/lib/python3.9/site-packages/buildbot/process/remotecommand.py", line 167, in _finished
    yield self.remoteComplete(failure)
buildbot.process.remotecommand.RemoteException: b'buildbot_worker.exceptions.AbandonChain': (-1, "Got exception (No module named 'pipes')")
Traceback (most recent call last):
Failure: buildbot_worker.exceptions.AbandonChain: (-1, "Got exception (No module named 'pipes')")


Expected Results:  
Buildbot worker performs task successfully.

Buildbot worker is attempting to use the python "pipes" module.  This module was deprecated in python 3.11 and has been removed from python 3.13 (1).  F41 has upgraded to python 3.13.0~rc2, thus this incompatibility with buildbot worker.

There is a fix for python 3.13 committed to the buildbot main branch, but not yet cherry-picked into the buildbot v4.0 branch. (2)  The test files are too different for the first part of the patch to apply, but the second part applied to runprocess.py allows the buildbot worker to run properly when using Python 3.13.


1) https://docs.python.org/3.13/whatsnew/3.13.html#whatsnew313-pep594
2) https://github.com/buildbot/buildbot/commit/73cb7a9170e33c55855b150a101a41ff6cd7c59f

Comment 1 Gwyn Ciesla 2024-09-18 20:15:07 UTC
In trying the get this patch to apply to 4.0.2, I discovered that pipes is no longer used anywhere in 4.0.2. Is that the version you have installed?

Comment 2 David Hampton 2024-09-18 20:39:07 UTC
This is a fresh install of F41 from yesterday, and it has the buildbot-worker-4.0.2-1.fc41.noarch rpm.  I see pipes referenced in the downloaded source.  I just ran the following commands:

$ dnf download --source buildbot-worker
Updating and loading repositories:
Repositories loaded.
Downloading Packages:
 buildbot-0:4.0.2-1.fc41.src    100% |  10.6 MiB/s |   3.4 MiB |  00m00s
$ mkdir buildbot-4.0.2-1
$ cd buildbot-4.0.2-1
$ rpm2cpio ../buildbot-4.0.2-1.fc41.src.rpm | cpio -i
6944 blocks
$ tar zxf buildbot_worker-4.0.2.tar.gz 
$ grep -rs pipes buildbot_worker-4.0.2
buildbot_worker-4.0.2/buildbot_worker/runprocess.py:    # it.  The pipes module is only available on UNIX; also, the quote
buildbot_worker-4.0.2/buildbot_worker/runprocess.py:    #  - use pipes.quote on UNIX, handling '' as a special case
buildbot_worker-4.0.2/buildbot_worker/runprocess.py:    import pipes  # pylint: disable=import-outside-toplevel
buildbot_worker-4.0.2/buildbot_worker/runprocess.py:        return pipes.quote(e)
$

Comment 3 Gwyn Ciesla 2024-09-18 20:57:59 UTC
Ahh, there it is. Thanks. Update coming PDQ.

Comment 4 Fedora Update System 2024-09-18 21:50:48 UTC
FEDORA-2024-bf557b70b0 (buildbot-4.0.2-2.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-bf557b70b0

Comment 5 David Hampton 2024-09-19 03:48:12 UTC
Thanks for the quick update.

I installed the buildbot-4.0.2-2.fc41 rpm from Bodhi and it works here.

Comment 6 Fedora Update System 2024-09-19 03:49:26 UTC
FEDORA-2024-bf557b70b0 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-bf557b70b0`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-bf557b70b0

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2024-09-27 02:00:11 UTC
FEDORA-2024-bf557b70b0 (buildbot-4.0.2-2.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.