-
Notifications
You must be signed in to change notification settings - Fork 798
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
Conversation
<!-- 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 -->
There was a problem hiding this 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 in13
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 ifworkflow.persist_browser_session
is true before callingstore_browser_session
to avoid unnecessary operations. - Reason this comment was not posted:
Confidence changes required:50%
Thestore_browser_session
method inBrowserState
is called without checking ifpersist_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 callingstore_browser_session
to avoid unnecessary operations. - Reason this comment was not posted:
Confidence changes required:50%
Thestore_browser_session
method inBrowserState
is called without checking ifpersist_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.
There was a problem hiding this 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 in13
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 ifworkflow.persist_browser_session
is true before callingstore_browser_session
to avoid unnecessary operations. - Reason this comment was not posted:
Confidence changes required:50%
Thestore_browser_session
method inBrowserState
is called without checking ifpersist_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%
Thestore_browser_session
method inBrowserState
is called without checking ifpersist_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%
Thestore_browser_session
method inBrowserState
is called without checking ifpersist_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%
Thestore_browser_session
method inBrowserState
is called without checking ifpersist_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.
There was a problem hiding this 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 in1
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 columnpersist_browser_session
toFalse
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.
There was a problem hiding this 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 in1
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.
Summary:
Add
persist_browser_session
flag to workflows, updating database models, API endpoints, and browser management logic for session persistence.Key points:
persist_browser_session
flag toworkflows
table in alembic version2024_09_06_1842-c50f0aa0ef24
.WorkflowModel
inskyvern/forge/sdk/db/models.py
to includepersist_browser_session
.create_workflow
inskyvern/forge/sdk/db/client.py
to acceptpersist_browser_session
.convert_to_workflow
inskyvern/forge/sdk/db/utils.py
to handlepersist_browser_session
.persist_browser_session
toWorkflow
class inskyvern/forge/sdk/workflow/models/workflow.py
.persist_browser_session
inWorkflowCreateYAMLRequest
inskyvern/forge/sdk/workflow/models/yaml.py
.create_workflow
andcreate_workflow_from_request
inskyvern/forge/sdk/workflow/service.py
to handlepersist_browser_session
.store_browser_session
andretrieve_browser_session
inskyvern/forge/sdk/artifact/storage/base.py
,local.py
, ands3.py
.cloud/webeye/special_browsers.py
,skyvern/webeye/browser_factory.py
, andskyvern/webeye/browser_manager.py
to support session persistence.Generated with ❤️ by ellipsis.dev