Skip to content

refactor(config): remove unused config types#579

Merged
yaythomas merged 1 commit into
mainfrom
remove-unused-config-types
Jul 24, 2026
Merged

refactor(config): remove unused config types#579
yaythomas merged 1 commit into
mainfrom
remove-unused-config-types

Conversation

@ayushiahjolia

@ayushiahjolia ayushiahjolia commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Issue #, if available:
#532

Description of changes:
Removes dead public surface from the SDK: config types that accept input but are never read, and error-type enums that were never wired into any path. All are non-functional today, so removal only changes the importable
public surface (none are exported from __init__.py). Targets v2.

Unused config types

  • Remove ItemBatcher, ItemsPerBatchUnit, BatchedInput and MapConfig.item_batcher; simplify the map callable to Callable[[DurableContext, U, int, Sequence[U]], T], matching JS MapFunc.
  • Remove TerminationMode (no SDK has an equivalent).
  • Remove StepFuture (mirrors JS DurablePromise; never adopted by the synchronous Python model).
  • Remove ChildConfig.item_serdes and its stale backward-compat docstring. MapConfig.item_serdes / ParallelConfig.item_serdes are unaffected (still read by the concurrency executor).
  • Remove WaitStrategyConfig.timeout and its timeout_seconds property. create_wait_strategy never reads it; the strategy is client-side with no backend enforcement, and neither the Java nor JS SDK has a working equivalent.

Dead error-type enums

  • Remove ChainedInvokeFailedToStartType, ChainedInvokeTimeoutType and ChainedInvokeStopType from lambda_service.py. The invoke executor already classifies terminal failures by checkpoint status and carries the error type through from the backend ErrorObject.

Test cleanup

  • Consolidate the suspend_with_optional_resume_delay helper tests: drop the four duplicates from invoke_test.py and cover none/negative/zero/positive in one parametrized test in suspend_test.py.

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 remove-unused-config-types branch from 822fbbc to 38e66c3 Compare July 23, 2026 21:57
@ayushiahjolia
ayushiahjolia marked this pull request as ready for review July 23, 2026 22:23

@yaythomas yaythomas left a comment

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.

nit: config.py:423 (InvokeConfig) — while we're removing dead config surface, the commented-out # retry_strategy: ... line above the fields could go too (pre-existing, optional). (Posting here because the line isn't in the diff.)

@yaythomas

yaythomas commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Verified every removed symbol has zero residual references across all five packages, the examples, and the docs repo, and that MapConfig.item_serdes/ParallelConfig.item_serdes remain live in the concurrency executor. 1421 tests, typecheck, and fmt all clean locally. The ChainedInvoke*Type removal beyond the #532 list is also correct — nothing consumes them and the invoke executor classifies terminal failures from the checkpoint status, with the error type carried through from the backend error object.

Nice catch tightening the zero-delay suspend assertion to TimedSuspendExecution — the deleted duplicate in invoke_test.py asserted the broader SuspendExecution, which only passed via subclassing. The parametrized version now pins the actual behavior (from_delay(msg, 0)).

Thank you very much :-)

Pretty much ready to approve, just those 2 nits if possible :-)

@ayushiahjolia
ayushiahjolia force-pushed the remove-unused-config-types branch from 38e66c3 to 9d7804f Compare July 24, 2026 03:30
@ayushiahjolia
ayushiahjolia requested a review from yaythomas July 24, 2026 03:33
@yaythomas
yaythomas merged commit 6a89b70 into main Jul 24, 2026
19 of 22 checks passed
@yaythomas
yaythomas deleted the remove-unused-config-types branch July 24, 2026 05:27
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