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

Issue #6006 TestCustomResources with better logging and more precision #6068

Closed
wants to merge 2 commits into from

Conversation

coryrc
Copy link
Contributor

@coryrc coryrc commented Nov 19, 2019

Fixes #6006

Given the reasoning in issue #6006, (that K8s doesn't actually HAVE to kill anything that exceeds memory limits), the v1 api version is being moved to an e2e test. Logging has been added for better debugability.

/assign @dgerd

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Nov 19, 2019
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 19, 2019
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a comment

Choose a reason for hiding this comment

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

@coryrc: 0 warnings.

In response to this:

Fixes #6006

Given the reasoning in issue #6006, (that K8s doesn't actually HAVE to kill anything that exceeds memory limits), the v1 api version is being moved to an e2e test. Logging has been added for better debugability.

/assign @dgerd

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.

@knative-prow-robot knative-prow-robot added the area/test-and-release It flags unit/e2e/conformance/perf test issues for product features label Nov 19, 2019
@coryrc
Copy link
Contributor Author

coryrc commented Nov 19, 2019

/uncc @chaodaiG
/uncc @chizhg

@coryrc
Copy link
Contributor Author

coryrc commented Nov 19, 2019

(The first commit is actually #5984 and I will rebase this once that is approved)

@dgerd
Copy link

dgerd commented Nov 25, 2019

This should remove the v1alpha1 and v1beta1 tests. They have the same reasons to not be in conformance.

@coryrc
Copy link
Contributor Author

coryrc commented Nov 25, 2019

This should remove the v1alpha1 and v1beta1 tests. They have the same reasons to not be in conformance.

It does delete v1alpha1 & v1beta1/resources_test.go ...

Before errors between the test image and the test could cause false
positives, but now that is much less likely.

Also prints more logs at higher debugging levels and fewer logs at
lower levels than prior.
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: coryrc
To complete the pull request process, please assign dgerd
You can assign the PR to them by writing /assign @dgerd in a comment when ready.

The full list of commands accepted by this bot can be found 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

}
if response.StatusCode != http.StatusOK {
return fmt.Errorf("StatusCode = %d, want %d", response.StatusCode, http.StatusOK)
klog.V(5).Infof("Received error '%+v' from sendPostRequest (may be expected)\n", err)
Copy link

Choose a reason for hiding this comment

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

Not sure I see the value in logging the error if the error is expected. Why not put this down in the "wantSuccess" statement?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's why this is at trace level, V(5). I found it valuable when it was a conformance test.

test/e2e/resources_test.go Outdated Show resolved Hide resolved
test/e2e/resources_test.go Outdated Show resolved Hide resolved
t.Fatalf("We shouldn't have got a response from bloating RAM with %d MBs", mb)
}
} else if response.StatusCode == http.StatusBadRequest {
t.Error("Test Issue: Received BadRequest from test app, which probably means the test & test image are not cooperating with each other.")
Copy link

Choose a reason for hiding this comment

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

This error seems unnecessarily long and should include the request that was sent to make debugging easier.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you think this information should not be provided in the log -- like move the second half to a comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As for including request, if people run at verbosity 6 through 9 they can see the request, so is that not sufficient?

@dgerd
Copy link

dgerd commented Nov 26, 2019

It does delete v1alpha1 & v1beta1/resources_test.go ...

The diff seemed off before your force push. Looks better now.

@knative-test-reporter-robot

The following jobs failed:

Test name Triggers Retries
pull-knative-serving-unit-tests 0/3

Failed non-flaky tests preventing automatic retry of pull-knative-serving-unit-tests:

_go_tests.DataRaceAnalysis
pkg/reconciler/nscert.Failure

@coryrc
Copy link
Contributor Author

coryrc commented Nov 26, 2019

/retest

@coryrc coryrc requested a review from dgerd November 27, 2019 23:08
@coryrc
Copy link
Contributor Author

coryrc commented Jan 13, 2020

/hold

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 13, 2020
@coryrc
Copy link
Contributor Author

coryrc commented Feb 24, 2020

Superseded by #6978

@coryrc coryrc closed this Feb 24, 2020
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 24, 2020
@knative-prow-robot
Copy link
Contributor

@coryrc: PR needs rebase.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test-and-release It flags unit/e2e/conformance/perf test issues for product features cla: yes Indicates the PR's author has signed the CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tighter Acceptance Criteria in TestCustomResources
5 participants