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

Add persist_browser_session flag to workflows #777

Merged
merged 3 commits into from
Sep 6, 2024

Conversation

ykeremy
Copy link
Contributor

@ykeremy ykeremy commented Sep 6, 2024

🚀 This description was created by Ellipsis for commit 5c80945

Summary:

Add persist_browser_session flag to workflows, updating database models, API endpoints, and browser management logic for session persistence.

Key points:

  • Add persist_browser_session flag to workflows table in alembic version 2024_09_06_1842-c50f0aa0ef24.
  • Update WorkflowModel in skyvern/forge/sdk/db/models.py to include persist_browser_session.
  • Modify create_workflow in skyvern/forge/sdk/db/client.py to accept persist_browser_session.
  • Update convert_to_workflow in skyvern/forge/sdk/db/utils.py to handle persist_browser_session.
  • Add persist_browser_session to Workflow class in skyvern/forge/sdk/workflow/models/workflow.py.
  • Include persist_browser_session in WorkflowCreateYAMLRequest in skyvern/forge/sdk/workflow/models/yaml.py.
  • Modify create_workflow and create_workflow_from_request in skyvern/forge/sdk/workflow/service.py to handle persist_browser_session.
  • Implement store_browser_session and retrieve_browser_session in skyvern/forge/sdk/artifact/storage/base.py, local.py, and s3.py.
  • Update browser management logic in cloud/webeye/special_browsers.py, skyvern/webeye/browser_factory.py, and skyvern/webeye/browser_manager.py to support session persistence.

Generated with ❤️ by ellipsis.dev

<!-- ELLIPSIS_HIDDEN -->

| 🚀 | This description was created by [Ellipsis](https://www.ellipsis.dev) for commit 7e6c0ea9a0524f5b455c5421b836db2676f98be4  |
|--------|--------|

### Summary:
Add `persist_browser_session` flag to workflows, updating database models, API endpoints, and browser management logic for session persistence.

**Key points**:
- Add `persist_browser_session` flag to `workflows` table in `alembic/versions/2024_09_05_1818-e0cdae3d0c93_add_persist_browser_session_flag_to_.py`.
- Update `WorkflowModel` in `skyvern/forge/sdk/db/models.py` to include `persist_browser_session`.
- Modify `create_workflow` in `skyvern/forge/sdk/db/client.py` to accept `persist_browser_session`.
- Update `convert_to_workflow` in `skyvern/forge/sdk/db/utils.py` to handle `persist_browser_session`.
- Add `persist_browser_session` to `Workflow` class in `skyvern/forge/sdk/workflow/models/workflow.py`.
- Include `persist_browser_session` in `WorkflowCreateYAMLRequest` in `skyvern/forge/sdk/workflow/models/yaml.py`.
- Modify `create_workflow` and `create_workflow_from_request` in `skyvern/forge/sdk/workflow/service.py` to handle `persist_browser_session`.
- Implement `store_browser_session` and `retrieve_browser_session` in `skyvern/forge/sdk/artifact/storage/base.py`, `local.py`, and `s3.py`.
- Update browser management logic in `cloud/webeye/special_browsers.py`, `skyvern/webeye/browser_factory.py`, and `skyvern/webeye/browser_manager.py` to support session persistence.

----
Generated with ❤️ by [ellipsis.dev](https://www.ellipsis.dev)

<!-- ELLIPSIS_HIDDEN -->
@ykeremy ykeremy added the sync label Sep 6, 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 d600e0e in 31 seconds

More details
  • Looked at 353 lines of code in 13 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. skyvern/webeye/browser_manager.py:199
  • Draft comment:
    Consider checking if workflow.persist_browser_session is true before calling store_browser_session to avoid unnecessary operations.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The store_browser_session method in BrowserState is called without checking if persist_browser_session is true. This could lead to unnecessary operations if session persistence is not required.
2. skyvern/webeye/browser_factory.py:394
  • Draft comment:
    Consider checking if session persistence is required before calling store_browser_session to avoid unnecessary operations.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The store_browser_session method in BrowserState is called without checking if persist_browser_session is true. This could lead to unnecessary operations if session persistence is not required.

Workflow ID: wflow_tZ7uSF8SkVwOFMws


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 d600e0e in 50 seconds

More details
  • Looked at 352 lines of code in 13 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. skyvern/webeye/browser_manager.py:199
  • Draft comment:
    Consider checking if workflow.persist_browser_session is true before calling store_browser_session to avoid unnecessary operations.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The store_browser_session method in BrowserState is called without checking if persist_browser_session is true. This could lead to unnecessary operations if session persistence is not required.
2. skyvern/webeye/browser_factory.py:394
  • Draft comment:
    Consider checking if session persistence is required before storing the browser session to avoid unnecessary operations.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The store_browser_session method in BrowserState is called without checking if persist_browser_session is true. This could lead to unnecessary operations if session persistence is not required.
3. skyvern/forge/sdk/artifact/storage/local.py:90
  • Draft comment:
    Consider checking if session persistence is required before storing the browser session to avoid unnecessary operations.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The store_browser_session method in BrowserState is called without checking if persist_browser_session is true. This could lead to unnecessary operations if session persistence is not required.
4. skyvern/forge/sdk/artifact/storage/s3.py:47
  • Draft comment:
    Consider checking if session persistence is required before storing the browser session to avoid unnecessary operations.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The store_browser_session method in BrowserState is called without checking if persist_browser_session is true. This could lead to unnecessary operations if session persistence is not required.

Workflow ID: wflow_jugZHX4X03Ev9FiZ


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 1955a4c in 22 seconds

More details
  • Looked at 38 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. alembic/versions/2024_09_06_1842-c50f0aa0ef24_add_persist_browser_session_flag_to_.py:23
  • Draft comment:
    Consider adding a comment explaining why the column is initially added as nullable and then altered to be non-nullable. This is a common pattern to avoid locking the table during the migration.
  • Reason this comment was not posted:
    Confidence changes required: 33%
    The migration script sets the default value of the new column persist_browser_session to False for existing records, which is a good practice. However, the column is initially added as nullable, and then altered to be non-nullable. This is a common pattern to avoid locking the table during the migration, but it should be noted in the comments for clarity.

Workflow ID: wflow_LmCuMPg82rDneaUM


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 5c80945 in 22 seconds

More details
  • Looked at 24 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. alembic/versions/2024_09_06_1842-c50f0aa0ef24_add_persist_browser_session_flag_to_.py:11
  • Draft comment:
    Reorder imports to follow PEP 8 guidelines: standard library imports, third-party imports, then local imports.
  • Reason this comment was not posted:
    Confidence changes required: 33%
    The import order should follow PEP 8 guidelines, with standard library imports first, followed by third-party imports, and then local application imports. This applies to the import statements in this file.

Workflow ID: wflow_AbddjurfAnvZLV9s


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

@ykeremy ykeremy merged commit 95b2e53 into main Sep 6, 2024
2 checks passed
@ykeremy ykeremy deleted the ykeremy/persist-browser-session-flag branch September 6, 2024 19:01
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