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 workflow templates endpoint #1690

Merged
merged 1 commit into from
Jan 31, 2025
Merged

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Jan 31, 2025

Important

Add /workflows/templates endpoint in agent_protocol.py to retrieve workflow templates with published and draft statuses.

  • New Endpoint:
    • Adds get_workflow_templates() function in agent_protocol.py to retrieve workflow templates.
    • Endpoint: /workflows/templates returns a list of Workflow objects.
  • Functionality:
    • Fetches global workflow permanent IDs using app.STORAGE.retrieve_global_workflows().
    • Retrieves workflows with statuses published and draft using app.WORKFLOW_SERVICE.get_workflows_by_permanent_ids().
    • Returns an empty list if no global workflow permanent IDs are found.

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

<!-- ELLIPSIS_HIDDEN -->

> [!IMPORTANT]
> Add new endpoint `/workflows/templates` in `agent_protocol.py` to retrieve workflow templates with statuses `published` or `draft`.
>
>   - **New Endpoint**:
>     - Adds `get_workflow_templates()` function in `agent_protocol.py` to retrieve workflow templates.
>     - Endpoint `/workflows/templates` returns a list of `Workflow` objects with statuses `published` or `draft`.
>     - Handles case where no global workflows are found by returning an empty list.
>
> <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 626639a51e49f19f9bdf1b957c4682d9bc589254. 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 3f74820 in 10 seconds

More details
  • Looked at 27 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/sdk/routes/agent_protocol.py:946
  • Draft comment:
    Consider adding analytics capture for the new endpoint to maintain consistency with other endpoints.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The new endpoint lacks analytics capture, which is inconsistent with other endpoints.

Workflow ID: wflow_3FxA9qnKsmaz1iwB


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 3f74820 in 14 seconds

More details
  • Looked at 27 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/sdk/routes/agent_protocol.py:946
  • Draft comment:
    Consider adding analytics capture for the get_workflow_templates endpoint to maintain consistency with other endpoints.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The new endpoint get_workflow_templates is added correctly, but it lacks analytics capture which is present in other similar endpoints. This could be important for tracking usage and debugging.

Workflow ID: wflow_Ox3BxyoNgtZjeB1I


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

@msalihaltun msalihaltun merged commit 6a2edc1 into main Jan 31, 2025
7 checks passed
@msalihaltun msalihaltun deleted the salih/workflow-templates-endpoint branch January 31, 2025 19:30
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