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
14 changes: 7 additions & 7 deletions examples/configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ To run this example, use the following command:
name: Run get configuration example
match_order: none
expected_stdout_lines:
- "== APP == Got key=orderId1 value=100 version=1 metadata={}"
- "== APP == Got key=orderId2 value=200 version=1 metadata={}"
- "== APP == Subscribe key=orderId2 value=210 version=2 metadata={}"
- "== APP == Unsubscribed successfully? True"
- "Got key=orderId1 value=100 version=1 metadata={}"
- "Got key=orderId2 value=200 version=1 metadata={}"
- "Subscribe key=orderId2 value=210 version=2 metadata={}"
- "Unsubscribed successfully? True"
background: true
timeout_seconds: 30
sleep: 3
Expand All @@ -75,7 +75,7 @@ docker exec dapr_redis redis-cli SET orderId2 "210||2"

You should be able to see the following output:
```
== APP == Got key=orderId1 value=100 version=1
== APP == Got key=orderId2 value=200 version=1
== APP == Subscribe key=orderId2 value=210 version=2
Got key=orderId1 value=100 version=1
Got key=orderId2 value=200 version=1
Subscribe key=orderId2 value=210 version=2
```
8 changes: 4 additions & 4 deletions examples/conversation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ The Conversation API supports real LLM providers including:
<!-- STEP
name: Run Conversation Alpha V1
expected_stdout_lines:
- "== APP == Result: What's Dapr?"
- "== APP == Give a brief overview."
- "Result: What's Dapr?"
- "Give a brief overview."
background: true
timeout_seconds: 60
-->
Expand All @@ -47,8 +47,8 @@ The Conversation API supports real LLM providers including:
<!-- STEP
name: Run Conversation Alpha V2
expected_stdout_lines:
- "== APP == Result: What's Dapr?"
- "== APP == Give a brief overview."
- "Result: What's Dapr?"
- "Give a brief overview."
background: true
timeout_seconds: 60
-->
Expand Down
64 changes: 32 additions & 32 deletions examples/crypto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ openssl rand -out keys/symmetric-key-256 32
<!-- STEP
name: Run crypto example
expected_stdout_lines:
- '== APP == Running gRPC client synchronous API'
- '== APP == Running encrypt/decrypt operation on string'
- '== APP == Encrypted the message, got 856 bytes'
- '== APP == Decrypted the message, got 24 bytes'
- '== APP == The secret is "passw0rd"'
- '== APP == Running encrypt/decrypt operation on file'
- '== APP == Wrote encrypted data to encrypted.out'
- '== APP == Wrote decrypted data to decrypted.out.jpg'
- 'Running gRPC client synchronous API'
- 'Running encrypt/decrypt operation on string'
- 'Encrypted the message, got 856 bytes'
- 'Decrypted the message, got 24 bytes'
- 'The secret is "passw0rd"'
- 'Running encrypt/decrypt operation on file'
- 'Wrote encrypted data to encrypted.out'
- 'Wrote decrypted data to decrypted.out.jpg'
- "Exited App successfully"
output_match_mode: substring
timeout_seconds: 10
Expand All @@ -63,14 +63,14 @@ dapr run --app-id crypto --resources-path ./components/ -- python3 crypto.py
<!-- STEP
name: Run async crypto example
expected_stdout_lines:
- '== APP == Running gRPC client asynchronous API'
- '== APP == Running encrypt/decrypt operation on string'
- '== APP == Encrypted the message, got 856 bytes'
- '== APP == Decrypted the message, got 24 bytes'
- '== APP == The secret is "passw0rd"'
- '== APP == Running encrypt/decrypt operation on file'
- '== APP == Wrote encrypted data to encrypted.out'
- '== APP == Wrote decrypted data to decrypted.out.jpg'
- 'Running gRPC client asynchronous API'
- 'Running encrypt/decrypt operation on string'
- 'Encrypted the message, got 856 bytes'
- 'Decrypted the message, got 24 bytes'
- 'The secret is "passw0rd"'
- 'Running encrypt/decrypt operation on file'
- 'Wrote encrypted data to encrypted.out'
- 'Wrote decrypted data to decrypted.out.jpg'
- "Exited App successfully"
output_match_mode: substring
timeout_seconds: 10
Expand Down Expand Up @@ -102,20 +102,20 @@ rm decrypted.out.jpg
The output should be as follows:

