-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Add flag to prune PASSED subtests in junit xml and have top level tests #117029
Add flag to prune PASSED subtests in junit xml and have top level tests #117029
Conversation
Please note that we're already in Test Freeze for the Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Fri Mar 31 04:32:14 UTC 2023. |
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
/kind bug |
is the expectation that all/most testgrids would use this option by default? losing info about green runs will make it hard to tell the difference between a test running and being skipped, as well as losing run-time information testgrid surfaces as graphs of times |
Can we collapse to e.g. package level results instead? |
or even package+top-level test ... a lot of the unit/integration test bulk comes from tests with ~hundreds of programmatically generated subtests |
d1d8343
to
67635bd
Compare
I have changed the logic to display the package + top-level tests. The subtests would be shown only in cases when there is a failure. This has drastically brought down the no.of rows from ~39k to ~9k. Also, many stale rows that are generated by Tests like Without Pruning https://prow.ppc64le-cloud.org/view/gs/ppc64le-kubernetes/logs/periodic-kubernetes-unit-test-ppc64le/1641471234464026624 @BenTheElder @liggitt Can you PTAL now? |
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 change itself looks good to me.
However, should this PR also enable the new feature? Right now it doesn't, because default is false
and the command line flag is not getting added to the test scripts which invoke prune-junit
.
I think this PR should enable pruning. The simplest way to do that would be to change the flag default. Only Kubernetes uses it, so we don't need to worry about breaking someone other than ourselves.
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.
/lgtm
+1 to flip the default for prune-tests to true though
LGTM label has been added. Git tree hash: 0277c75cade10fc65fbf1fcd64cbe94ea5b6b9ff
|
/approve |
Messed up while rebasing and resolving conflicts :( |
29cf8e5
to
dddbecb
Compare
@pohly ^^ |
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.
/lgtm
|
||
"k8s.io/kubernetes/third_party/forked/gotestsum/junitxml" | ||
) | ||
|
||
func main() { | ||
maxTextSize := flag.Int("max-text-size", 1, "maximum size of attribute or text (in MB)") | ||
pruneTests := flag.Bool("prune-tests", true, |
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.
It's on by default now, as suggested in #117029 (review)
LGTM label has been added. Git tree hash: 7f3495dc1567f3a2b24b133d1a3dec8ba2dc106c
|
Looks like we need one more approval. /assign @dims |
/approve thanks @Rajalakshmi-Girish |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: BenTheElder, dims, pohly, Rajalakshmi-Girish The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The CI which runs k8s unit tests has a huge no.of rows while it uses https://github.com/kubernetes/kubernetes/blob/master/hack/make-rules/test.sh and generates junit xml file in artifacts.
This large no. of rows hinders the display of complete data in test grids
Ref: kubernetes/test-infra#24779
kubernetes/test-infra#23425
As the purpose of the test grid in certain cases would be to analyze the failing/flaking tests, it shall be useful to have an option in
prune-junit-xml
to prune PASSED test cases and display only failed test cases.