Skip to content

Commit

Permalink
Fix scheduler address for dapr run with file on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Troshin <[email protected]>
  • Loading branch information
antontroshin committed Mar 5, 2025
1 parent 6c9bcc6 commit 69462f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,8 @@ func executeRun(runTemplateName, runFilePath string, apps []runfileconfig.App) (
// Set defaults if zero value provided in config yaml.
app.RunConfig.SetDefaultFromSchema()

app.RunConfig.SchedulerHostAddress = validateSchedulerHostAddress(daprVer.RuntimeVersion, app.RunConfig.SchedulerHostAddress)

// Validate validates the configs and modifies the ports to free ports, appId etc.
err := app.RunConfig.Validate()
if err != nil {
Expand All @@ -527,8 +529,6 @@ func executeRun(runTemplateName, runFilePath string, apps []runfileconfig.App) (
break
}

runConfig.SchedulerHostAddress = validateSchedulerHostAddress(daprVer.RuntimeVersion, runConfig.SchedulerHostAddress)

// Combined multiwriter for logs.
var appDaprdWriter io.Writer
// appLogWriter is used when app command is present.
Expand Down Expand Up @@ -674,7 +674,7 @@ func validateSchedulerHostAddress(version, address string) string {
// If no SchedulerHostAddress is supplied, set it to default value.
if semver.Compare(fmt.Sprintf("v%v", version), "v1.15.0-rc.0") == 1 {
if address == "" {
return "localhost:50006"
return "localhost"
}
}
return address
Expand Down

0 comments on commit 69462f5

Please sign in to comment.