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

fix typo note for pkg/sharedcli/profileflag/profileflag.go #3071

Merged
merged 1 commit into from
Jan 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/sharedcli/profileflag/profileflag.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const (
type Options struct {
// EnableProfile is the flag about whether to enable pprof profiling.
EnableProfile bool
// ProfilePort is the TCP address for pprof profiling.
// Defaults to 127.0.0.1:6060 if unspecified.
// ProfilingBindAddress is the TCP address for pprof profiling.
Copy link
Member

@jwcesign jwcesign Jan 28, 2023

Choose a reason for hiding this comment

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

The default is ":6060", which means it can accept requests from any source address(I tried), so I think we need the change the flag's default value from:

	fs.StringVar(&o.ProfilingBindAddress, "profiling-bind-address", ":6060", "The TCP address for serving profiling(e.g. 127.0.0.1:6060, :6060). This is only applicable if profiling is enabled.")

to:

	fs.StringVar(&o.ProfilingBindAddress, "profiling-bind-address", "127.0.0.1:6060", "The TCP address for serving profiling(e.g. 127.0.0.1:6060, :6060). This is only applicable if profiling is enabled.")

cc @XiShanYongYe-Chang

Copy link
Member

Choose a reason for hiding this comment

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

This may introduce a user-facing change, I suggest updating the relevant comments. Hi @yanggangtony, can you help update it?

Copy link
Member

Choose a reason for hiding this comment

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

/cc @Poor12

Copy link
Member

Choose a reason for hiding this comment

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

// ProfilingBindAddress is the TCP address for pprof profiling.
// Defaults to :6060 if unspecified.

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, thanks for review..
rebased it..

// Defaults to :6060 if unspecified.
ProfilingBindAddress string
}

Expand Down