Skip to content

Using environment variable for dapr sidecar host and using localhost instead of 127.0.0.1 as DAPR default sidecar host#1040

Closed
ondmal wants to merge 3 commits into
dapr:masterfrom
ondmal:master
Closed

Using environment variable for dapr sidecar host and using localhost instead of 127.0.0.1 as DAPR default sidecar host#1040
ondmal wants to merge 3 commits into
dapr:masterfrom
ondmal:master

Conversation

@ondmal

@ondmal ondmal commented Feb 17, 2023

Copy link
Copy Markdown

Description

  • retrieve default value of DAPR sidecar host from DAPR_HOST environment variable
  • use localhost instead of 127.0.0.1 as DAPR sidecar host default value if the environment variable is not specified

Issue reference

This PR will close: #1032

@ondmal
ondmal requested review from a team as code owners February 17, 2023 10:55
@ondmal

ondmal commented Feb 17, 2023

Copy link
Copy Markdown
Author

One thing to consider.

WorkflowServiceCollectionExtensions class uses method TryGetGrpcAddress to validate the default GRPC endpoint and uses empty string if it is not well formed URI.

Maybe we should either validate the endpoint address when constructing the default (in DaprDefaults) or do not validate it at all (in WorkflowServiceCollectionExtensions).

In DaprDefaults we can use "localhost" and default port when the values in the environment variables are invalid to ensure that the default endpoint address will always be valid URI.

@artursouza

artursouza commented Jul 26, 2023

Copy link
Copy Markdown
Contributor

This impacts this PR.

@WhitWaldo

Copy link
Copy Markdown
Contributor

@ondmal Thank you for your contribution!

I'm going to go ahead and close this as I believe it's been superseded by the work in #1124 and recently in #1363, but please don't hesitate to re-open if you think I've closed it inaccurately.

@WhitWaldo WhitWaldo closed this Oct 28, 2024
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.

Use "localhost" instead of "127.0.0.1" for the sidecar host address

3 participants