Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix loopblock continue on failure issue #1283

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Nov 28, 2024

Important

Fixes ForLoopBlock continue on failure issue by introducing LoopBlockExecutedResult and refactoring execution logic in block.py.

  • Behavior:
    • Fixes issue in ForLoopBlock where loop did not continue on failure.
    • Introduces LoopBlockExecutedResult to manage loop execution results, including outputs, block statuses, and failure reasons.
    • Refactors execute method in ForLoopBlock to use execute_loop_helper for better handling of block execution statuses.
  • Classes and Methods:
    • Adds LoopBlockExecutedResult class to encapsulate loop execution results.
    • Refactors execute method in ForLoopBlock to utilize execute_loop_helper for improved logic separation and clarity.
  • Misc:
    • Adds from __future__ import annotations for forward reference support.

This description was created by Ellipsis for 54657ce. It will automatically update as commits are pushed.

@LawyZheng LawyZheng merged commit 6a23a9f into main Nov 28, 2024
2 checks passed
@LawyZheng LawyZheng deleted the lawy/fix-loopblock-continue-on-failure branch November 28, 2024 07:56
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 54657ce in 1 minute and 10 seconds

More details
  • Looked at 246 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. skyvern/forge/sdk/workflow/models/block.py:646
  • Draft comment:
    The variable original_loop_block is assigned but never used. Consider removing it to simplify the code.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The variable original_loop_block is assigned but never used. It seems unnecessary to copy the loop block and then reassign it back to the original. This can be simplified.
2. skyvern/forge/sdk/workflow/models/block.py:752
  • Draft comment:
    The final else clause is redundant since block_status is already set to BlockStatus.failed. Consider removing it for clarity.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The variable block_status is initially set to BlockStatus.failed and then conditionally reassigned. The final else clause is redundant since block_status is already set to BlockStatus.failed.
3. skyvern/forge/sdk/workflow/models/block.py:743
  • Draft comment:
    The final else clause is redundant since success is already set to False. Consider removing it for clarity.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The variable success is initially set to False and then conditionally reassigned. The final else clause is redundant since success is already set to False.

Workflow ID: wflow_vijeXRHPfxHzVfXq


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

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.

1 participant