Support using client in repl running tasks without rabbit
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
Start with src/blueapi/client/plan_cache.py, client.py, and event_bus.py, which appear in the traceback; trace how foreground task execution connects to the message bus. Compare the websocket option with the alternative acceptance criteria for background execution and clearer connection errors. Done means foreground tasks work through the chosen approach, or bus connection failures produce a helpful user facing error.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
If you try and use the client in a repl without stomp configured it errors with a stack trace showing it can't connect to the message bus. This is an unhelpful wall of text to be user facing.
>>> bc.plans.count(detectors=[bc.devices.det])
# 2026-10-20 10:00:18,596 INFO blueapi.client.plan_cache plan_cache.py:112 -- Building args for [detectors,num,delay,metadata], using () and {'detectors': [Device(det)]}
# 2026-10-20 10:00:18,605 INFO root messaging.py:366 -- Stomp client connecting...
# 2026-10-20 10:00:18,605 WARNING stomp.py transport.py:893 -- could not connect to host localhost, port 61613: [Errno 111] Connection refused
# 2026-10-20 10:00:18,807 WARNING stomp.py transport.py:893 -- could not connect to host localhost, port 61613: [Errno 111] Connection refused
# 2026-10-20 10:00:19,009 WARNING stomp.py transport.py:893 -- could not connect to host localhost, port 61613: [Errno 111] Connection refused
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/abi/projects/blueapi/src/blueapi/client/plan_cache.py", line 82, in __call__
match self._client.run_task(req):
~~~~~~~~~~~~~~~~~~~~~^^^^^
File "/home/abi/projects/blueapi/.venv/lib/python3.14/site-packages/observability_utils/tracing/decorators.py", line 151, in wrapper
return func(*args, **kwargs)
File "/home/abi/projects/blueapi/src/blueapi/client/client.py", line 400, in run_task
with self._events:
^^^^^^^^^^^^
File "/home/abi/projects/blueapi/src/blueapi/client/event_bus.py", line 27, in __enter__
self.app.connect()
~~~~~~~~~~~~~~~~^^
File "/home/abi/projects/blueapi/.venv/lib/python3.14/site-packages/bluesky_stomp/messaging.py", line 368, in connect
self._connect_to_broker()
~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/abi/projects/blueapi/.venv/lib/python3.14/site-packages/bluesky_stomp/messaging.py", line 383, in _connect_to_broker
self._conn.connect(wait=True) # type: ignore
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
File "/home/abi/projects/blueapi/.venv/lib/python3.14/site-packages/stomp/connect.py", line 151, in connect
self.transport.start()
~~~~~~~~~~~~~~~~~~~~^^
File "/home/abi/projects/blueapi/.venv/lib/python3.14/site-packages/stomp/transport.py", line 113, in start
self.attempt_connection()
~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/abi/projects/blueapi/.venv/lib/python3.14/site-packages/stomp/transport.py", line 910, in attempt_connection
raise exception.ConnectFailedException()
stomp.exception.ConnectFailedException
>>>
Acceptance Criteria
- Preferably:
-- The fg running option is changed to a websocket by default, removing the message bus from this loop
-- If there are connection errors these are nicely wrapped for the user - Alternatively if if bus really wants to be kept for this:
-- The client supports a background running option, like the --bg flag on the cli
-- If you do try and run a plan in the fg without the bus you get a more helpful error
- Lenguaje dominante
- Python
- Estrellas
- 13
- Forks
- 14
- Merge medio
- 4 d 14 h
- PR fusionados (30 d)
- 14
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de DiamondLightSource/blueapi
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
DiamondLightSource/blueapi#1626 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
DiamondLightSource/blueapi#1623 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Cannot Install SoftiocAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
DiamondLightSource/blueapi#1605 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
DiamondLightSource/blueapi#1494 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 1-2 días Aptitud para principiantes 52/100
DiamondLightSource/blueapi#1718 ·
Los mantenedores suelen responder en 1 día
Todos los issues de DiamondLightSource/blueapi
Issues similares
-
Python Volcengine provider returns failures instead of raising themPosiblemente ocupada @Ricardo-M-L la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
agent-infra/sandbox#248 ·
-
Textractor leaves empty temporary files when remote retrieval failsPosiblemente ocupada @HuaTNA la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
test(bm_generation): pin the learning parameters and CPU sync shortcutPosiblemente ocupada @iloveeyjafjalla la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
qboson/kaiwu-pytorch-plugin#1341 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
elder-plinius/V3R1T4S#625 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
foxglove/mcap#1907 · 1 comentario ·
Los mantenedores suelen responder en 1 día