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 newline in raw string in e2e net perf case #46581

Merged
merged 1 commit into from
Nov 10, 2017

Conversation

m1093782566
Copy link
Contributor

@m1093782566 m1093782566 commented May 28, 2017

Which issue this PR fixes

fixes #46083

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 28, 2017
@k8s-github-robot k8s-github-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-label-needed labels May 28, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @m1093782566. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with @k8s-bot ok to test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 28, 2017
@spxtr
Copy link
Contributor

spxtr commented May 28, 2017

fixes #46581

That's this PR!

@m1093782566
Copy link
Contributor Author

@spxtr updated.

@spxtr
Copy link
Contributor

spxtr commented May 28, 2017

/unassign
/assign @cmluciano

@k8s-ci-robot k8s-ci-robot assigned cmluciano and unassigned spxtr May 28, 2017
@cblecker
Copy link
Member

@k8s-bot ok to test
/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 release-note-label-needed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 29, 2017
@m1093782566
Copy link
Contributor Author

@cblecker test flakes?

@gyliu513
Copy link
Contributor

@k8s-bot pull-kubernetes-e2e-kops-aws test this

@m1093782566
Copy link
Contributor Author

m1093782566 commented May 30, 2017

ha ha. It seems that k8s-bot does not response to me. THANKS, @gyliu513

@gyliu513
Copy link
Contributor

Yes, for now only Member can run @k8s-bot ok to test, but you can run the command that the @k8s-ci-robot provided to re-run the test. ;-)

@cblecker
Copy link
Member

@m1093782566 The federation test is flaky atm, but also non-blocking. We can leave that failed -- it won't block your PR from merging. Next step is waiting for one of the reviewers to look over your change.

@m1093782566
Copy link
Contributor Author

@cblecker Thanks for reminding.

Copy link

@cmluciano cmluciano left a comment

Choose a reason for hiding this comment

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

I'm not sure if this actually would not still generate an error.

I tried an example in the Go playground here

@m1093782566
Copy link
Contributor Author

@cmluciano
Copy link

Yep that example works since you convert prior to parsing. I should also ask what platform you are running these tests on and can you provide a test run that fails.

@m1093782566
Copy link
Contributor Author

m1093782566 commented Jun 2, 2017

@cmluciano My environment is centos 7.2 kubeadm cluster.

It's a bit difficult to create a failure case in CI environment which I think it's a debain OS. However, I guess trim newline in a string does no harm?

@cmluciano
Copy link

The tests use a specific library that makes this a little easier. I think just a unit test as you mentioned should suffice.

@m1093782566
Copy link
Contributor Author

m1093782566 commented Jun 3, 2017

@cmluciano Do you mean I should unit test intOrFail()?

I just don't know how to write unit test cases in e2e framework and how to make e2e run unit test cases. Could you please give me some hints? Thanks very much.

@cmluciano
Copy link

Sorry, I just realized that this actually WAS the e2e. We could try to stub that int in another case, but it probably is not worthwhile.

Let's just re-arrange the PR to strip the newline prior to parsing for now and then see what the reviewers think of another test case.

@cmluciano
Copy link

/retest

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 25, 2017
@m1093782566 m1093782566 closed this Aug 4, 2017
@m1093782566 m1093782566 reopened this Aug 12, 2017
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 12, 2017
@m1093782566
Copy link
Contributor Author

@sstarcher Please look at here. Did you meet the same issue in AWS/CoreOS setup?

@m1093782566
Copy link
Contributor Author

m1093782566 commented Aug 12, 2017

@cmluciano

Sorry, but to be honest, I don't very understand your expectation - I can reproduce this issue in my local centos setup, and @sstarcher saw this issue in his AWS/CoreOS setup. I just don't know much about why it does not occur in k8s CI environment. Should we keep this PR open? Would much appreciate if you can give any idea. Thanks!

@m1093782566
Copy link
Contributor Author

@bowei

Would appreciate if you can give your opinions. Thanks a lot :)

@sstarcher
Copy link

I was using the https://github.com/coreos/tectonic-installer at the time when I reported I saw that issue running the conformance tests. It was installed in AWS using coreos.

@cmluciano
Copy link

/retest

@@ -97,6 +97,8 @@ func (s StrSlice) get(i int) string {

// intOrFail is a convenience function for parsing integers.
func intOrFail(debugName string, rawValue string) int64 {
// Trim newline in raw string before parsing it
rawValue = strings.Replace(rawValue, "\n", "", -1)
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem great to me. We should be Trim()ing the string before handing to this function. Also, this function makes

"1\n2\n3\n5" become a valid integer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. PTAL. Thanks!

Copy link
Member

@bowei bowei left a comment

Choose a reason for hiding this comment

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

I would fix the calling places where the newline is being introduced.

@m1093782566
Copy link
Contributor Author

m1093782566 commented Oct 25, 2017

Glad to receive your feedback, @bowei

I fixed the newline in the beginning of NewIPerf(), please take a look when you have a chance. Thanks!

@@ -69,6 +69,8 @@ func (i *IPerfResults) ToTSV() string {

// NewIPerf parses an IPerf CSV output line into an IPerfResult.
func NewIPerf(csvLine string) *IPerfResult {
// Trim newline in csv string line before parsing it
Copy link
Member

Choose a reason for hiding this comment

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

This comment is not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, removed this comment.

@m1093782566
Copy link
Contributor Author

@bowei @cmluciano

All comments are fixed now and this PR has been pending for a while...

@bowei
Copy link
Member

bowei commented Nov 9, 2017

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 9, 2017
@bowei
Copy link
Member

bowei commented Nov 9, 2017

/approve no-issue

@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bowei, m1093782566

Associated issue: 46083

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

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

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

Automatic merge from submit-queue (batch tested with PRs 46581, 55426, 54849). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit c7644dd into kubernetes:master Nov 10, 2017
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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. 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.

[e2e test] Networking IPerf failed due to invalid bandwidth string with newline
10 participants