-
Notifications
You must be signed in to change notification settings - Fork 192
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
v0.16.0: Bump deps, Bump Kubernetes, Disabled Log Flags #276
Conversation
single bump commit, single commit with changes that accommodate that bump, please |
9a17d0e
to
aa80caf
Compare
aa80caf
to
62b87fe
Compare
@@ -451,7 +451,7 @@ func Run(cfg *completedProxyRunOptions) error { | |||
return srv.Serve(tlsListener) | |||
}, func(err error) { | |||
if err := srv.Shutdown(context.Background()); err != nil { | |||
klog.Errorf("failed to gracefully shutdown server: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not appear to be a bump commit at all? So many test changes, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
klog.Errorf
-> klog.ErrorS
, it was necessary after the bump.
I moved the validation from the completed config to the options, like in apiserver, such that I don't need to add the disabled options to the config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? klog.Errorf
is still present.
The test changes below don't belong to the bump commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dunno what was wrong with my linter. Reverting it.
@@ -122,5 +147,101 @@ func (o *ProxyRunOptions) Flags() k8sapiflag.NamedFlagSets { | |||
flagset.Uint32Var(&o.HTTP2MaxConcurrentStreams, "http2-max-concurrent-streams", 100, "The maximum number of concurrent streams per HTTP/2 connection.") | |||
flagset.Uint32Var(&o.HTTP2MaxSize, "http2-max-size", 256*1024, "The maximum number of bytes that the server will accept for frame size and buffer per stream in a HTTP/2 request.") | |||
|
|||
// disabled flags | |||
o.flagSet = flagset // reference used for validation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mark all hidded with flagset.MarkHidden(name)
8b599c0
to
d226575
Compare
Is it ready to "go"? |
Well, I try to find a contributor to review it. This is serious software and I don't want to have a single-contributor bias in it. |
@@ -451,7 +451,7 @@ func Run(cfg *completedProxyRunOptions) error { | |||
return srv.Serve(tlsListener) | |||
}, func(err error) { | |||
if err := srv.Shutdown(context.Background()); err != nil { | |||
klog.Errorf("failed to gracefully shutdown server: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? klog.Errorf
is still present.
The test changes below don't belong to the bump commit.
flagset.IntVar(&o.disabled.stderrthreshold, "stderrthreshold", 2, "[DISABLED] logs at or above this threshold go to stderr") | ||
o.flagSet = flagset // reference used for validation | ||
flagset.BoolVar(&o.disabled.logtostderr, "logtostderr", false, "[DISABLED]") | ||
if err := flagset.MarkHidden("logtostderr"); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep the flag names in a slice, handle hiding all in one place
} | ||
|
||
func Complete(o *options.ProxyRunOptions) (*completedProxyRunOptions, error) { | ||
func Complete(o *options.ProxyRunOptions) (*proxyConfig, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make it a method of ProxyRunOptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would need to pull completedProxyRunOptions
then into the options pkg to avoid a circular dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, leave it be, then. I was wondering why I did it this way back then :)
var err error | ||
completed := &completedProxyRunOptions{ | ||
config := &proxyConfig{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you plan to rebase the devel branch on top of this, the rename does not bring enough value to justify the merge conflicts headache
|
||
// Removed upstream flags shouldn't be use | ||
for _, disabledOpt := range []string{ | ||
"logtostderr", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a second spot where you're constructing this list, maybe it would make sense to keep it somewhere where you can refer to it
2e94961
to
25b0cee
Compare
25b0cee
to
b9c9d44
Compare
@@ -451,7 +392,7 @@ func Run(cfg *completedProxyRunOptions) error { | |||
return srv.Serve(tlsListener) | |||
}, func(err error) { | |||
if err := srv.Shutdown(context.Background()); err != nil { | |||
klog.Errorf("failed to gracefully shutdown server: %w", err) | |||
klog.Error(fmt.Errorf("failed to gracefully shutdown server: %w", err)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
klog.Errorf
, no fmt.Errorf
should be necessary I believe
// disabled flags | ||
o.flagSet = flagset // reference used for validation | ||
for _, disabledOpt := range disabledFlags { | ||
_ = flagset.String(disabledOpt, "", "[DISABLED]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure converting all opts to sting is safe
/label cherry-pick-approved |
/label qe-approved |
Some logging were removed. We introduce them in a disabled, but non-breaking way. Updating the deprecated functions in TLS and using the new ones.
b9c9d44
to
0566550
Compare
/lgtm |
No description provided.