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 unclosed browser when navigation error #1139

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Nov 5, 2024

Important

Fixes unclosed browser issue by reordering operations in get_or_create_for_task and get_or_create_for_workflow_run in browser_manager.py.

  • Behavior:
    • Fixes unclosed browser issue by reordering operations in get_or_create_for_task and get_or_create_for_workflow_run in browser_manager.py.
    • Assigns browser_state to self.pages before calling get_or_create_page() to ensure proper cleanup in case of errors.
  • Misc:
    • No changes to logging or error handling logic.

This description was created by Ellipsis for 4f31c39. 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 4f31c39 in 15 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/webeye/browser_manager.py:78
  • Draft comment:
    The change in order of setting self.pages before get_or_create_page ensures that the browser state is stored even if an error occurs during page creation. This helps in preventing resource leaks.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The PR changes the order of setting self.pages in get_or_create_for_task and get_or_create_for_workflow_run methods. This change ensures that the browser state is stored before any potential errors occur during page creation. This is a good practice to prevent resource leaks in case of errors.

Workflow ID: wflow_nsU0qnTM42kYX4Op


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

@LawyZheng LawyZheng merged commit 1b9f45b into main Nov 5, 2024
2 checks passed
@LawyZheng LawyZheng deleted the lawy/fix-unclose-browser-when-navigation-error branch November 5, 2024 17:27
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