Skip to content

Fix backward compat: fall back to v1 update endpoint#387

Merged
v1r3n merged 2 commits intomainfrom
fix/backward-compat-update-task-v1-fallback
Mar 19, 2026
Merged

Fix backward compat: fall back to v1 update endpoint#387
v1r3n merged 2 commits intomainfrom
fix/backward-compat-update-task-v1-fallback

Conversation

@manan164
Copy link
Contributor

@manan164 manan164 commented Mar 18, 2026

The /api/tasks/update-v2 endpoint introduced in SDK 1.3.5 only exists on Conductor v5+. Customers on older instances (e.g. v4.x) receive a 404, causing all task updates to fail.

Changes:

  • On HTTP 404 from update_task_v2, automatically fall back to the v1 update_task endpoint and set _use_update_v2=False for the runner lifetime
  • Non-404 API errors continue to retry with v2 (no change in behaviour)
  • Tight execute loop preserved for v1: after each v1 update, immediately poll for the next task rather than waiting for the polling interval
  • Same fix applied to both TaskRunner (sync) and AsyncTaskRunner
  • 7 new unit tests covering fallback, flag behaviour, and tight loop

Fixes: task updates failing with HTTP 404 when SDK 1.3.5+ is used against Conductor instances older than major version 5.

…or < v5

The /api/tasks/update-v2 endpoint introduced in SDK 1.3.5 only exists on
Orkes Conductor v5+. Customers on older instances (e.g. v4.x) receive a 404,
causing all task updates to fail.

Changes:
- On HTTP 404 from update_task_v2, automatically fall back to the v1
  update_task endpoint and set _use_update_v2=False for the runner lifetime
- Non-404 API errors continue to retry with v2 (no change in behaviour)
- Tight execute loop preserved for v1: after each v1 update, immediately
  poll for the next task rather than waiting for the polling interval
- Same fix applied to both TaskRunner (sync) and AsyncTaskRunner
- 7 new unit tests covering fallback, flag behaviour, and tight loop

Fixes: task updates failing with HTTP 404 when SDK 1.3.5+ is used against
Orkes Conductor instances older than major version 5.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@manan164 manan164 changed the title Fix backward compat: fall back to v1 update endpoint on Orkes Conductor Fix backward compat: fall back to v1 update endpoint Mar 18, 2026
@v1r3n v1r3n merged commit c2e3760 into main Mar 19, 2026
1 check passed
@v1r3n v1r3n deleted the fix/backward-compat-update-task-v1-fallback branch March 19, 2026 05:48
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.

2 participants