Skip to content

Conversation

Gallardot
Copy link

Description

Please explain the changes you've made

Issue reference

#1503

https://docs.dapr.io/reference/arguments-annotations-overview/

Sometimes when developing locally, we don't need placement and scheduler.

When using cli, provide capabilities consistent with annotation.

dapr run --placement-host-address " " --scheduler-host-address " " -a app-id

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #[issue number]

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@Gallardot Gallardot requested review from a team as code owners August 8, 2025 06:08
@@ -129,6 +129,11 @@ func (config *RunConfig) validatePlacementHostAddr() error {
if len(placementHostAddr) == 0 {
placementHostAddr = "localhost"
}

if strings.TrimSpace(placementHostAddr) == "" {
Copy link
Member

Choose a reason for hiding this comment

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

"localhost" is being assigned above in line 130 if placementHostAddr is empty, so this check could never be true

Copy link
Author

@Gallardot Gallardot Aug 14, 2025

Choose a reason for hiding this comment

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

"localhost" is being assigned above in line 130 if placementHostAddr is empty, so this check could never be true

Hi @yaron2 , Thanks for your reply.

Here is an example:

dapr run --placement-host-address " " --scheduler-host-address " " -a app-id

This is different from "empty". The part I modified is to handle such cases. I think it is OK.

When using the CLI, ensure that the provided capabilities are consistent with those of the annotations.

Comma separated list of addresses for Dapr Actor Placement servers.

When no annotation is set, the default value is set by the Sidecar Injector.

When the annotation is set and the value is a single space (' '), or “empty”, the sidecar does not connect to Placement server. This can be used when there are no actors running in the sidecar.

When the annotation is set and the value is not empty, the sidecar connects to the configured address. For example: 127.0.0.1:50057,127.0.0.1:50058

For reference, please see:
https://docs.dapr.io/reference/arguments-annotations-overview/

@Gallardot Gallardot requested a review from yaron2 August 18, 2025 03:46
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.

2 participants