Open cicoyle opened 1 year ago
May I suggest to use testcontainers to launch the containers? It would require less instructions to follow in order to run the examples.
That is an interesting discussion. Maybe have it as a separate issue since there is the side of hiding "too much" from the user.
+1 for this issue. It's not a great DevEx when following the readme and it doesn't work.
Just tried to run the basic state example (which doesn't depend on Mongo), but dapr is blowing up because it's expecting a mongo
component to be installed.
Had to manually remove the mongo component from the components folder.
Expected Behavior
I would expect to be able to follow line by line commands from the README and have a working example.
As of now, there are a few examples that are missing a
mongo-statestore
orredis-statestore
yaml.I believe a
docker-compose
command should be added as a step in the respective READMEs for users to be able to go thru the examples without any issues. Similar to how the Kafka example here has adocker-compose.yml
file to create a local kafka instance with the relevant steps mentioned in the README -- the same thing should be added for the examples listed above.Actual Behavior
For the
querystate
example in the repo here, it looks to be querying the saved state from amongo-statestore
, but never actually includes any information to a user on how to create themongo-statestore
. As a result, the example is unable to run and errs:Key err from above is:
This same thing occurs for the all examples.
Steps to Reproduce the Problem
Follow the README instructions here for the query state example
Follow the README instructions here for the state example
Follow the README instructions here for the tracing example
Solution
copy over the
local-test-mongo.yml
from the sdk-tests/ to both relevant example directories and do the same for the redis example. Or, copy over the yaml from this directory to the local example directory and use that as the mongo/redis configuration. Reference it like the Kafka example and add the command to the README instructions. Something like:docker-compose -f ../sdk-tests/deploy/local-test-mongo.yml up -d
with the relevant cleanup command too:docker-compose -f ../sdk-tests/deploy/local-test-mongo.yml down