dapr / cli

Command-line tools for Dapr.
Apache License 2.0
315 stars 200 forks source link

Scheduler client not started by dapr cli #1420

Closed mikeee closed 2 weeks ago

mikeee commented 2 weeks ago

Expected Behavior

A scheduler address should be passed to the runtime and subsequent initialisation should take place.

Actual Behavior

The dapr scheduler does not get initialized by the run command with the flag.

The issue stems from this definition in the standalone/run.go file

// Must use env for scheduler host address because using arg would cause a sidecar crash in older daprd versions.
    SchedulerHostAddr string `env:"DAPR_SCHEDULER_HOST_ADDRESS" yaml:"schedulerHostAddress"`

The way it is currently set up - it doesn't work if you pass an address as a flag to the run command. I'd expect an error or crash if a scheduler client flag is provided to an older runtime version.

Steps to Reproduce the Problem

dapr run --app-id=distributed-scheduler \
        --app-port 50070 \
        --app-protocol grpc \
        --scheduler-host-address=127.0.0.1:50006 \
        --log-level debug 

Release Note

RELEASE NOTE: