Skip to content

fix: remove timeout from Invoke Config#340

Merged
ayushiahjolia merged 3 commits into
aws:mainfrom
AdityaAudi:fix/remove-invoke-config-timeout
Jul 14, 2026
Merged

fix: remove timeout from Invoke Config#340
ayushiahjolia merged 3 commits into
aws:mainfrom
AdityaAudi:fix/remove-invoke-config-timeout

Conversation

@AdityaAudi

Copy link
Copy Markdown
Contributor

Breaking change: Customers passing timeout= to InvokeConfig will receive a TypeError on upgrade. Targeting v2!

Summary

Removes the unused timeout field from InvokeConfig as described in #321

The field was passed to suspend_with_optional_resume_delay as a polling retry delay, but this has no meaningful effect, invoke completion is pushed by the backend, not polled. The field was misleadingly named and did not enforce any actual timeout on the invocation.

Changes

  • config.py - removed timeout: Duration field and timeout_seconds property from InvokeConfig
  • operation/invoke.py - suspend_with_optional_resume_delay called without delay (indefinite suspend)
  • tests/ - removed Duration import, removed/updated all timeout-specific invoke tests
  • docs/architecture.md - removed timeout_seconds from InvokeConfig class diagram
  • docs/core/invoke.md - removed all timeout references (terminology, config, error handling, best practices, FAQ, testing)

Test plan

  • All existing tests pass (hatch test -- -p no:randomly)
  • Removed timeout-specific tests that no longer apply
  • Updated tests that used timeout= incidentally now use default InvokeConfig()

@yaythomas yaythomas moved this from Backlog to Ready in aws-durable-execution Apr 7, 2026
@yaythomas yaythomas added this to the v2 milestone Apr 7, 2026
@yaythomas

Copy link
Copy Markdown
Contributor

thank you very much @AdityaAudi!

I've flagged this for v2 with milestone.

@AdityaAudi AdityaAudi changed the title fix: remove timeout from Invoke Config (v2 breaking change!) fix: remove timeout from Invoke Config Apr 7, 2026
@SilanHe SilanHe moved this from Ready to Backlog in aws-durable-execution Apr 21, 2026
@zhongkechen

zhongkechen commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

No longer mergeable due to merge conflicts.

@AdityaAudi

AdityaAudi commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

No longer mergeable due to merge conflicts.

@zhongkechen I took a look and I've resolved the conflicts

@ayushiahjolia ayushiahjolia self-requested a review July 13, 2026 18:53
@ayushiahjolia

Copy link
Copy Markdown
Contributor

Thanks @AdityaAudi, change looks good.
We've now created the v2 branch for breaking changes like this one. Could you please retarget this PR to v2 and rebase your branch onto it? Since v2 was just cut from main you shouldn't hit conflicts.

@ayushiahjolia ayushiahjolia removed this from the v2 milestone Jul 13, 2026
zhongkechen
zhongkechen previously approved these changes Jul 13, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to Pending merge in aws-durable-execution Jul 13, 2026
@ayushiahjolia ayushiahjolia added this to the v2 milestone Jul 13, 2026
@ayushiahjolia ayushiahjolia dismissed zhongkechen’s stale review July 13, 2026 20:07

We are adding breaking changes in v2 branch.

@zhongkechen

Copy link
Copy Markdown
Contributor

We are adding breaking changes in v2 branch.

Isn't main supposed to track the branch for latest version? We can edit this PR to target v2 branch if main isn't v2

@ayushiahjolia

ayushiahjolia commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

After internal discussions, we decided to keep breaking changes in main and separate v1.x branch for SDK 1.x version.
@AdityaAudi can you fix merge conflicts if any? I'll merge your PR soon.

@AdityaAudi AdityaAudi force-pushed the fix/remove-invoke-config-timeout branch from 13e5c3f to efcbca0 Compare July 13, 2026 22:32
@AdityaAudi

Copy link
Copy Markdown
Contributor Author

After internal discussions, we decided to keep breaking changes in main and separate v1.x branch for SDK 1.x version.
@AdityaAudi can you fix merge conflicts if any? I'll merge your PR soon.

Thanks @ayushiahjolia! I've rebased onto the current main (272c1f4), resolved the conflicts (docs/ was removed upstream, and two timeout tests were added on main that are no longer applicable after this change). I pushed a single clean commit now at efcbca0. I've locally tested and all the 1379 SDK tests pass locally. This should be ready to merge whenever you are.

zhongkechen
zhongkechen previously approved these changes Jul 13, 2026
@zhongkechen zhongkechen self-requested a review July 13, 2026 22:39
ayushiahjolia
ayushiahjolia previously approved these changes Jul 13, 2026

When no immediate response, operation should suspend with timeout.
"""
def test_invoke_immediate_response_no_immediate_response():

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch, thanks @ayushiahjolia, CI flagged the same thing (F811). The duplicates came from the original PR commit copy-pasting a subset of the immediate-response tests, which later collided with the same-named tests that landed on main. Python was silently overwriting the earlier definitions, so only the shorter duplicates were actually running.

I've pushed a follow-up commit that drops the PR-added copies, so the more thorough versions on main (lines 817 and 936) now execute as intended. Lint is clean locally and all 42 tests in invoke_test.py still pass. Let me know if you'd like me to squash before merge.

config = InvokeConfig[str, str]()

with pytest.raises(TimedSuspendExecution):
with pytest.raises(SuspendExecution):

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.

pytest.raises(SuspendExecution) does not prove the change.

TimedSuspendExecution is a subclass of SuspendExecution (exceptions.py:330), so this assertion would still pass if we regressed to raising TimedSuspendExecution.

suggestion:

with pytest.raises(SuspendExecution) as exc_info:
    invoke_handler(...)
assert type(exc_info.value) is SuspendExecution  # exact class, not subclass

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.

this is a nit :-) not blocking

Address review feedback: pytest.raises(SuspendExecution) alone would
still pass if we regressed to TimedSuspendExecution, since it is a
subclass. Assert the exact class instead.
@ayushiahjolia ayushiahjolia merged commit a982db2 into aws:main Jul 14, 2026
16 of 22 checks passed
@github-project-automation github-project-automation Bot moved this from Pending merge to Done in aws-durable-execution Jul 14, 2026
@yaythomas

Copy link
Copy Markdown
Contributor

thank you so much for your patience and for your contribution @AdityaAudi, this one had to wait a while for the major version increment :-)

your change is the very 1st v2 change merged into the trunk 🥳

@AdityaAudi

Copy link
Copy Markdown
Contributor Author

Thank you @yaythomas! Really appreciate the thoughtful reviews from you and @ayushiahjolia throughout, glad we got this one landed. Honored to have it be the first v2 change into trunk 🎉 Looking forward to contributing more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants