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

[env variable] Pluggable component env variables #3554

Merged
merged 9 commits into from
Jun 21, 2023

Conversation

hhunter-ms
Copy link
Collaborator

Description

Add env variables for the pluggable component
Need to confirm what others to add - @philliphoff @tmacam

Issue reference

PR will close: #3239

Signed-off-by: Hannah Hunter <[email protected]>
@hhunter-ms hhunter-ms requested review from a team as code owners June 15, 2023 20:26
@hhunter-ms hhunter-ms self-assigned this Jun 15, 2023
@msfussell
Copy link
Member

I said there were other env var. Need to determine if there are any!

@hhunter-ms
Copy link
Collaborator Author

I said there were other env var. Need to determine if there are any!

checking on this!

| OTEL_EXPORTER_OTLP_PROTOCOL | OpenTelemetry Tracing | The OTLP protocol to use Transport protocol. (`grpc`, `http/protobuf`, `http/json`) |
| DAPR_COMPONENTS_SOCKET_FOLDER | Pluggable component | The location for the `.sock` file for the shared directory location socket |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DAPR_COMPONENTS_SOCKET_FOLDER is apparently an older environment variable that's been replaced by DAPR_COMPONENTS_SOCKETS_FOLDER.

This new environment variable is used by the Dapr runtime as well as the .NET, Go, & Java pluggable components SDKs.

The .NET and Java SDKs also support DAPR_COMPONENTS_SOCKETS_EXTENSION environment variable, which indicates the default file extension applied to socket files created by the SDKs. This value defaults to .sock for .NET and sock for Java.

Copy link
Contributor

@tmacam tmacam Jun 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .NET and Java SDKs also support DAPR_COMPONENTS_SOCKETS_EXTENSION environment variable,

I don't know if would make sense to add those to the main Dapr docs. I guess mentioning them with the caveat it is a per-SDK configuration and not a Dapr enforced behaviour.

Aside this, I don't really recall any other env. var. besides DAPR_COMPONENTS_SOCKETS_FOLDER (notice the socketS vs socket diff).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could be a bit more verbose on this explanation, as in:

Suggested change
| DAPR_COMPONENTS_SOCKET_FOLDER | Pluggable component | The location for the `.sock` file for the shared directory location socket |
| DAPR_COMPONENTS_SOCKET_FOLDER | Pluggable component | The location or path where Dapr will look for Pluggable Components Unix Domain Socket files. If unset this location defaults to `/tmp/dapr-components-sockets` |

Notice that we don't mention the .sock extension: the code in dapr/dapr doesn't really care about it, it tests all files that that location for their kind (socket or regular), regardless of their extension. Even for SDKs, adding those extensions to the UDS they create is more decorative than functional.

The proposed text neither puts a limit to the number of such files that might exist (vs singular "the sock file")

@hhunter-ms
Copy link
Collaborator Author

@philliphoff @tmacam thanks for your review!

Copy link
Member

@msfussell msfussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hhunter-ms hhunter-ms merged commit 92dec80 into dapr:v1.11 Jun 21, 2023
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.

The Env Variables are missing for Pluggable Components
4 participants