-
Notifications
You must be signed in to change notification settings - Fork 597
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
Developer productivity: logs lost when timeout in tests #1894
Comments
If I suspect which test failed I can figure out the file and get the line - but logs files can help to see what was actually happening and what was the input
|
As @Fredy-Z suggested it is related to parallel execution and timeout in go test behavior: golang/go#24929 The issue is April and not merged in golang so no fix available :( The workaround seems to be to "replace all t.Logf calls with either fmt.Printf or a custom logger" - could we do that and replace back custom logger when the problem is fixed in go? |
What would be the best way to tackle the issue - add some flag to replace test logger with new logger? Could it be doen without modifying every test code that uses |
/cc @mattmoor Why not just run the tests with infinite timeout? |
It will never finish? the test may be blocked on something that failed before so WaitForAllTestResourcesReady may never succeed? And if you have no logs you do not know what failed before :( |
Yeah, so we probably don't want tests to hang forever, or did I misunderstand something @vagababov ? |
I think we already run the tests with -1 timeout on Prow |
Actually we have timeout set for all the integration tests running on Prow, see https://github.com/knative/serving/blob/7d87f88c65981e1905429a02bb1942fe4b96d9f7/test/e2e-tests.sh#L51 |
Prow jobs have a 2h timeout. The running job is simply killed, so the log output can be partial. But you can easily check that by using a 3h timeout with the above mentioned test. |
/assign @coryrc I'm working on a solution for better logging |
/assign @coryrc |
If test logs are lost then how do you diagnose what caused timeouts? |
Sorry, I haven't yet figured out how to use github so I missed your reply.
|
I think you meant IMO the core issue here is the test log are lost after |
@chizhg @coryrc I did not use parallel option but I do not expect anything would change buffering logs to streaming? golang/go#24929 (comment) |
@grantr which #907 ? https://github.com/knative/eventing/pull/907/files (github links to it)? |
Two solutions (not mutually exclusive) are available:
|
@aslom @grantr was referring to knative/pkg#907 ; that is my "solution #2" in the previous comment. |
/unassign |
@aslom I think this has been fixed -- would you be willing to reproduce/confirm this and close if it's no longer applicable? thanks! |
This issue is stale because it has been open for 90 days with no |
@aslom going to close this for now as it seems to be fixed, please feel free to reopen if needed, thanks! |
…ve#1894) Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com> Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
Describe the bug
Logs are lost when timeout in tests there is timeout: currently all I get is lot of stack traces but logging is lost - see stack traces in context below. If I suspect which test failed I can figure out the file and get the line - but logs files can help to see what was actually happening and what was the input
Expected behavior
A clear and concise description of what you expected to happen.
I was expecting to see log output such as
--- FAIL: TestMustPassTracingHeaders (0.25s)
--- FAIL: TestMustPassTracingHeaders/TestMustPassTracingHeaders-InMemoryChannel (0.41s)
channel_header_single_event_helper.go:43: Running header conformance test with channel "InMemoryChannel"
test_runner.go:80: namespace is : "test-must-pass-tracing-headers-in-memory-channel"
channel_header_single_event_helper.go:48: Creating channel
...
instead I only getting stack traces because of timeout and no idea how far test got and where it got stack as there is no logging ...
To Reproduce
Steps to reproduce the behavior.
Run test that blocks - to reproduce quickly set timeout to short
Knative release version
0.8
Additional context
Add any other context about the problem here such as proposed priority
The text was updated successfully, but these errors were encountered: