Skip to content

feat: Step check process status#153

Merged
chrisk314 merged 56 commits intomainfrom
feat/step-check-process-status
Aug 13, 2025
Merged

feat: Step check process status#153
chrisk314 merged 56 commits intomainfrom
feat/step-check-process-status

Conversation

@chrisk314
Copy link
Contributor

Summary

This PR closes #151 by modifying the logic in the Component.step wrapper to check the status of the process periodically to avoid waiting indefinitely for inputs when a process is in a failed state.

Changes

  • Adds methods to StateBackend implementations to update and retrieve just the Process.status attribute.
  • Modifies logic of the Component.step wrapper to periodically check the Process.status attribute and break out of io.read if necessary.

Note

This PR builds on changes awaiting merge in #152.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @chrisk314, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a critical improvement to how components handle process failures. By implementing periodic status checks and graceful termination, it prevents components from getting stuck in an indefinite waiting state when their associated process has failed, thereby enhancing the overall robustness and responsiveness of the system. It also includes necessary updates to the state management layer and various dependencies.

Highlights

  • Enhanced Process Monitoring: Components now periodically check the status of their parent process during I/O operations to detect failures, preventing indefinite waiting for inputs.
  • Graceful Termination: If a process is detected as failed, components will stop waiting for input, set their own status to 'STOPPED', and raise a ProcessStatusError for proper error handling.
  • State Backend Integration: New methods (update_process_status, get_process_status, get_process_status_for_component) have been added to the StateBackend interface and its SQLite implementation to efficiently manage and retrieve process status.
  • Automated Process Status Update: The upsert_component method now automatically updates the parent process's status to FAILED if a component's status transitions to FAILED.
  • Dependency Updates: Several project dependencies, including banks, grpcio, jupyterlab, llama-index-core, llama-index-workflows, multidict, openai, ruff, and uv, have been updated to their latest versions.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a valuable feature to prevent components from waiting indefinitely when a process has failed. The changes are well-structured, touching the component logic, state backend interfaces, and their implementations. My review focuses on improving the robustness of the new status-checking logic and ensuring consistency across the codebase.

@toby-coleman
Copy link
Contributor

I found I needed 3fc2354 to add a bit of tolerance on RabbitMQ and make the integration tests pass.

Base automatically changed from feat/component-status-updates to main July 2, 2025 09:43
@chrisk314 chrisk314 force-pushed the feat/step-check-process-status branch from 49cde5a to 078d483 Compare July 2, 2025 10:40
@chrisk314 chrisk314 marked this pull request as ready for review July 16, 2025 09:11
@chrisk314 chrisk314 force-pushed the feat/step-check-process-status branch from c226f17 to d84248a Compare July 23, 2025 08:11
Copy link
Contributor

@toby-coleman toby-coleman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a couple of comments!

@codecov
Copy link

codecov bot commented Aug 12, 2025

@chrisk314 chrisk314 merged commit a4b0475 into main Aug 13, 2025
17 checks passed
@chrisk314 chrisk314 deleted the feat/step-check-process-status branch August 13, 2025 20:30
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

Successfully merging this pull request may close these issues.

feat: IOController check for state changes

2 participants