Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added internal-grpc-port to standalone run options #876

Closed

Conversation

jigargandhi
Copy link
Member

@jigargandhi jigargandhi commented Jan 17, 2022

Signed-off-by: Jigar R Gandhi jigarr.gandhi@gmail.com

Description

Added dapr-internal-grpc-port argument to daprd process command line for standalone.
This value will be used when parsing the value from a local DNS component which is implemented as per this
dapr/components-contrib#1340.

Issue reference

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 related to: dapr/dapr#3256

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

Signed-off-by: Jigar R Gandhi <jigarr.gandhi@gmail.com>
@jigargandhi jigargandhi requested review from a team as code owners January 17, 2022 14:20
@codecov
Copy link

codecov bot commented Jan 17, 2022

Codecov Report

Merging #876 (18f72eb) into master (68f8325) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #876   +/-   ##
=======================================
  Coverage   29.36%   29.36%           
=======================================
  Files          35       35           
  Lines        2329     2329           
=======================================
  Hits          684      684           
  Misses       1572     1572           
  Partials       73       73           
Impacted Files Coverage Δ
pkg/standalone/run.go 60.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mukundansundar
Copy link
Collaborator

@yaron2 Can you review this PR?

@dapr-bot
Copy link
Collaborator

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@dapr-bot dapr-bot added the stale label Feb 24, 2022
@jigargandhi
Copy link
Member Author

@yaron2 please review this

@dapr-bot dapr-bot removed the stale label Feb 24, 2022
@dapr-bot
Copy link
Collaborator

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@dapr-bot dapr-bot added the stale label Mar 27, 2022
@mukundansundar
Copy link
Collaborator

@jigargandhi Please resolve the conflicts in the PR ...

cc @yaron2 once conflicts are resolved, please review the PR

@jigargandhi
Copy link
Member Author

@yaron2 please review the PR, @mukundansundar I have resolved the merge conflicts

@mukundansundar
Copy link
Collaborator

@jigargandhi Can you resolve the conflicts for this?

@mukundansundar
Copy link
Collaborator

@jigargandhi Can you resolve the conflicts for this PR?

@jigargandhi
Copy link
Member Author

@mukundansundar resolved the conflicts

@mukundansundar
Copy link
Collaborator

@pravinpushkar Please review this PR ..

@pravinpushkar
Copy link
Contributor

@jigargandhi FYI - The related PRs in the description are not merged and probably got closed due to no activity.

@pravinpushkar
Copy link
Contributor

@jigargandhi Does it make sense if we expose this as configurable option (get free port only when not provided by cmd line)? Another clarification, if this is supposed to be only internal then should it be part of cli ?

Copy link
Collaborator

@mukundansundar mukundansundar left a comment

Choose a reason for hiding this comment

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

@jigargandhi Thanks for the contribution!
Also please do add E2E for this.

@@ -372,3 +379,18 @@ func init() {

RootCmd.AddCommand(RunCmd)
}

// GetFreePort asks the kernel for a free open port that is ready to use.
func getFreePort() (int, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@jigargandhi we are already importing "github.com/phayes/freeport" in the pkg/standalone/run.go file. Why can't we use that here?

@@ -99,6 +100,11 @@ dapr run --app-id myapp --app-port 3000 --app-protocol grpc -- go run main.go
}
}

internalGrpcPort, err := getFreePort()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you also change the implementation to allow passing in internal grpc port from cmd flag? Wrt issue #1026

@jigargandhi
Copy link
Member Author

I am not planning to work on this at the moment, please feel free to take it up.

@shubham1172
Copy link
Member

I can take this PR to completion, will cherry pick commits and create a new PR.

@mukundansundar
Copy link
Collaborator

closed by #1040

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Why discard the dapr-internal-grpc-port parameter?
5 participants