Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Invocation id/cancel invocation from Context #27

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

slinkydeveloper
Copy link
Collaborator

// InvocationHandle, there are three ways of getting it:
// 1. From invocation id
let handle = ctx.invocation_handle("inv_1......".to_string());

// 2. From just executed send
let handle = ctx.service_client::<GreeterClient>()
  .greet("Francesco".to_string())
  .send();

// 3. From just executed call (the returned struct from call is both an handle, and the future to await response)
let handle = ctx.service_client::<GreeterClient>()
  .greet("Francesco".to_string())
  .call();

// You can cancel the invocation
handle.cancel();
// You can get the invocation id
let invocation_id = handle.invocation_id().await?;

Copy link

github-actions bot commented Sep 18, 2024

Test Results

  5 files  ± 0  5 suites  ±0   5m 26s ⏱️ + 2m 52s
 38 tests  -  7  0 ✅  -  45  0 💤 ±0  0 ❌ ±0   38 🔥 + 38 
103 runs   - 11  0 ✅  - 114  0 💤 ±0  0 ❌ ±0  103 🔥 +103 

For more details on these errors, see this check.

Results for commit cb77adc. ± Comparison against base commit e430fec.

This pull request removes 10 and adds 3 tests. Note that renamed tests count towards both.
dev.restate.sdktesting.tests.CallOrdering ‑ ordering(boolean[], Client)[1]
dev.restate.sdktesting.tests.CallOrdering ‑ ordering(boolean[], Client)[2]
dev.restate.sdktesting.tests.CallOrdering ‑ ordering(boolean[], Client)[3]
dev.restate.sdktesting.tests.CancelInvocation ‑ cancelInvocation(BlockingOperation, Client, URL)[1]
dev.restate.sdktesting.tests.CancelInvocation ‑ cancelInvocation(BlockingOperation, Client, URL)[2]
dev.restate.sdktesting.tests.CancelInvocation ‑ cancelInvocation(BlockingOperation, Client, URL)[3]
dev.restate.sdktesting.tests.NonDeterminismErrors ‑ method(String, Client)[1]
dev.restate.sdktesting.tests.NonDeterminismErrors ‑ method(String, Client)[2]
dev.restate.sdktesting.tests.NonDeterminismErrors ‑ method(String, Client)[3]
dev.restate.sdktesting.tests.NonDeterminismErrors ‑ method(String, Client)[4]
dev.restate.sdktesting.tests.CallOrdering ‑ ordering(boolean[], Client)
dev.restate.sdktesting.tests.CancelInvocation ‑ cancelInvocation(BlockingOperation, Client, URL)
dev.restate.sdktesting.tests.NonDeterminismErrors ‑ method(String, Client)

♻️ This comment has been updated with latest results.

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.

1 participant