Fix backward compat: fall back to v1 update endpoint#387
Merged
Conversation
…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>
v1r3n
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Fixes: task updates failing with HTTP 404 when SDK 1.3.5+ is used against Conductor instances older than major version 5.