Error in configuration example when run from a clean devcontainer
Expected Behavior
Followed steps here: https://github.com/dapr/python-sdk#developing
Except that after step 1 I used code . to open the checkout in VSCode and then when prompted, opened in a devcontainer before proceeding to step 2.
When I ran step 7, tox -e examples, I expected a clean example to pass as did all the prior steps.
Actual Behavior
Instead I see the following error:
examples run-test: commands[0] | ./validate.sh configuration
Home: /root
Running shell 'bash -c' with command: `docker exec dapr_redis redis-cli SET orderId "100||1"
docker exec dapr_redis redis-cli SET orderId1 "200||2"`
Running shell 'bash -c' with command: `dapr run --app-id configexample --components-path components/ -- python3 configuration.py`
Running shell 'bash -c' with command: `docker exec dapr_redis redis-cli SET orderId "200||2"`
Step: Set configuration value
command: `docker exec dapr_redis redis-cli SET orderId "100||1"
docker exec dapr_redis redis-cli SET orderId1 "200||2"`
return_code: 0
duration_seconds: 0.311
Expected stdout (output_match_mode: exact):
OK
Actual stdout:
OK
OK
Expected stderr (output_match_mode: exact):
Actual stderr:
Step: Run get configuration example
command: `dapr run --app-id configexample --components-path components/ -- python3 configuration.py`
return_code: 1
duration_seconds: 0.0344
command: `docker exec dapr_redis redis-cli SET orderId "200||2"`
return_code: 0
duration_seconds: 0.145
Expected stdout (output_match_mode: exact):
== APP == Got key=orderId value=100 version=1 metadata={}
== APP == Got key=orderId1 value=200 version=2 metadata={}
== APP == Subscribe key=orderId value=200 version=2 metadata={}
== APP == Unsubscribed successfully? True
== APP == configurationstore configuration watcher for keys ['orderId', 'orderId1'] stopped.
Actual stdout:
ℹ️ Starting Dapr with id configexample. HTTP Port: 42685. gRPC Port: 38487
OK
ERROR expected lines not found:
== APP == Got key=orderId value=100 version=1 metadata={}
== APP == Got key=orderId1 value=200 version=2 metadata={}
== APP == Subscribe key=orderId value=200 version=2 metadata={}
== APP == Unsubscribed successfully? True
== APP == configurationstore configuration watcher for keys ['orderId', 'orderId1'] stopped.
Expected stderr (output_match_mode: exact):
Actual stderr:
❌ fork/exec /root/.dapr/bin/daprd: no such file or directory
External link validation:
https://docs.dapr.io/getting-started Status: 200
https://www.python.org/downloads/ Status: 200
ERROR: InvocationError for command /workspaces/dapr-python-sdk/examples/validate.sh configuration (exited with code 1)
____________________________________________________________ summary _____________________________________________________________
ERROR: examples: commands failed
Steps to Reproduce the Problem
Followed steps here for developing: https://github.com/dapr/python-sdk#developing
Except that after step 1 use code . to open the checkout in VSCode. When prompted, opened in a devcontainer before proceeding to step 2.
Release Note
RELEASE NOTE: FIX Error in configuration example when run from a clean devcontainer.
@bbrandt working as intended.
You first need to run dapr init, then try again. We intentionally don't ship Dapr installed (just the CLI itself) so that we don't provide outdated Dapr versions.