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

SendEmailBlock: Fail silently if file/folder is missing #898

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

ykeremy
Copy link
Contributor

@ykeremy ykeremy commented Oct 2, 2024

Important

Update SendEmailBlock to log warnings for missing files or directories instead of raising errors, ensuring smoother email sending.

  • Behavior:
    • Update _get_file_paths in SendEmailBlock to log a warning if a file or directory is missing instead of raising an error.
    • Handles paths that are URLs or S3 URIs separately, ensuring they are added to file_paths if valid.
  • Logging:
    • Adds a warning log for missing files or directories in _get_file_paths.

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

<!-- ELLIPSIS_HIDDEN -->

> [!IMPORTANT]
> Update `SendEmailBlock` to log a warning for missing files or directories instead of raising an error, ensuring smoother email sending.
>
>   - **Behavior**:
>     - Update `_get_file_paths` in `SendEmailBlock` to log a warning if a file or directory is missing instead of raising an error.
>     - Handles paths that are URLs or S3 URIs separately, ensuring they are added to `file_paths` if valid.
>   - **Logging**:
>     - Adds a warning log for missing files or directories in `_get_file_paths`.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=Skyvern-AI%2Fskyvern-cloud&utm_source=github&utm_medium=referral)<sup> for 6b1c5b609f14f473b80586c2b212f5b12ceac486. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
@ykeremy ykeremy added the sync label Oct 2, 2024
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 f2d619c in 8 seconds

More details
  • Looked at 41 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:891
  • Draft comment:
    Consider including more context in the warning message, such as the workflow_run_id, to aid in debugging.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The logging message for missing files or directories should include more context for better debugging.

Workflow ID: wflow_waxLnVfwBql9FUNo


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

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! Incremental review on f2d619c in 11 seconds

More details
  • Looked at 41 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:891
  • Draft comment:
    The logging statement for missing files or directories should include more context, such as the workflow_run_id, to aid in debugging. Consider adding workflow_run_id=workflow_run_id to the log statement.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR description indicates that missing files or directories should log a warning instead of raising an error. The code change reflects this, but there is a potential issue with the logging statement.

Workflow ID: wflow_mCZF6tha2AHqOUgN


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

@ykeremy ykeremy merged commit 17c680d into main Oct 2, 2024
2 checks passed
@ykeremy ykeremy deleted the ykeremy/send-email-block-silently-warn-file-missing branch October 2, 2024 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant