Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
# checkpoints may outgrow Restate into (RESTATE_SQL_OBJECT_STORE: S3, GCS, Azure, or a
# directory); `tunnel` is Restate Cloud's. `aws_lc_rs` is the crypto of all of them (the
# tunnel's TLS, request identity's signatures), as the object stores' must be aws-lc.
restate-sdk-shared-core = { version = "8.7.0", features = [
# 8.7.1: a cancellation resumes an invocation shut down while it waits for a call (sdk-shared-core#120).
restate-sdk-shared-core = { version = "8.7.1", features = [
"request_identity",
"sha2_random_seed",
"aws_lc_rs",
Expand Down
8 changes: 0 additions & 8 deletions tests/agents_suspended_stop_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ def anyio_backend():

pytestmark = [pytest.mark.anyio]

NEEDS_SHARED_CORE = pytest.mark.xfail(
strict=True,
reason="shared-core 8.7.0 suspends a shut down attempt on its calls alone, so a cancellation does not resume it; "
"fixed on shared-core's branch claude/cancel-wakes-a-shut-down-attempt, not released yet",
)
"""Remove with the shared-core release that has the fix: these then pass, and a strict xfail that passes fails."""


class Refund(pydantic.BaseModel):
order: str
Expand Down Expand Up @@ -81,7 +74,6 @@ async def harness():
yield harness


@NEEDS_SHARED_CORE
async def test_stop_ends_a_turn_that_restate_shut_down_while_it_waited_for_an_approval(harness: HarnessEnvironment):
key = str(uuid.uuid4())
seen: list[str] = []
Expand Down
10 changes: 0 additions & 10 deletions tests/sessions_suspended_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ def anyio_backend():

pytestmark = [pytest.mark.anyio]

NEEDS_SHARED_CORE = pytest.mark.xfail(
strict=True,
reason="shared-core 8.7.0 suspends a shut down attempt on its calls alone, so a cancellation does not resume it; "
"fixed on shared-core's branch claude/cancel-wakes-a-shut-down-attempt, not released yet",
)
"""Remove with the shared-core release that has the fix: these then pass, and a strict xfail that passes fails."""

sleeper = restate.Service("sleeper")


Expand Down Expand Up @@ -129,23 +122,20 @@ async def cancelled_while_suspended(harness: HarnessEnvironment, handler: Any) -
return code, seen


@NEEDS_SHARED_CORE
async def test_a_cancellation_reaches_an_invocation_that_was_shut_down_while_it_waited_for_a_call(
harness: HarnessEnvironment,
):
code, seen = await cancelled_while_suspended(harness, waits)
assert code == 409, f"the cancelled invocation did not end in 10 s: {seen}"


@NEEDS_SHARED_CORE
async def test_a_handler_that_watches_for_its_cancellation_learns_of_it_after_it_was_shut_down(
harness: HarnessEnvironment,
):
code, seen = await cancelled_while_suspended(harness, waits_and_watches)
assert code == 200, f"the cancelled invocation did not end in 10 s: {seen}"


@NEEDS_SHARED_CORE
async def test_a_cancelled_invocation_that_goes_on_waiting_is_not_resumed_over_and_over(harness: HarnessEnvironment):
# Waiting on a cancellation that Restate has stored resumes the invocation at once. The attempt that follows
# the cancellation knows of it, and waits for its call alone.
Expand Down
Loading