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

v0.16.0: Bump deps, Bump Kubernetes, Disabled Log Flags #276

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

ibihim
Copy link
Collaborator

@ibihim ibihim commented Jan 15, 2024

No description provided.

@stlaz
Copy link
Collaborator

stlaz commented Jan 16, 2024

single bump commit, single commit with changes that accommodate that bump, please

@ibihim ibihim force-pushed the bump-deps-v0.15.1 branch 3 times, most recently from 9a17d0e to aa80caf Compare January 23, 2024 09:30
@ibihim ibihim changed the title [wip] v0.16.0: Bump deps, Bump Kubernetes, Disabled Log Flags v0.16.0: Bump deps, Bump Kubernetes, Disabled Log Flags Jan 23, 2024
@@ -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)
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator

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.

Copy link
Collaborator Author

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
Copy link
Collaborator

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)

@ibihim ibihim force-pushed the bump-deps-v0.15.1 branch 4 times, most recently from 8b599c0 to d226575 Compare January 23, 2024 10:52
@ujo-trackunit
Copy link

Is it ready to "go"?

@ibihim
Copy link
Collaborator Author

ibihim commented Feb 7, 2024

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)
Copy link
Collaborator

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 {
Copy link
Collaborator

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) {
Copy link
Collaborator

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

Copy link
Collaborator Author

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.

Copy link
Collaborator

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{
Copy link
Collaborator

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",
Copy link
Collaborator

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

@@ -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))
Copy link
Collaborator

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]")
Copy link
Collaborator

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

@dpuniaredhat
Copy link

/label cherry-pick-approved

@dpuniaredhat
Copy link

/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.
@stlaz
Copy link
Collaborator

stlaz commented Feb 8, 2024

/lgtm

@ibihim ibihim merged commit 1d8bd9a into brancz:master Feb 8, 2024
7 checks passed
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.

None yet

4 participants