Skip to content

Commit

Permalink
Fix scheduler-host-address for standalone runs
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Troshin <anton@diagrid.io>
  • Loading branch information
antontroshin committed Jan 24, 2025
1 parent 953c4a2 commit 026fc28
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,6 @@ dapr run --run-file /path/to/directory -k

if (daprVer.RuntimeVersion != "edge") && (semver.Compare(fmt.Sprintf("v%v", daprVer.RuntimeVersion), "v1.14.0-rc.1") == -1) {
print.InfoStatusEvent(os.Stdout, "The scheduler is only compatible with dapr runtime 1.14 onwards.")
for i, arg := range output.DaprCMD.Args {
if strings.HasPrefix(arg, "--scheduler-host-address") {
output.DaprCMD.Args[i] = ""
}
}
}
print.InfoStatusEvent(os.Stdout, startInfo)

Expand Down
2 changes: 1 addition & 1 deletion pkg/standalone/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (config *RunConfig) validatePlacementHostAddr() error {
func (config *RunConfig) validateSchedulerHostAddr() error {
schedulerHostAddr := config.SchedulerHostAddress
if len(schedulerHostAddr) == 0 {
return nil
schedulerHostAddr = "localhost"
}

if indx := strings.Index(schedulerHostAddr, ":"); indx == -1 {
Expand Down

0 comments on commit 026fc28

Please sign in to comment.