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

totp + proxy location support in observer #1549

Merged
merged 8 commits into from
Jan 14, 2025

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Jan 14, 2025

Important

Add TOTP verification and dynamic proxy location support to observer service in observer_service.py.

  • Behavior:
    • Added totp_verification_url and totp_identifier parameters to run_observer_cruise_helper() and _generate_navigation_task() to support TOTP verification.
    • Updated proxy_location in WorkflowCreateYAMLRequest to use observer_cruise.proxy_location if available, defaulting to ProxyLocation.RESIDENTIAL.
  • Functions:
    • Modified run_observer_cruise_helper() to pass TOTP parameters to _generate_navigation_task().
    • Updated _generate_navigation_task() to accept and utilize TOTP parameters.

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

wintonzheng and others added 7 commits January 14, 2025 08:40
<!-- ELLIPSIS_HIDDEN -->

> [!IMPORTANT]
> Add webhook support for observer cruises, including database schema updates, model changes, and new service functions for sending webhooks.
>
>   - **Database**:
>     - Add columns `webhook_callback_url`, `totp_verification_url`, `totp_identifier` to `observer_cruises` table in Alembic migration `2025_01_14_0507-8a0649a92f23_observer_webhook_callback_url_totp_.py`.
>   - **Models**:
>     - Update `ObserverCruiseModel` in `models.py` to include `webhook_callback_url`, `totp_verification_url`, `totp_identifier`.
>   - **Schemas**:
>     - Add `webhook_callback_url`, `totp_verification_url`, `totp_identifier` to `CruiseRequest` in `observers.py`.
>   - **Services**:
>     - Add `send_observer_cruise_webhook()` in `observer_service.py` to send webhooks for observer cruises.
>     - Modify `mark_observer_cruise_as_failed()` and `mark_observer_cruise_as_completed()` in `observer_service.py` to call `send_observer_cruise_webhook()`.
>   - **Exceptions**:
>     - Update `FailedToSendWebhook` in `exceptions.py` to include `observer_cruise_id`.
>   - **Handlers**:
>     - Update `poll_verification_code()` and `_get_verification_code_from_url()` in `handler.py` to include `workflow_run_id` and `workflow_permanent_id`.
>
> <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 b9f6877dd83060d0efc4455c4789da0a446f1a01. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
…src/'

<!-- ELLIPSIS_HIDDEN -->

> [!IMPORTANT]
> Add webhook support for observer cruises, including database schema updates, model changes, and new service functions for sending webhooks.
>
>   - **Database**:
>     - Add columns `webhook_callback_url`, `totp_verification_url`, `totp_identifier` to `observer_cruises` table in Alembic migration `2025_01_14_0507-8a0649a92f23_observer_webhook_callback_url_totp_.py`.
>   - **Models**:
>     - Update `ObserverCruiseModel` in `models.py` to include `webhook_callback_url`, `totp_verification_url`, `totp_identifier`.
>   - **Schemas**:
>     - Add `webhook_callback_url`, `totp_verification_url`, `totp_identifier` to `CruiseRequest` in `observers.py`.
>   - **Services**:
>     - Add `send_observer_cruise_webhook()` in `observer_service.py` to send webhooks for observer cruises.
>     - Modify `mark_observer_cruise_as_failed()` and `mark_observer_cruise_as_completed()` in `observer_service.py` to call `send_observer_cruise_webhook()`.
>   - **Exceptions**:
>     - Update `FailedToSendWebhook` in `exceptions.py` to include `observer_cruise_id`.
>   - **Handlers**:
>     - Update `poll_verification_code()` and `_get_verification_code_from_url()` in `handler.py` to include `workflow_run_id` and `workflow_permanent_id`.
>
> <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 b9f6877dd83060d0efc4455c4789da0a446f1a01. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
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 4172697 in 13 seconds

More details
  • Looked at 49 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/sdk/services/observer_service.py:500
  • Draft comment:
    Ensure that ProxyLocation.RESIDENTIAL is the intended default when observer_cruise.proxy_location is None.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The change in line 500 introduces a potential issue with the default value for proxy_location. The current implementation uses observer_cruise.proxy_location or ProxyLocation.RESIDENTIAL, which means if observer_cruise.proxy_location is None, it defaults to ProxyLocation.RESIDENTIAL. This is fine if RESIDENTIAL is the intended default, but it should be confirmed that this is the desired behavior.

Workflow ID: wflow_j4V24C6x72C42bkN


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

Base automatically changed from shu/webhook_for_observer to main January 14, 2025 16:59
@wintonzheng wintonzheng merged commit a0df333 into main Jan 14, 2025
6 checks passed
@wintonzheng wintonzheng deleted the shu/totp_support_for_observer branch January 14, 2025 17:06
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