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

Use DAPR_REDIS_HOST for scaffolding instead of DAPR_NETWORK #84

Closed
philliphoff opened this issue Apr 1, 2020 · 3 comments · Fixed by #96
Closed

Use DAPR_REDIS_HOST for scaffolding instead of DAPR_NETWORK #84

philliphoff opened this issue Apr 1, 2020 · 3 comments · Fixed by #96
Assignees
Labels
bug Something isn't working P2 Moderate priority
Milestone

Comments

@philliphoff
Copy link
Collaborator

Currently the Dapr tasks scaffolder uses the environment variable DAPR_NETWORK to determine whether scaffold the Redis-related Dapr components file addresses using localhost (not present) or redis (present). However, the latter may not match the actual Redis host name in that network (e.g. the Dev Container template uses dapr_redis). Instead, the scaffolder should use DAPR_REDIS_HOST which is generally expected to be set when using a custom network.

@philliphoff philliphoff added bug Something isn't working P2 Moderate priority labels Apr 1, 2020
@philliphoff philliphoff added this to the 0.3.0 milestone Apr 1, 2020
@philliphoff philliphoff self-assigned this May 7, 2020
@ElanHasson
Copy link

ElanHasson commented May 25, 2020

Hi @philliphoff,

I'm seeing an issue where the scaffolding is producing a redis container named dapr_redis_dapr-dev-container.

my docker-compose.yml looks like this:


      DAPR_NETWORK: dapr-dev-container
      DAPR_REDIS_HOST: dapr_redis
      DAPR_PLACEMENT_HOST: dapr_placement

My component ymls which were generated all use a redis host of redis, which fails because the container name is different.

I think this may be related to either the bug this fixed or a new bug that this introduced.

$ dapr --version
CLI version: 0.7.0 
Runtime version: 0.7.1

Dapr extensions 0.2.1.

Thanks.

@philliphoff
Copy link
Collaborator Author

@ElanHasson Yes, that's likely due to this bug (still present in 0.2.1 but fixed for a future 0.3.0. At some point I'd like to get our extension out of the business of scaffolding those files altogether; recent updates to the Dapr CLI should allow that.

@ElanHasson
Copy link

Cool thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 Moderate priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants