Skip to content

Docs/migration 1x to 2x - #655

Open
ayushiahjolia wants to merge 1 commit into
mainfrom
docs/migration-1x-to-2x
Open

Docs/migration 1x to 2x#655
ayushiahjolia wants to merge 1 commit into
mainfrom
docs/migration-1x-to-2x

Conversation

@ayushiahjolia

Copy link
Copy Markdown
Contributor

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.

@ayushiahjolia
ayushiahjolia force-pushed the docs/migration-1x-to-2x branch from 31f5f5e to 162361b Compare August 18, 2026 21:38
@ayushiahjolia
ayushiahjolia marked this pull request as ready for review August 18, 2026 21:39
@ayushiahjolia
ayushiahjolia temporarily deployed to ai-pr-review-runtime August 18, 2026 21:39 — with GitHub Actions Inactive
@ayushiahjolia
ayushiahjolia temporarily deployed to ai-pr-review-runtime August 18, 2026 21:39 — with GitHub Actions Inactive
Comment thread docs/migration-1.x-to-2.x.md
Comment thread docs/migration-1.x-to-2.x.md Outdated
Comment thread docs/migration-1.x-to-2.x.md Outdated
@github-actions

This comment has been minimized.

Comment thread docs/migration-1.x-to-2.x.md
Comment thread docs/migration-1.x-to-2.x.md Outdated
@github-actions

This comment has been minimized.

@ayushiahjolia
ayushiahjolia force-pushed the docs/migration-1x-to-2x branch from 162361b to e4ae074 Compare August 19, 2026 20:57
@ayushiahjolia
ayushiahjolia temporarily deployed to ai-pr-review-runtime August 19, 2026 20:57 — with GitHub Actions Inactive
@ayushiahjolia
ayushiahjolia temporarily deployed to ai-pr-review-runtime August 19, 2026 20:57 — with GitHub Actions Inactive
Comment thread docs/migration-1.x-to-2.x.md
Comment thread docs/migration-1.x-to-2.x.md Outdated
@github-actions

This comment has been minimized.

Comment thread docs/migration-1.x-to-2.x.md Outdated
@github-actions

This comment has been minimized.

Comment thread docs/migration-1.x-to-2.x.md
@github-actions

This comment has been minimized.

Comment thread docs/migration-1.x-to-2.x.md Outdated
Comment thread docs/migration-1.x-to-2.x.md
Comment thread docs/migration-1.x-to-2.x.md
@github-actions

This comment has been minimized.

@ayushiahjolia
ayushiahjolia marked this pull request as draft August 27, 2026 04:13
@ayushiahjolia
ayushiahjolia force-pushed the docs/migration-1x-to-2x branch from 6f1d145 to 185e012 Compare August 27, 2026 19:02
@ayushiahjolia
ayushiahjolia temporarily deployed to ai-pr-review-runtime August 27, 2026 19:02 — with GitHub Actions Inactive
@github-actions

This comment has been minimized.

@ayushiahjolia
ayushiahjolia force-pushed the docs/migration-1x-to-2x branch from 185e012 to be09914 Compare August 27, 2026 19:19
@ayushiahjolia
ayushiahjolia temporarily deployed to ai-pr-review-runtime August 27, 2026 19:20 — with GitHub Actions Inactive
@ayushiahjolia
ayushiahjolia temporarily deployed to ai-pr-review-runtime August 27, 2026 19:20 — with GitHub Actions Inactive
@github-actions

This comment has been minimized.

@ayushiahjolia
ayushiahjolia marked this pull request as ready for review August 27, 2026 19:32
@ayushiahjolia
ayushiahjolia temporarily deployed to ai-pr-review-runtime August 27, 2026 19:32 — with GitHub Actions Inactive
@github-actions

This comment has been minimized.

Comment thread docs/migration-1.x-to-2.x.md Outdated
@github-actions

This comment has been minimized.

@ayushiahjolia
ayushiahjolia force-pushed the docs/migration-1x-to-2x branch from be09914 to 6c1c23f Compare August 27, 2026 20:07
@ayushiahjolia
ayushiahjolia temporarily deployed to ai-pr-review-runtime August 27, 2026 20:07 — with GitHub Actions Inactive
@ayushiahjolia
ayushiahjolia temporarily deployed to ai-pr-review-runtime August 27, 2026 20:07 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

Codex AI review

No actionable findings. Changes are documentation-only; residual risk is limited to future API/documentation drift.

Reviewed commit 6c1c23fe6206a4982795f437c0e251941292116b. Workflow run

@github-actions

Copy link
Copy Markdown
Contributor

Claude AI review

Documentation-only PR: a new docs/migration-1.x-to-2.x.md migration guide and an expanded WaitForConditionConfig docstring in packages/aws-durable-execution-sdk-python/src/aws_durable_execution_sdk_python/waits.py.

I verified the guide's technical claims against the source rather than reviewing runtime behavior, since inaccurate migration docs would misdirect users:

  • Error hierarchy / exportsDurableOperationError base, StepError/InvokeError/ChildContextError/WaitForConditionError, graded CallbackError subtypes, SerDesError (child of DurableExecutionsError), RetryableSerDesError (retryable InvocationError); all root exports match __init__.py __all__.
  • __cause__raise_as_operation_error reconstructs a DurableOperationError stand-in (registry fallback to base for non-SDK types) on both first run and replay; the guide's claim is accurate.
  • First-run round trip — confirmed in step.py, child.py, wait_for_condition.py; invoke.py does not round-trip, matching "invoke unaffected."
  • wait_for_conditioninitial_state round-tripped before first check; empty-string payload treated as no stored state, restarting from initial_state.
  • wait_for_callback serdes — enclosing child context uses default extended-type serdes, distinct from WaitForCallbackConfig.serdes.
  • Completion predicate / BatchResultshould_complete, complete_batch/continue_batch, BatchCompletionError (only CUSTOM_COMPLETION_FAILED), throw_if_error typed raises, and fail-fast map/parallel defaults all match.
  • attempt field — required no-default field on StepContext and WaitForConditionCheckContext.
  • Removed namesCallableRuntimeError, WaitDecision, ItemBatcher, WaitStrategyConfig.timeout*, etc. confirmed absent.

No inaccurate statements or broken examples found. No actionable findings.

Residual test risk: the guide's code snippets and rg helpers are not covered by doctests/CI, so future API drift wouldn't be caught automatically — acceptable for a docs-only change. Separately (out of scope, not in this diff): the pre-existing DurableOperationError docstring at packages/aws-durable-execution-sdk-python/src/aws_durable_execution_sdk_python/exceptions.py:268-269 states the escaping error "is preserved as __cause__ on the first run," which contradicts the actual reconstruction behavior the new guide correctly documents.

Reviewed commit 6c1c23fe6206a4982795f437c0e251941292116b. Workflow run

empty string checkpoint payload is currently treated as no stored polling state
on resume, so the operation may restart from `initial_state`.

## New in 2.x: Custom Completion Predicate (Optional)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

New features belong elsewhere, don't they?

| For `map`/`parallel`, a custom `summary_generator` output is now stored under a `"summary"` key in an SDK-owned envelope (it no longer replaces the checkpoint payload). `ChildConfig.summary_generator` is unchanged: its output is still checkpointed verbatim | If you parse `map`/`parallel` summary payloads from execution history, read the `"summary"` key from the envelope. Child-context summary consumers need no change. |
| `WaitDecision` removed; `WaitStrategyConfig.timeout` / `timeout_seconds` removed | Use `WaitForConditionDecision` (`stop_polling()` / `continue_waiting(delay)`). |
| `wait_for_condition` raises `WaitForConditionError` when it exhausts `max_attempts` | Catch `WaitForConditionError` instead of inspecting the returned state. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

empy str payloads? 1.x dropped them when serializing; 2.x preserves them (b448f3e). A workflow that observed None in 1.x can observe "" in 2.x.


## What Changed and What to Do

| Change | What you must do |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

To help w seo and instead of table (formatting on table for longer text can be limiting)... taking example from https://github.com/aws/aws-sdk-js-v3/blob/main/UPGRADING.md or https://docs.python.org/3/whatsnew/3.12.html#porting-to-python-3-12, how about a

## Porting to 2.0
### CallableruntimeErrror removed
<<before>>.
<<after>>
Catch `StepError`, `InvokeError`, `ChildContextError`, or `WaitForConditionError` (or the base `DurableOperationError`) instead of `CallableRuntimeError`. 

### Remove x
<<before>>
<<after>>

this also makes it more feasible to have meaningful little code snippets in triple backticks etc.

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