chenyulin0719 opened a new pull request, #758: URL: https://github.com/apache/yunikorn-k8shim/pull/758
### What is this PR for? In the current e2e test, there are 2 types of logs that were mixed up in Github Action Log. 1. ginkgo.By 2. ginkgo.GinkgoWriter This PR write ginkgo.GinkgoWriter logs to local and uploads to Github Action artifact if e2e test failed. Changes: 1. Each e2e suite will put ginkgo.GinkgoWriter logs to their local artifact file. (Replace default writer 'os.Stdout' by '*File') 2. Upload artifacts only if any e2e test failed. 3. Move some ginkgo.GinkgoWriter logs to ginkgo.By because the existing logging is not clear. (No timestamp and spec name. Just keep cluster status and move others to ginkgo.By for now, we can create other Jira to refactor it.) ### What type of PR is it? * [ ] - Bug Fix * [x] - Improvement * [ ] - Feature * [ ] - Documentation * [ ] - Hot Fix * [ ] - Refactoring ### Todos Found some issues, could create other Jira to fix it: * [ ] - Found some e2e test that didn't dump cluster status when the test failed. (recovery_and_restart/persistent_volume) * [ ] - Review exisitng ginkgo.By logs and decide which should be moved to ginkgo.GinkgoWriter. * [ ] - (Optional) Refactor fmt.Fprintf(ginkgo.GinkgoWriter,"") to ginkgo.GinkgoWriter.Printf() ### What is the Jira issue? https://issues.apache.org/jira/browse/YUNIKORN-2305 ### How should this be tested? All existing e2e test should pass. Could also check Github Action result in my shim repo: Suceess workflow: https://github.com/chenyulin0719/yunikorn-k8shim/actions/runs/7411324558 Failed workflow: https://github.com/chenyulin0719/yunikorn-k8shim/actions/runs/7411334944 ### Screenshots (if appropriate) <img width="1460" alt="YUNIKORN-2305 Failed + Artifact screenshot" src="https://github.com/apache/yunikorn-k8shim/assets/26764036/93b4c9b7-6277-4a81-b565-e28315b23946"> ### Questions: Current I only upload artifact only if any e2e test failed. Please let me know if anyone suggests changing to 'always upload'. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
