Docs/migration 1x to 2x - #655
Conversation
31f5f5e to
162361b
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
162361b to
e4ae074
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
e4ae074 to
2681198
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
be09914 to
6c1c23f
Compare
This comment has been minimized.
This comment has been minimized.
Claude AI reviewDocumentation-only PR: a new I verified the guide's technical claims against the source rather than reviewing runtime behavior, since inaccurate migration docs would misdirect users:
No inaccurate statements or broken examples found. No actionable findings. Residual test risk: the guide's code snippets and Reviewed commit |
6c1c23f to
0edb4a6
Compare
This comment has been minimized.
This comment has been minimized.
|
|
||
| ## Porting to 2.0 | ||
|
|
||
| Each change below lists what changed and what you must do. The ones most likely |
There was a problem hiding this comment.
"what you must do" reads demanding. Suggest "what to do", matching the tone of the section headings.
| Remove them. Enforce any timeout inside the invoked function or as a separate | ||
| timer. | ||
|
|
||
| ### `map` / child batching names removed |
There was a problem hiding this comment.
The ChainedInvoke* enums (added per #655 (comment)) are not batching names, so this heading mislabels them. "Removed 1.x-only names" would cover everything in the section.
| `initial_state` is serializable by the configured serdes. For a transient serdes | ||
| failure, raise the new `RetryableSerDesError` (retries) instead of `SerDesError` | ||
| (permanent). See [Serialize/Deserialize round trip](#serializedeserialize-round-trip). |
There was a problem hiding this comment.
Codex AI review · Finding arf_v1_6jzq2y7mwo2cthuq7sg6t3i467
P1 — Document that RetryableSerDesError replays the whole invocation. This does not retry only serialization: executors re-raise it before a success checkpoint, so backend re-invocation can re-run an AT_LEAST_ONCE_PER_RETRY step and repeat its side effects; an at-most-once step instead follows interrupted-step retry handling. Saying only “(retries)” can introduce duplicate writes during migration. Explain the invocation-level replay and its idempotency/step-semantics implications.
| ### `wait_for_condition` raises on exhaustion | ||
|
|
||
| It raises `WaitForConditionError` when it exhausts `max_attempts`. | ||
|
|
||
| Catch `WaitForConditionError` instead of inspecting the returned state. |
There was a problem hiding this comment.
Codex AI review · Finding arf_v1_y7lkshfplubrflac5c4etrgbk3
P2 — Scope exhaustion behavior to the built-in strategy. WaitForConditionConfig has no max_attempts; only a strategy produced by create_wait_strategy(WaitStrategyConfig(...)) raises on exhaustion. A custom strategy can continue indefinitely unless it enforces its own limit, so the current wording may leave migrated workflows polling forever.
| ### `wait_for_condition` raises on exhaustion | |
| It raises `WaitForConditionError` when it exhausts `max_attempts`. | |
| Catch `WaitForConditionError` instead of inspecting the returned state. | |
| ### `create_wait_strategy` raises on exhaustion | |
| A strategy created by `create_wait_strategy(WaitStrategyConfig(...))` raises | |
| `WaitForConditionError` when it exhausts `max_attempts`; custom wait strategies | |
| must enforce their own limit. | |
| Catch `WaitForConditionError` instead of inspecting the returned state. |
| `context.wait_for_callback(...)` returns the payload directly and raises the | ||
| callback error from the call itself (there is no `callback.result()`): |
There was a problem hiding this comment.
Codex AI review · Finding arf_v1_o4c23apyh45544dfpujfjo2fi7
P2 — Preserve the documented manual callback API. context.create_callback() still returns a public Callback whose .result() waits for completion. The absolute statement that there is no callback.result() can cause users of manual callback flows to remove the required wait; restrict this statement to the value returned by wait_for_callback().
| `context.wait_for_callback(...)` returns the payload directly and raises the | |
| callback error from the call itself (there is no `callback.result()`): | |
| `context.wait_for_callback(...)` returns the payload directly, so do not call | |
| `.result()` on that return value. The separate `context.create_callback()` API still | |
| returns a callback whose `.result()` waits for completion: |
Codex AI reviewFound three migration-guide issues: one replay-safety omission and two misleading API descriptions. Reviewed commit |
| **default `map` / `parallel` completion** (which completes after the first | ||
| observed failure and stops scheduling pending items; already-started items are | ||
| not cancelled, so with unlimited concurrency all items may already be running - | ||
| set `max_concurrency` if you need to bound that). Opt back into process-all with |
There was a problem hiding this comment.
max_concurrency behavior changed. Seems we didn't mention it
Issue #, if available: N/A
Description of changes:
Migration guide for python v2
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.