-
Notifications
You must be signed in to change notification settings - Fork 945
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 GET workflows/runs/run_id endpoint #973
Conversation
<!-- ELLIPSIS_HIDDEN --> > [!IMPORTANT] > Add `GET /workflows/runs/{workflow_run_id}` endpoint to retrieve workflow run status by `workflow_run_id`, with error handling for not found cases. > > - **Endpoints**: > - Add `GET /workflows/runs/{workflow_run_id}` endpoint in `agent_protocol.py` to retrieve workflow run status by `workflow_run_id`. > - Includes a variant with a trailing slash, not included in schema. > - **Service Logic**: > - Add `build_workflow_run_status_response_by_workflow_id()` in `service.py` to construct response using `workflow_run_id`. > - Handles case where workflow run is not found by logging an error and raising `WorkflowRunNotFound`. > > <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 ec0c2ddda325736be86fbc872563d727bb71b146. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN -->
There was a problem hiding this 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 5084fdf in 19 seconds
More details
- Looked at
59
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. skyvern/forge/sdk/routes/agent_protocol.py:653
- Draft comment:
The function nameget_workflow_run_by_run_id
is misleading as it suggests it retrieves a workflow run byworkflow_id
, but it actually usesworkflow_run_id
. Consider renaming it toget_workflow_run_by_workflow_run_id
for clarity. This also applies to the functionbuild_workflow_run_status_response_by_workflow_id
inservice.py
. - Reason this comment was not posted:
Confidence changes required:50%
The functionget_workflow_run_by_run_id
inagent_protocol.py
andbuild_workflow_run_status_response_by_workflow_id
inservice.py
are using the termworkflow_id
in their names, which is misleading since they are actually dealing withworkflow_run_id
. This can cause confusion for future developers.
Workflow ID: wflow_Nlh79wXnVgylUioT
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Incremental review on 5084fdf in 43 seconds
More details
- Looked at
59
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_Uex4ycs5wxwdwqnY
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.
@@ -612,6 +612,22 @@ async def get_last_task_for_workflow_run(self, workflow_run_id: str) -> Task | N | |||
async def get_tasks_by_workflow_run_id(self, workflow_run_id: str) -> list[Task]: | |||
return await app.DATABASE.get_tasks_by_workflow_run_id(workflow_run_id=workflow_run_id) | |||
|
|||
async def build_workflow_run_status_response_by_workflow_id( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function name build_workflow_run_status_response_by_workflow_id
is misleading. Consider renaming it to build_workflow_run_status_response_by_run_id
to better reflect its purpose.
Important
Add
GET /workflows/runs/{workflow_run_id}
endpoint to retrieve workflow run status with error handling for not found cases.GET /workflows/runs/{workflow_run_id}
endpoint inagent_protocol.py
to retrieve workflow run status byworkflow_run_id
.build_workflow_run_status_response_by_workflow_id()
inservice.py
to construct response usingworkflow_run_id
.WorkflowRunNotFound
.This description was created by
for 5084fdf. It will automatically update as commits are pushed.