```shell
== APP == Running gRPC client synchronous API
== APP == Running encrypt/decrypt operation on string
== APP == Encrypted the message, got 856 bytes
== APP == Decrypted the message, got 24 bytes
== APP == b'The secret is "passw0rd"'
== APP == Running encrypt/decrypt operation on file
== APP == Wrote encrypted data to encrypted.out
== APP == Wrote decrypted data to decrypted.out.jpg
== APP == Running gRPC client asynchronous API
== APP == Running encrypt/decrypt operation on string
== APP == Encrypted the message, got 856 bytes
== APP == Decrypted the message, got 24 bytes
== APP == b'The secret is "passw0rd"'
== APP == Running encrypt/decrypt operation on file
== APP == Wrote encrypted data to encrypted.out
== APP == Wrote decrypted data to decrypted.out.jpg
Running gRPC client synchronous API
Running encrypt/decrypt operation on string
Encrypted the message, got 856 bytes
Decrypted the message, got 24 bytes
b'The secret is "passw0rd"'
Running encrypt/decrypt operation on file
Wrote encrypted data to encrypted.out
Wrote decrypted data to decrypted.out.jpg
Running gRPC client asynchronous API
Running encrypt/decrypt operation on string
Encrypted the message, got 856 bytes
Decrypted the message, got 24 bytes
b'The secret is "passw0rd"'
Running encrypt/decrypt operation on file
Wrote encrypted data to encrypted.out
Wrote decrypted data to decrypted.out.jpg
```
110 changes: 55 additions & 55 deletions examples/demo_actor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ name: Actor Service
background: true
sleep: 5
expected_stdout_lines:
- '== APP == Activate DemoActor actor!'
- '== APP == has_value: False'
- '== APP == has_value: False'
- "== APP == set_my_data: {'data': 'new_data'}"
- '== APP == has_value: True'
- '== APP == set reminder to True'
- '== APP == set reminder is done'
- '== APP == set_timer to True'
- '== APP == set_timer is done'
- "== APP == receive_reminder is called - demo_reminder reminder - b'reminder_state'"
- "== APP == clear_my_data"
- 'Activate DemoActor actor!'
- 'has_value: False'
- 'has_value: False'
- "set_my_data: {'data': 'new_data'}"
- 'has_value: True'
- 'set reminder to True'
- 'set reminder is done'
- 'set_timer to True'
- 'set_timer is done'
- "receive_reminder is called - demo_reminder reminder - b'reminder_state'"
- "clear_my_data"
timeout_seconds: 60
-->

Expand All @@ -53,23 +53,23 @@ timeout_seconds: 60
Expected output:
```
...
== APP == Activate DemoActor actor!
== APP == has_value: False
== APP == INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/GetMyData HTTP/1.1" 200 OK
== APP == has_value: False
== APP == INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/GetMyData HTTP/1.1" 200 OK
== APP == set_my_data: {'data': 'new_data'}
== APP == INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/SetMyData HTTP/1.1" 200 OK
== APP == has_value: True
== APP == INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/GetMyData HTTP/1.1" 200 OK
== APP == set reminder to True
== APP == set reminder is done
== APP == INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/SetReminder HTTP/1.1" 200 OK
== APP == set_timer to True
== APP == set_timer is done
== APP == INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/SetTimer HTTP/1.1" 200 OK
== APP == receive_reminder is called - demo_reminder reminder - b'reminder_state'
== APP == clear_my_data
Activate DemoActor actor!
has_value: False
INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/GetMyData HTTP/1.1" 200 OK
has_value: False
INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/GetMyData HTTP/1.1" 200 OK
set_my_data: {'data': 'new_data'}
INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/SetMyData HTTP/1.1" 200 OK
has_value: True
INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/GetMyData HTTP/1.1" 200 OK
set reminder to True
set reminder is done
INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/SetReminder HTTP/1.1" 200 OK
set_timer to True
set_timer is done
INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/SetTimer HTTP/1.1" 200 OK
receive_reminder is called - demo_reminder reminder - b'reminder_state'
clear_my_data
...
```

Expand All @@ -78,19 +78,19 @@ timeout_seconds: 60
<!-- STEP
name: Actor Client
expected_stdout_lines:
- '== APP == call actor method via proxy.invoke_method()'
- "== APP == b'null'"
- '== APP == call actor method using rpc style'
- '== APP == None'
- "== APP == Actor reentrancy enabled: b'true'"
- '== APP == call SetMyData actor method to save the state'
- '== APP == call GetMyData actor method to get the state'
- '== APP == Register reminder'
- '== APP == Register timer'
- '== APP == waiting for 30 seconds'
- '== APP == stop reminder'
- '== APP == stop timer'
- '== APP == clear actor state'
- 'call actor method via proxy.invoke_method()'
- "b'null'"
- 'call actor method using rpc style'
- 'None'
- "Actor reentrancy enabled: b'true'"
- 'call SetMyData actor method to save the state'
- 'call GetMyData actor method to get the state'
- 'Register reminder'
- 'Register timer'
- 'waiting for 30 seconds'
- 'stop reminder'
- 'stop timer'
- 'clear actor state'
-->

2. Run Demo client in new terminal window
Expand All @@ -105,20 +105,20 @@ expected_stdout_lines:
Expected output:
```
...
== APP == call actor method via proxy.invoke_method()
== APP == b'null'
== APP == call actor method using rpc style
== APP == None
== APP == Actor reentrancy enabled: True
== APP == call SetMyData actor method to save the state
== APP == call GetMyData actor method to get the state
== APP == {'data': 'new_data', 'ts': datetime.datetime(2020, 11, 13, 0, 38, 36, 163000, tzinfo=tzutc())}
== APP == Register reminder
== APP == Register timer
== APP == waiting for 30 seconds
== APP == stop reminder
== APP == stop timer
== APP == clear actor state
call actor method via proxy.invoke_method()
b'null'
call actor method using rpc style
None
Actor reentrancy enabled: True
call SetMyData actor method to save the state
call GetMyData actor method to get the state
{'data': 'new_data', 'ts': datetime.datetime(2020, 11, 13, 0, 38, 36, 163000, tzinfo=tzutc())}
Register reminder
Register timer
waiting for 30 seconds
stop reminder
stop timer
clear actor state
```

