Skip to content

bug: Status check keeps running after process has raised ConstraintError #227

@toby-coleman

Description

@toby-coleman

Summary

Consider the following MRE:

from plugboard.component import Component, IOController as IO
from plugboard.process import LocalProcess
from plugboard.connector import AsyncioConnector
from plugboard.schemas import ConnectorSpec
from plugboard.exceptions import ConstraintError

class A(Component):
    io = IO(outputs=["out_1"])

    async def step(self) -> None:
        raise ConstraintError("This is a constraint error from component A.")

class B(Component):
    io = IO(inputs=["in_1"])

    async def step(self) -> None:
        pass

process = LocalProcess(
    components=[A(name="component-a"), B(name="component-b")],
    connectors=[
        AsyncioConnector(
            spec=ConnectorSpec(source="component-a.out_1", target="component-b.in_1"),
        ),
    ],
)
async with process:
    await process.run()

This will raise the ConstraintError as expected. However, it will continue to emit log messages afterwards every 20s, for example:

{"cls":"B","name":"component-b","job_id":"Job_I6UAzJs5zhQGCfCi","event":"State backend not connected, skipping status check","level":"warning","timestamp":"2026-03-10T12:02:38.077249Z","module":"component","process":17506}

The process should instead be cleaned up after the exception was raised.

Version Information

Plugboard version: 0.6.0
Platform: Linux-6.6.84.1-microsoft-standard-WSL2-x86_64-with-glibc2.39
Python version: 3.12.11

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions