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 prepend scheme for workflow url #1436

Merged
merged 1 commit into from
Dec 30, 2024
Merged

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Dec 25, 2024

Important

Moved URL scheme validation from agent.py to block.py to ensure earlier validation in the workflow process.

  • Behavior:
    • Moved prepend_scheme_and_validate_url call from create_task_and_step_from_block in agent.py to format_potential_template_parameters in block.py.
    • Ensures URLs in BaseTaskBlock are validated and have a scheme prepended during parameter formatting.
  • Code Removal:
    • Removed prepend_scheme_and_validate_url call from create_task_and_step_from_block in agent.py.
  • Code Addition:
    • Added prepend_scheme_and_validate_url call in format_potential_template_parameters in block.py for url and totp_verification_url.

This description was created by Ellipsis for 1d901fc. 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 13af2f4 in 19 seconds

More details
  • Looked at 62 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/agent.py:141
  • Draft comment:
    Ensure that URLs are validated elsewhere since prepend_scheme_and_validate_url is removed from here. This is crucial to avoid potential issues with invalid URLs.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_D6tXMF0TFm1mjJj5


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

@LawyZheng LawyZheng force-pushed the lawy/fix-workflow-url-scheme branch from 13af2f4 to 1d901fc Compare December 30, 2024 08:51
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 1d901fc in 19 seconds

More details
  • Looked at 62 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/sdk/workflow/models/block.py:294
  • Draft comment:
    Ensure the URL is not None or empty before calling prepend_scheme_and_validate_url to avoid unnecessary operations or errors.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR moves the URL validation logic from agent.py to block.py. This change is reflected in the format_potential_template_parameters method of the BaseTaskBlock class. The logic is correctly moved, but there is a potential issue with the order of operations in the format_potential_template_parameters method. The URL is formatted and then validated, which is correct. However, the validation should ensure that the URL is not empty or None before attempting to prepend a scheme. This is not explicitly checked in the current implementation.

Workflow ID: wflow_57Ap1G61d1EapHeI


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

@LawyZheng LawyZheng merged commit 12da878 into main Dec 30, 2024
2 checks passed
@LawyZheng LawyZheng deleted the lawy/fix-workflow-url-scheme branch December 30, 2024 08:53
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