-
Notifications
You must be signed in to change notification settings - Fork 136
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
[YUNIKORN-2305] E2E test: Upload stdout logs to Github Action artifact #758
Conversation
test/e2e/framework/helpers/ginkgo_writer/ginkgo_writer_setup.go
Outdated
Show resolved
Hide resolved
test/e2e/framework/helpers/ginkgo_writer/ginkgo_writer_setup.go
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #758 +/- ##
==========================================
- Coverage 71.36% 71.30% -0.07%
==========================================
Files 43 43
Lines 7600 7600
==========================================
- Hits 5424 5419 -5
- Misses 1975 1979 +4
- Partials 201 202 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be made optional, and off by default as it interferes with running the e2e tests interactively. My suggestion would be to use the existing implementation unless the ENV var for the path is set. This will allow doing the uploads as part of the pre-commit workflow but still allow interactive use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chenyulin0719 maybe there's a misunderstanding, but I think the default logging from the tests is perfectly fine. What we need to upload is the Yunikorn log and cluster info, which is printed to the the console in the current implementation. That is a LOT of text and it's very inconvenient to read all kinds of output mixed together.
So what we need to do is writing YK logs and cluster info to a separate file (or even better, files) then upload it when the test completes.
I agree with @pbacsko, the current logging is fine until an error occurs, and then the dump becomes nearly unreadable, especially locally (but even on GH I've seen it overflow the allowed size). I'd be a big fan of capturing that output to files (within the source tree under output/) and then uploading those to GH if we're running in a workflow. I think separate files for state dump, yunikorn logs, and cluster diagnostics would be ideal. |
Hi @pbacsko, @craigcondit
Noted, will keep the default logging. The new thought in my mind is we will have 1 new logging method for file.
I should move "state dump, yunikorn logs, and cluster diagnostics" from The further question is the artifact's file structure.
@craigcondit In my opinion, the example 's structure in this PR is clear enough, I organized all the file logs into a single file per suite. (Printing the spec name first allows us to search by spec name.) |
I'd prefer to see a directory per test, with the individual artifacts (cluster dump, YK logs, state dump) separated out because some of these are json, and others are text. Splitting them out allows for tooling to process them more easily. Also, we should not be using static names in |
Hi @pbacsko, @craigcondit, New version updated. Each failed test will generate 3 files under build/e2e/{suite}/ (Both for interactive and GitHub Action environments):
You can check the artifact in this workflow run: (I make some tests in plugin mode fail.) Please let me know if there have anything to be improved. |
GroupUsagePath = "ws/v1/partition/%s/usage/group/%s" | ||
HealthCheckPath = "ws/v1/scheduler/healthcheck" | ||
ValidateConfPath = "ws/v1/validate-conf" | ||
FullStateDumpPath = "ws/v1/fullstatedump" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous ykRest logs(queue/node/app) are replaced by fullstatedump and write to {specName}_ykFullStateDump.json".
@chenyulin0719 please rebase the PR, there are some minor conflicts. |
The approach LGTM. I just found some minor things. |
23b6f3a
to
df159a1
Compare
Hi @pbacsko. https://github.com/chenyulin0719/yunikorn-k8shim/actions/runs/7471481942 |
Checked the failed test is related to preemption e2e test. I'm curretly troubleshooting it in another issue. https://github.com/apache/yunikorn-k8shim/actions/runs/7471482170/job/20349923016?pr=758#step:6:1480 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
What is this PR for?
(2024-01-09 Updated Version 2)
In the current e2e test, the cluster log dumps are mixup with ginkgo.by and gingo.GinkgoWriter logs. This makes the logs difficult to read, and sometimes there are too many logs to display.
This PR now dumps cluster-info files to build/e2e/{suite} and uploads files to Github Action artifact.
For each failed test, 3 files will be generated under build/e2e/{suite}/ (Both for interactive and GitHub Action environment):
What type of PR is it?
Todos
Found some issues, could create other Jira to fix it:
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/7456435170
Failed workflow: https://github.com/chenyulin0719/yunikorn-k8shim/actions/runs/7456536846
Screenshots (if appropriate)
Questions:
NA