refactor(config): remove unused config types#579
Conversation
822fbbc to
38e66c3
Compare
yaythomas
left a comment
There was a problem hiding this comment.
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.)
|
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 :-) |
38e66c3 to
9d7804f
Compare
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
ItemBatcher,ItemsPerBatchUnit,BatchedInputandMapConfig.item_batcher; simplify the map callable toCallable[[DurableContext, U, int, Sequence[U]], T], matching JSMapFunc.TerminationMode(no SDK has an equivalent).StepFuture(mirrors JSDurablePromise; never adopted by the synchronous Python model).ChildConfig.item_serdesand its stale backward-compat docstring.MapConfig.item_serdes/ParallelConfig.item_serdesare unaffected (still read by the concurrency executor).WaitStrategyConfig.timeoutand itstimeout_secondsproperty.create_wait_strategynever 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
ChainedInvokeFailedToStartType,ChainedInvokeTimeoutTypeandChainedInvokeStopTypefromlambda_service.py. The invoke executor already classifies terminal failures by checkpoint status and carries the error type through from the backendErrorObject.Test cleanup
suspend_with_optional_resume_delayhelper tests: drop the four duplicates frominvoke_test.pyand cover none/negative/zero/positive in one parametrized test insuspend_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.