Skip to content

TEC-687 - Refactor workflow tasks to use @app.task decorator and update SDK usa…#1

Open
R4ph-t wants to merge 3 commits intomainfrom
rt/sdk-update
Open

TEC-687 - Refactor workflow tasks to use @app.task decorator and update SDK usa…#1
R4ph-t wants to merge 3 commits intomainfrom
rt/sdk-update

Conversation

@R4ph-t
Copy link

@R4ph-t R4ph-t commented Feb 5, 2026

Update examples to Render SDK v0.2.0

Summary

  • Migrate all workflow examples to use the new SDK v0.2.0 patterns
  • Update documentation to reflect the latest API changes

Changes

Task SDK (Workflow Services)

  • Replace from render_sdk.workflows import task, start with from render_sdk import Workflows
  • Replace @task decorator with @app.task pattern
  • Replace start() with Workflows(auto_start=True) initialization
  • Consolidate retry configurations into Workflows default settings

Client SDK (API Service)

  • Replace from render_sdk.client import Client with from render_sdk import Render
  • Replace Client(api_key=...) with Render() (auto-reads RENDER_API_KEY env var)
  • Add TaskRunError for task-specific error handling
  • Update task invocation from keyword args to new positional format:
    Old
    client.workflows.run_task(workflow_service_slug="...", task_name="...", input={...})
    New
    await render.workflows.run_task("slug/task-name", {"param": value})

Dependencies

Update all requirements.txt files to render-sdk>=0.2.0

Cleanup

Remove unused from typing import Any imports

…ge across multiple services. Updated requirements to render-sdk version 0.2.0 for enhanced functionality. Adjusted README files to reflect changes in task invocation and examples.
@R4ph-t R4ph-t requested a review from Borets February 5, 2026 11:46
@R4ph-t R4ph-t changed the title Refactor workflow tasks to use @app.task decorator and update SDK usa… TEC-687 - Refactor workflow tasks to use @app.task decorator and update SDK usa… Feb 5, 2026
Copy link
Collaborator

@Borets Borets left a comment

Choose a reason for hiding this comment

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

Overall lgtm. Seeing only changes to how the SDK is used the rest of the logic is untouched.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants