man-group / dapr-sidekick-dotnet

Dapr Sidekick for .NET - a lightweight lifetime management component for Dapr
Apache License 2.0
177 stars 21 forks source link

Empty "SentryAddress" property passes empty "--sentry-address" to daprd #10

Closed badgeratu closed 3 years ago

badgeratu commented 3 years ago

Expected Behavior

Starting Dapr Sidecar with an empty SentryAddress in appsettings.json should not pass an empty string to the daprd command line.

Actual Behavior

With the following entry in appsettings.json:

  "Dapr": {
    "Sidecar": {
      "mTLS": false,
      "SentryAddress": "",
    }
  }  

This should not pass the --sentry-address parameter to the daprd command-line, however it passes the parameter with an empty value:

[08:22:37 INF] Starting Process C:\Users\scjones\.dapr\bin\daprd.exe with arguments '--app-id controllersample --app-port 5000 --dapr-grpc-port 50001 --dapr-http-port 3500 --log-as-json --log-level debug --metrics-port 9090 --placement-host-address 127.0.0.1:6050 --sentry-address  --config C:\Users\scjones\.dapr\config.yaml --components-path C:\Users\scjones\.dapr\components'

Steps to Reproduce the Problem

Open the ControllerSample and add the above section to appsettings.json then run the solution, the command-line above will be output in the logs.

Release Note

RELEASE NOTE: FIX Bug where an empty SentryAddress value in appsettings.json would pass an empty parameter to the daprd command line