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

gracefully handle jinja exception and remove block label jinja support #1313

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Dec 3, 2024

Important

Handle Jinja exceptions gracefully and remove block label Jinja support in block.py.

  • Behavior:
    • Add exception handling for Jinja template formatting in format_potential_template_parameters() calls in BaseTaskBlock, CodeBlock, TextPromptBlock, DownloadToS3Block, UploadToS3Block, SendEmailBlock, and FileParserBlock.
    • Remove format_potential_template_parameters() method from Block class.
  • Error Handling:
    • If Jinja template formatting fails, return a failed BlockResult with a specific error message.
  • Misc:
    • Remove block label Jinja support by deleting format_potential_template_parameters() from Block class.

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

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 52ec876 in 24 seconds

More details
  • Looked at 201 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/sdk/workflow/models/block.py:228
  • Draft comment:
    Removing the call to super().format_potential_template_parameters might affect the behavior if the superclass method had important logic or side effects. Ensure that this change does not break any functionality. This comment applies to other similar removals in the PR.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_gw9t7NoMhVP7IljG


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

@LawyZheng LawyZheng merged commit 59fc6a8 into main Dec 3, 2024
2 checks passed
@LawyZheng LawyZheng deleted the lawy/gracefully-handle-jinja-exception branch December 3, 2024 15:14
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