From e32827597f01fc8439abbcacca47a0c7a4a0dd75 Mon Sep 17 00:00:00 2001 From: Anas El Mhamdi Date: Fri, 17 Apr 2026 12:11:03 +0200 Subject: [PATCH] fix: use SOURCE_ERROR in streaming runner commit-failure path PipelineReturnStatus.ERROR does not exist on the enum, so when source.commit() raised in the streaming runner the except branch crashed with a secondary AttributeError instead of reporting failure. Use SOURCE_ERROR, matching the convention already used in producer.py. Co-Authored-By: Claude Opus 4.7 --- CHANGELOG.md | 3 +++ bizon/engine/runner/adapters/streaming.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e7b943..2e508c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- Streaming runner crashed with a secondary `AttributeError: ERROR` when `source.commit()` raised, because `PipelineReturnStatus.ERROR` does not exist on the enum. The error branch now uses `PipelineReturnStatus.SOURCE_ERROR`, matching the convention used in `producer.py`, so the runner reports a clean Failure status instead of hiding the real commit error behind an enum lookup. + ## [0.3.11] - 2026-04-17 ### Fixed diff --git a/bizon/engine/runner/adapters/streaming.py b/bizon/engine/runner/adapters/streaming.py index 75126e0..be72361 100644 --- a/bizon/engine/runner/adapters/streaming.py +++ b/bizon/engine/runner/adapters/streaming.py @@ -165,8 +165,8 @@ def run(self) -> RunnerStatus: source.commit() except Exception as e: logger.error(f"Error committing source: {e}") - monitor.track_pipeline_status(PipelineReturnStatus.ERROR) - return RunnerStatus(stream=PipelineReturnStatus.ERROR) + monitor.track_pipeline_status(PipelineReturnStatus.SOURCE_ERROR) + return RunnerStatus(stream=PipelineReturnStatus.SOURCE_ERROR) iteration += 1