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

Some minor fixes for warnings while running the tests #68481

Merged
merged 1 commit into from Nov 9, 2018

Conversation

duglin
Copy link

@duglin duglin commented Sep 10, 2018

Just some minor things I noticed while running the tests today - nothing big.

Signed-off-by: Doug Davis dug@us.ibm.com

@k8s-ci-robot
Copy link
Contributor

@duglin: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 10, 2018
@@ -110,7 +110,7 @@ func CreateCACertAndKeyFiles(certSpec *KubeadmCert, cfg *kubeadmapi.InitConfigur
if certSpec.CAName != "" {
return fmt.Errorf("This function should only be used for CAs, but cert %s has CA %s", certSpec.Name, certSpec.CAName)
}
glog.V(1).Infoln("creating a new certificate authority for %s", certSpec.Name)
glog.V(1).Infof("creating a new certificate authority for %s", certSpec.Name)
Copy link
Author

Choose a reason for hiding this comment

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

this one complained about having %s but not using Infof

@k8s-ci-robot k8s-ci-robot added area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/storage Categorizes an issue or PR as relevant to SIG Storage. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 10, 2018
@@ -485,7 +485,7 @@ func validateProtocol(protocol string) bool {
if protocol == ProtocolTCP || protocol == ProtocolUDP || protocol == ProtocolSCTP {
return true
}
glog.Errorf("Invalid entry's protocol: %s, supported protocols are [%s, %s]", protocol, ProtocolTCP, ProtocolUDP, ProtocolSCTP)
glog.Errorf("Invalid entry's protocol: %s, supported protocols are [%s, %s, %s]", protocol, ProtocolTCP, ProtocolUDP, ProtocolSCTP)
Copy link
Author

Choose a reason for hiding this comment

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

too few %s's

Copy link
Contributor

Choose a reason for hiding this comment

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

#68263 fixes this but it's ok.

@@ -188,7 +188,7 @@ func getMaxDataDiskCount(instanceType string, sizeList *[]compute.VirtualMachine
continue
}
if strings.ToUpper(*size.Name) == vmsize {
glog.V(2).Infof("got a matching size in getMaxDataDiskCount, Name: %s, MaxDataDiskCount: %s", *size.Name, *size.MaxDataDiskCount)
glog.V(2).Infof("got a matching size in getMaxDataDiskCount, Name: %v, MaxDataDiskCount: %v", *size.Name, *size.MaxDataDiskCount)
Copy link
Author

Choose a reason for hiding this comment

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

wrong datatype on the %'s - they're numeric not string

Copy link
Contributor

Choose a reason for hiding this comment

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

We should keep the first %s, *size.Name is string.

Copy link
Member

Choose a reason for hiding this comment

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

@duglin is this a linter error?
the rest LGTM.

Copy link
Author

Choose a reason for hiding this comment

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

%v works just fine for strings, but I'll switch it back to %s.
I don't think it was a linter error, is linter run as part of "make test" ?
The console showed this:

# k8s.io/kubernetes/cmd/kubeadm/app/phases/certs
cmd/kubeadm/app/phases/certs/certs.go:113: Verbose.Infoln call has possible formatting directive %s

Copy link
Member

Choose a reason for hiding this comment

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

is linter run as part of "make test"

i don't think so.

@duglin
Copy link
Author

duglin commented Sep 10, 2018

/release-note-none

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Sep 10, 2018
@duglin
Copy link
Author

duglin commented Sep 10, 2018

easy review
ping @detiber @islinwb @dims

Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

/kind cleanup

@@ -188,7 +188,7 @@ func getMaxDataDiskCount(instanceType string, sizeList *[]compute.VirtualMachine
continue
}
if strings.ToUpper(*size.Name) == vmsize {
glog.V(2).Infof("got a matching size in getMaxDataDiskCount, Name: %s, MaxDataDiskCount: %s", *size.Name, *size.MaxDataDiskCount)
glog.V(2).Infof("got a matching size in getMaxDataDiskCount, Name: %v, MaxDataDiskCount: %v", *size.Name, *size.MaxDataDiskCount)
Copy link
Member

Choose a reason for hiding this comment

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

@duglin is this a linter error?
the rest LGTM.

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. labels Sep 11, 2018
@islinwb
Copy link
Contributor

islinwb commented Sep 11, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 11, 2018
Signed-off-by: Doug Davis <dug@us.ibm.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 11, 2018
@duglin
Copy link
Author

duglin commented Sep 11, 2018

addressed comment

@neolit123
Copy link
Member

thanks
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 11, 2018
@duglin
Copy link
Author

duglin commented Sep 11, 2018

/test pull-kubernetes-e2e-gce-device-plugin-gpu

@duglin
Copy link
Author

duglin commented Sep 11, 2018

ping @neolit123

@neolit123
Copy link
Member

@duglin thanks for the ping.
one of the milestone maintainers should add a milestone if this is to be merged for 1.12.
otherwise it has to wait after 1.12 - this is more likely given it requires approval by multiple parties.

/assign @fabriziopandini

@duglin
Copy link
Author

duglin commented Sep 11, 2018

sounds fair, definitely not critical for 1.12

@duglin
Copy link
Author

duglin commented Sep 25, 2018

ok to merge now that there's a thaw?

@neolit123
Copy link
Member

/lgtm

@neolit123
Copy link
Member

/assign @fabriziopandini @timothysc
PR is LGTM, needs approve.

Copy link
Member

@timothysc timothysc left a comment

Choose a reason for hiding this comment

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

/approve

@duglin
Copy link
Author

duglin commented Nov 4, 2018

any chance of getting this one in?

@neolit123
Copy link
Member

needs approve from @kubernetes/sig-azure too.
/assign @brendandburns

Copy link
Member

@andyzhangx andyzhangx left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

Copy link
Member

@timothysc timothysc left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@duglin
Copy link
Author

duglin commented Nov 8, 2018

@brendanburns any chance you can review this? This minor PR has been there for a while now and I'd like to get it into 1.13

@timothysc timothysc added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: andyzhangx, duglin, timothysc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@duglin
Copy link
Author

duglin commented Nov 9, 2018

/test pull-kubernetes-e2e-kops-aws

@duglin
Copy link
Author

duglin commented Nov 9, 2018

/test pull-kubernetes-e2e-gce
/test pull-kubernetes-e2e-kops-aws

@duglin
Copy link
Author

duglin commented Nov 9, 2018

all tests are passing - who can push this over the finish line?

@k8s-ci-robot k8s-ci-robot merged commit b3a160d into kubernetes:master Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/storage Categorizes an issue or PR as relevant to SIG Storage. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants