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

remove task actions #998

Merged
merged 1 commit into from
Oct 18, 2024
Merged

remove task actions #998

merged 1 commit into from
Oct 18, 2024

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Oct 18, 2024

Important

nuke_related_objects_for_task in cloud/tasks.py now deletes task actions using the new delete_task_actions method in client.py.

  • Behavior:
    • nuke_related_objects_for_task in cloud/tasks.py now deletes task actions before resetting task status.
  • Database:
    • Adds delete_task_actions method in client.py to delete actions by organization_id and task_id.

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

<!-- ELLIPSIS_HIDDEN -->

> [!IMPORTANT]
> Add deletion of task actions when nuking and restarting a task in `cloud/tasks.py`.
>
>   - **Behavior**:
>     - `nuke_related_objects_for_task` in `cloud/tasks.py` now deletes task actions before resetting task status.
>   - **Database**:
>     - Adds `delete_task_actions` method in `client.py` to delete actions by `organization_id` and `task_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 2874fb66c2f591b62fa671bc17cabed864e2837a. 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! Incremental review on 97b56ff in 10 seconds

More details
  • Looked at 20 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_353NTnrl26Ef63Zt


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.

❌ Changes requested. Reviewed everything up to 97b56ff in 21 seconds

More details
  • Looked at 20 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_II9yOBS6CYJ2C22A


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@@ -1629,3 +1629,15 @@ async def get_previous_actions_for_task(self, task_id: str) -> list[Action]:
)
actions = (await session.scalars(query)).all()
return [Action.model_validate(action) for action in actions]

async def delete_task_actions(self, organization_id: str, task_id: str) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding error handling for SQLAlchemyError and other exceptions, similar to other methods in this class, to ensure consistent error logging and handling.

@wintonzheng wintonzheng changed the title remove task actions when nuking and restarting a task remove task actions Oct 18, 2024
@wintonzheng wintonzheng merged commit dad53e1 into main Oct 18, 2024
2 checks passed
@wintonzheng wintonzheng deleted the shu/nuke_actions_when_nuking_tasks branch October 18, 2024 06:24
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