<!-- END_STEP -->
Expand Down
86 changes: 43 additions & 43 deletions examples/demo_workflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@ pip3 install -r demo_workflow/requirements.txt
<!-- STEP
name: Running this example
expected_stdout_lines:
- "== APP == Hi Counter!"
- "== APP == New counter value is: 1!"
- "== APP == New counter value is: 11!"
- "== APP == Retry count value is: 0!"
- "== APP == Retry count value is: 1! This print statement verifies retry"
- "== APP == Appending 1 to child_orchestrator_string!"
- "== APP == Appending a to child_orchestrator_string!"
- "== APP == Appending a to child_orchestrator_string!"
- "== APP == Appending 2 to child_orchestrator_string!"
- "== APP == Appending b to child_orchestrator_string!"
- "== APP == Appending b to child_orchestrator_string!"
- "== APP == Appending 3 to child_orchestrator_string!"
- "== APP == Appending c to child_orchestrator_string!"
- "== APP == Appending c to child_orchestrator_string!"
- "== APP == Get response from hello_world_wf after pause call: Suspended"
- "== APP == Get response from hello_world_wf after resume call: Running"
- "== APP == New counter value is: 111!"
- "== APP == New counter value is: 1111!"
- "== APP == Instance Successfully Purged"
- "== APP == Get response from hello_world_wf after terminate call: Terminated"
- "== APP == Get response from child_wf after terminate call: Terminated"
- "== APP == Instance Successfully Purged"
- "Hi Counter!"
- "New counter value is: 1!"
- "New counter value is: 11!"
- "Retry count value is: 0!"
- "Retry count value is: 1! This print statement verifies retry"
- "Appending 1 to child_orchestrator_string!"
- "Appending a to child_orchestrator_string!"
- "Appending a to child_orchestrator_string!"
- "Appending 2 to child_orchestrator_string!"
- "Appending b to child_orchestrator_string!"
- "Appending b to child_orchestrator_string!"
- "Appending 3 to child_orchestrator_string!"
- "Appending c to child_orchestrator_string!"
- "Appending c to child_orchestrator_string!"
- "Get response from hello_world_wf after pause call: Suspended"
- "Get response from hello_world_wf after resume call: Running"
- "New counter value is: 111!"
- "New counter value is: 1111!"
- "Instance Successfully Purged"
- "Get response from hello_world_wf after terminate call: Terminated"
- "Get response from child_wf after terminate call: Terminated"
- "Instance Successfully Purged"
background: true
timeout_seconds: 50
sleep: 15
Expand All @@ -60,25 +60,25 @@ dapr run --app-id orderapp --app-protocol grpc --dapr-grpc-port 50001 --resource

You should be able to see the following output:
```
== APP == Hi Counter!
== APP == New counter value is: 1!
== APP == New counter value is: 11!
== APP == Retry count value is: 0!
== APP == Retry count value is: 1! This print statement verifies retry
== APP == Appending 1 to child_orchestrator_string!
== APP == Appending a to child_orchestrator_string!
== APP == Appending a to child_orchestrator_string!
== APP == Appending 2 to child_orchestrator_string!
== APP == Appending b to child_orchestrator_string!
== APP == Appending b to child_orchestrator_string!
== APP == Appending 3 to child_orchestrator_string!
== APP == Appending c to child_orchestrator_string!
== APP == Appending c to child_orchestrator_string!
== APP == Get response from hello_world_wf after pause call: Suspended
== APP == Get response from hello_world_wf after resume call: Running
== APP == New counter value is: 111!
== APP == New counter value is: 1111!
== APP == Get response from hello_world_wf after terminate call: Terminated
== APP == Get response from child_wf after terminate call: Terminated
== APP == Instance Successfully Purged
Hi Counter!
New counter value is: 1!
New counter value is: 11!
Retry count value is: 0!
Retry count value is: 1! This print statement verifies retry
Appending 1 to child_orchestrator_string!
Appending a to child_orchestrator_string!
Appending a to child_orchestrator_string!
Appending 2 to child_orchestrator_string!
Appending b to child_orchestrator_string!
Appending b to child_orchestrator_string!
Appending 3 to child_orchestrator_string!
Appending c to child_orchestrator_string!
Appending c to child_orchestrator_string!
Get response from hello_world_wf after pause call: Suspended
Get response from hello_world_wf after resume call: Running
New counter value is: 111!
New counter value is: 1111!
Get response from hello_world_wf after terminate call: Terminated
Get response from child_wf after terminate call: Terminated
Instance Successfully Purged
```
Loading
Loading