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 a query param to filter out workflow tasks #919

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

ykeremy
Copy link
Contributor

@ykeremy ykeremy commented Oct 7, 2024

Important

Add only_standalone_tasks query parameter to filter tasks not part of a workflow run in get_tasks() and get_agent_tasks().

  • Behavior:
    • Add only_standalone_tasks parameter to get_tasks() in client.py to filter tasks not part of a workflow run.
    • In agent_protocol.py, add only_standalone_tasks query parameter to get_agent_tasks().
    • Raise HTTPException if only_standalone_tasks and workflow_run_id are used together in get_agent_tasks().
  • Misc:
    • Update docstring in get_tasks() in client.py to include only_standalone_tasks parameter.

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

<!-- ELLIPSIS_HIDDEN -->

> [!IMPORTANT]
> Add `only_standalone_tasks` query parameter to filter tasks not part of a workflow run in `get_tasks()` and `get_agent_tasks()`.
>
>   - **Behavior**:
>     - Add `only_standalone_tasks` parameter to `get_tasks()` in `client.py` to filter tasks not part of a workflow run.
>     - In `agent_protocol.py`, add `only_standalone_tasks` query parameter to `get_agent_tasks()`.
>     - Raise `HTTPException` if `only_standalone_tasks` and `workflow_run_id` are used together in `get_agent_tasks()`.
>   - **Misc**:
>     - Update docstring in `get_tasks()` in `client.py` to include `only_standalone_tasks` parameter.
>
> <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 ea78ed3f6e3c0609d73848b6020606ac1d742e2a. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
@ykeremy ykeremy added the sync label Oct 7, 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! Incremental review on 262cc5b in 23 seconds

More details
  • Looked at 66 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/sdk/db/client.py:461
  • Draft comment:
    Consider adding a check to ensure only_standalone_tasks and workflow_run_id are not used together, similar to the logic in get_agent_tasks.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment suggests a potential conflict between only_standalone_tasks and workflow_run_id. The code does not currently prevent both from being used together, which could lead to an empty result set if both are specified. However, without seeing the get_agent_tasks function or understanding the broader context, it's unclear if this is a necessary check.
    I might be missing the context of how get_tasks is used elsewhere in the codebase, which could justify the need for the suggested check. The comment assumes a conflict without evidence from the current code.
    Given the lack of context and the fact that the comment is speculative, it might be safer to remove it unless there's clear evidence of a conflict.
    Remove the comment as it is speculative and lacks strong evidence of a necessary code change.

Workflow ID: wflow_K47IkRDvAU8ToSum


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! Reviewed everything up to 262cc5b in 23 seconds

More details
  • Looked at 66 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/sdk/db/client.py:462
  • Draft comment:
    Consider adding a check to raise an exception if both only_standalone_tasks and workflow_run_id are used together, similar to the logic in get_agent_tasks. This ensures consistent behavior across different parts of the codebase.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment suggests a potential conflict between only_standalone_tasks and workflow_run_id, which could be a valid concern if both parameters are used together. However, without seeing the logic in get_agent_tasks or understanding the intended behavior, it's speculative. The comment does not provide strong evidence of an issue.
    I might be missing the context of get_agent_tasks or the intended behavior when both parameters are used. The comment could be valid if there's a known conflict, but it's not clear from the provided information.
    Without clear evidence or context, the comment remains speculative. The suggestion to add a check is not actionable without understanding the intended behavior or existing logic in get_agent_tasks.
    The comment is speculative and lacks strong evidence of an issue. It should be deleted unless more context is provided.

Workflow ID: wflow_XGhkizWvvHMD8ann


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

@msalihaltun msalihaltun merged commit 8aa29be into main Oct 7, 2024
2 checks passed
@msalihaltun msalihaltun deleted the salih/add-query-param-to-exclude-workflow-tasks branch October 7, 2024 21:09
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