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

The error logs for different tests run with Go 1.14 are interleaved in junit xml files #2109

Closed
chizhg opened this issue May 21, 2020 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@chizhg
Copy link
Member

chizhg commented May 21, 2020

Go 1.14 has a new feature that "go test -v now streams t.Log output as it happens, rather than at the end of all tests."

This make go-junit-report that we use to generate junit xml files unhappy, which can possibly show the error messages for one test under another one on Spyglass.

See one example in https://prow.knative.dev/view/gcs/knative-prow/pr-logs/pull/knative_eventing/3034/pull-knative-eventing-integration-tests/1263214476346265603. If you expand one test like TestChannelChain/Channel-messaging.knative.dev/v1alpha1, you can see the error messages contain messages from other tests.

We should either fix go-junit-report or check if switching to another tool like gotestsum can fix this issue.

@chizhg chizhg added the bug Something isn't working label May 21, 2020
@chaodaiG
Copy link
Contributor

chaodaiG commented Jun 5, 2020

/assign

@chaodaiG
Copy link
Contributor

chaodaiG commented Jun 8, 2020

The example above has:

TestChannelChain/Channel-messaging.knative.dev/v1alpha1: test_runner.go:99: namespace is : "test-channel-chain-channel-messaging-knative-dev-v1alpha1-5t5ff" 

TestApiServerSourceV1Alpha2EventTypes: tracker.go:130: Cleaning resource: "e2e-apiserver-source-eventtypes" TestApiServerSourceV1Alpha2EventTypes: tracker.go:136: Waiting for e2e-apiserver-source-eventtypes to be deleted TestApiServerSourceV1Alpha2EventTypes: tracker.go:130: Cleaning resource: "event-watcher-sa-event-watcher-r" 

TestApiServerSourceV1Alpha2EventTypes: tracker.go:136: Waiting for event-watcher-sa-event-watcher-r to be deleted TestApiServerSourceV1Alpha2EventTypes: tracker.go:130: Cleaning resource: "event-watcher-r" TestApiServerSourceV1Alpha2EventTypes: tracker.go:136: Waiting for event-watcher-r to be deleted TestApiServerSourceV1Alpha2EventTypes: tracker.go:130: 

Cleaning resource: "event-watcher-sa" TestApiServerSourceV1Alpha2EventTypes: tracker.go:136: Waiting for event-watcher-sa to be deleted

I was an old pull request that's not easy to repro, this also happens in latest serving test:
https://prow.knative.dev/view/gcs/knative-prow/logs/ci-knative-serving-continuous/1269932327077679104

@chaodaiG
Copy link
Contributor

chaodaiG commented Jun 9, 2020

@chaodaiG
Copy link
Contributor

chaodaiG commented Jun 9, 2020

gotestsum community seems active, created a bug there: gotestyourself/gotestsum#128

@dnephin
Copy link

dnephin commented Jun 9, 2020

This is an issue with go1.14, see golang/go#38458. It sounds like that issue was fixed recently, so it should be resolved for go1.15.

@chizhg
Copy link
Member Author

chizhg commented Jun 9, 2020

Thanks for the pointer @dnephin !
It's likely that they are planning to backport this fix to Go 1.14 - golang/go#39308

@chizhg
Copy link
Member Author

chizhg commented Jul 21, 2020

The issue has been fixed after updating Go to 1.14.6, see https://prow.knative.dev/view/gcs/knative-prow/logs/ci-knative-serving-gloo-0.17.1/1285367134993518592

@chizhg chizhg closed this as completed Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants