Skip to content

Conversation

@wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Oct 29, 2025


🔧 This PR adds the run_with field to the workflow run webhook response, ensuring that webhook consumers receive complete information about how the workflow was executed.

🔍 Detailed Analysis

Key Changes

  • Webhook Response Enhancement: Added run_with=workflow_run.run_with to the WorkflowRunResponse object in the execute_workflow_webhook function
  • Data Completeness: Ensures the webhook response includes execution context information that was previously missing
  • Single Line Addition: Minimal code change with focused impact on webhook functionality

Technical Implementation

sequenceDiagram
    participant Client
    participant WebhookService
    participant WorkflowRun
    participant Response
    
    Client->>WebhookService: execute_workflow_webhook()
    WebhookService->>WorkflowRun: Get workflow_run data
    WorkflowRun-->>WebhookService: workflow_run object
    WebhookService->>Response: Create WorkflowRunResponse
    Note over Response: Now includes run_with field
    Response-->>Client: Complete webhook response
Loading

Impact

  • API Consistency: Webhook responses now include the same run_with information available in other workflow run endpoints
  • Enhanced Debugging: Webhook consumers can now see how workflows were executed, improving troubleshooting capabilities
  • Backward Compatibility: This is an additive change that doesn't break existing webhook consumers, only provides additional data

Created with Palmier


Important

Add run_with field to WorkflowRunResponse in service.py to include execution method in webhook response.

  • Behavior:
    • Add run_with field to WorkflowRunResponse in execute_workflow_webhook() in service.py to include the execution method in the webhook response.

This description was created by Ellipsis for 63ebfb3. You can customize this summary. It will automatically update as commits are pushed.

Summary by CodeRabbit

  • New Features
    • Workflow responses now include run mode information in webhook payloads, providing additional visibility into workflow execution context.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 29, 2025

Walkthrough

A new run_with field is added to the WorkflowRunResponse model and propagated into the webhook payload construction within the workflow service's execute_workflow_webhook method. No additional logic or error handling changes are introduced.

Changes

Cohort / File(s) Change Summary
WorkflowRunResponse field addition
skyvern/forge/sdk/workflow/service.py
skyvern/forge/sdk/workflow/models/workflow.py
Added `run_with: str

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

  • Ensure the run_with value is correctly sourced from the workflow run context
  • Verify backwards compatibility of the model signature change
  • Confirm the field is properly propagated through all webhook consumers

Possibly related PRs

Suggested labels

sync, wintonzheng

Poem

🐰 A new field hops into view,
run\_with whispers what workflows do,
Webhooks now carry the tale,
Of which mode made the quest prevail!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "add run_with to workflow run webhook response" is clear, specific, and directly aligned with the changeset. The main change is adding a new run_with field to the WorkflowRunResponse model and passing it into the webhook response payload, which is exactly what the title describes. The title uses precise terminology without vague language or unnecessary details, making it immediately clear to reviewers what the primary change accomplishes.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch shu/add_run_with_to_workflow_run_webhook

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 33ad4cf and 63ebfb3.

📒 Files selected for processing (1)
  • skyvern/forge/sdk/workflow/service.py (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
{skyvern,integrations,alembic,scripts}/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

{skyvern,integrations,alembic,scripts}/**/*.py: Use Python 3.11+ features and add type hints throughout the codebase
Follow PEP 8 with a maximum line length of 100 characters
Use absolute imports for all Python modules
Document all public functions and classes with Google-style docstrings
Use snake_case for variables and functions, and PascalCase for classes
Prefer async/await over callbacks in asynchronous code
Use asyncio for concurrency
Always handle exceptions in async code
Use context managers for resource cleanup
Use specific exception classes
Include meaningful error messages when raising or logging exceptions
Log errors with appropriate severity levels
Never expose sensitive information in error messages

Files:

  • skyvern/forge/sdk/workflow/service.py
**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.py: Python code must be linted and formatted with Ruff
Use type hints throughout Python code
Prefer async/await for asynchronous Python code
Enforce a maximum line length of 120 characters in Python files

Files:

  • skyvern/forge/sdk/workflow/service.py
skyvern/**/*.py

📄 CodeRabbit inference engine (CLAUDE.md)

Type-check Python code in the skyvern/ package with mypy

Files:

  • skyvern/forge/sdk/workflow/service.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Run tests and pre-commit hooks

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Important

Looks good to me! 👍

Reviewed everything up to 63ebfb3 in 1 minute and 7 seconds. Click for details.
  • Reviewed 12 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. skyvern/forge/sdk/workflow/service.py:2058
  • Draft comment:
    Added run_with=workflow_run.run_with to the webhook response. Ensure that this field is always valid (or has a proper default) and that the corresponding response schema and docs are updated.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_9AwBQv9hyjIopq2I

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@suchintan
Copy link
Contributor

This is not what the user is interested in. They're interested in reporting whether a cache was actually used - not whether the user requested a cache be used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants