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 Request context to async_executor #709

Merged
merged 3 commits into from
Aug 16, 2024
Merged

Conversation

ykeremy
Copy link
Contributor

@ykeremy ykeremy commented Aug 16, 2024

🚀 This description was created by Ellipsis for commit f713133

Summary:

This PR introduces a Temporal task queue and worker framework, adding new files for activities, workflows, and worker execution, updates existing files for integration, and includes Docker setup and deployment workflow.

Key points:

  • Add Temporal task queue and worker framework.
  • Add cloud/workers/temporal_workers/temporal_activities.py with _run_task and run_task functions.
  • Add cloud/workers/temporal_workers/run_worker.py for worker execution.
  • Add cloud/workers/temporal_workers/run_workflow.py to initiate workflows.
  • Define RunTaskParmas in cloud/workers/temporal_workers/temporal_workflow_parameters.py.
  • Implement RunTaskWorkflow in cloud/workers/temporal_workers/temporal_workflows.py.
  • Update pyproject.toml to include temporalio dependency.
  • Add scripts/run_worker_wrapper.sh and scripts/take_screenshot_worker.py for worker management.
  • Create temporal_worker.Dockerfile for Docker setup.
  • Modify cloud/config.py to include TEMPORAL_API_KEY.
  • Add GitHub workflow .github/workflows/skyvern_worker_build.yml for Docker image deployment.
  • Update skyvern/forge/sdk/executor/async_executor.py to include request parameter in execute_task and execute_workflow methods.
  • Update skyvern/forge/sdk/routes/agent_protocol.py to pass request parameter to execute_task and execute_workflow functions.

Generated with ❤️ by ellipsis.dev

<!-- ELLIPSIS_HIDDEN -->

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

### Summary:
This PR sets up a Temporal task queue and worker framework, adding activities, workflows, Docker setup, and a GitHub workflow for deployment.

**Key points**:
- Set up Temporal task queue and worker framework
- Add `cloud/workers/temporal_workers/temporal_activities.py` with `_run_task` and `run_task`
- Introduce `cloud/workers/temporal_workers/run_worker.py` for Temporal worker
- Create `cloud/workers/temporal_workers/run_workflow.py` to start workflow
- Define `RunTaskParmas` dataclass in `cloud/workers/temporal_workers/temporal_workflow_parameters.py`
- Implement `RunTaskWorkflow` in `cloud/workers/temporal_workers/temporal_workflows.py`
- Update `pyproject.toml` with `temporalio` dependency
- Add `scripts/run_worker_wrapper.sh` and `scripts/take_screenshot_worker.py` for worker management
- Create `temporal_worker.Dockerfile` for Docker setup
- Modify `cloud/config.py` to include `TEMPORAL_API_KEY`
- Add GitHub workflow `.github/workflows/skyvern_worker_build.yml` for Docker image deployment

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

<!-- ELLIPSIS_HIDDEN -->
<!-- ELLIPSIS_HIDDEN -->

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

### Summary:
This PR sets up a Temporal task queue and worker framework, adding activities, workflows, Docker setup, and a GitHub workflow for deployment.

**Key points**:
- Set up Temporal task queue and worker framework
- Add `cloud/workers/temporal_workers/temporal_activities.py` with `_run_task` and `run_task`
- Introduce `cloud/workers/temporal_workers/run_worker.py` for Temporal worker
- Create `cloud/workers/temporal_workers/run_workflow.py` to start workflow
- Define `RunTaskParmas` dataclass in `cloud/workers/temporal_workers/temporal_workflow_parameters.py`
- Implement `RunTaskWorkflow` in `cloud/workers/temporal_workers/temporal_workflows.py`
- Update `pyproject.toml` with `temporalio` dependency
- Add `scripts/run_worker_wrapper.sh` and `scripts/take_screenshot_worker.py` for worker management
- Create `temporal_worker.Dockerfile` for Docker setup
- Modify `cloud/config.py` to include `TEMPORAL_API_KEY`
- Add GitHub workflow `.github/workflows/skyvern_worker_build.yml` for Docker image deployment

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

<!-- ELLIPSIS_HIDDEN -->
<!-- ELLIPSIS_HIDDEN -->

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

### Summary:
This PR sets up a Temporal task queue and worker framework, adding activities, workflows, Docker setup, and a GitHub workflow for deployment.

**Key points**:
- Set up Temporal task queue and worker framework
- Add `cloud/workers/temporal_workers/temporal_activities.py` with `_run_task` and `run_task`
- Introduce `cloud/workers/temporal_workers/run_worker.py` for Temporal worker
- Create `cloud/workers/temporal_workers/run_workflow.py` to start workflow
- Define `RunTaskParmas` dataclass in `cloud/workers/temporal_workers/temporal_workflow_parameters.py`
- Implement `RunTaskWorkflow` in `cloud/workers/temporal_workers/temporal_workflows.py`
- Update `pyproject.toml` with `temporalio` dependency
- Add `scripts/run_worker_wrapper.sh` and `scripts/take_screenshot_worker.py` for worker management
- Create `temporal_worker.Dockerfile` for Docker setup
- Modify `cloud/config.py` to include `TEMPORAL_API_KEY`
- Add GitHub workflow `.github/workflows/skyvern_worker_build.yml` for Docker image deployment

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

<!-- ELLIPSIS_HIDDEN -->
@ykeremy ykeremy added the sync label Aug 16, 2024
Copy link
Contributor

ellipsis-dev bot commented Aug 16, 2024

Skipped PR review on f713133 because no changed files had a supported extension. If you think this was in error, please contact us and we'll fix it right away.


Generated with ❤️ by ellipsis.dev

@wintonzheng wintonzheng changed the title temporal task queue + worker POC add Request context to async_executor Aug 16, 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 f713133 in 43 seconds

More details
  • Looked at 96 lines of code in 3 files
  • Skipped 1 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/sdk/executor/async_executor.py:17
  • Draft comment:
    The addition of the request parameter to the execute_task and execute_workflow methods is a significant change. Ensure all calls to these methods across the application have been updated to include the request object to prevent runtime errors.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is asking the author to ensure that all calls to the modified methods are updated, which is a speculative comment. It assumes that the author might not have updated all calls, which is not a definite issue. The comment does not point out a specific code change required in the diff itself, but rather suggests a check outside the scope of the diff.
    The comment could be seen as a reminder rather than a necessary action item, as it does not point out a specific issue in the code diff itself. It assumes the author might have missed updating calls, which is speculative.
    While the comment serves as a reminder, it does not align with the rules of commenting only when a definite code change is required. It is speculative and not directly actionable based on the diff provided.
    The comment should be removed as it is speculative and does not point out a definite issue in the code diff itself.

Workflow ID: wflow_WAHpFDhoQ7qTP0Li


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

@wintonzheng wintonzheng merged commit fd5fdb9 into main Aug 16, 2024
2 checks passed
@wintonzheng wintonzheng deleted the shu/task_queue_temporal branch August 16, 2024 05:25
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.

2 participants