-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix(ci): modify JUnit output file to properly name packages for BuildPulse #12434
Conversation
I don't think this worked |
going with suite name "itests" and the classname the name of the itest file minus .go |
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.
Thanks - this looks good to me.
A couple of thoughts:
We have two variables to play with here
I think what you've done here is better than what we get from unit tests which don't have the command-line-argument
problem. Great.
Example: https://app.buildpulse.io/@filecoin-project/lotus/tests/22587403651
Modifying the .xml file directly before uploading (rather than doing command-line foo before running
go test
Per above, I do think this gives cleaner output in BuildPulse. One callout is that command-line-arguments still shows up in the GitHub Action logs.
Example:
https://github.com/filecoin-project/lotus/actions/runs/10721811712/job/29731273734
I assume this isn't a problem though as there hasn't been a complaint before and you have enough context about where the failure is since we have one job per itest file.
Yes and it still shows up when I do it locally as well, I just can't find a work-around for it because when you target a test file specifically you apparently lose the package information where the builder needs it; hence the need for this distant hack.
OK, so I've applied it a little bit more comprehensively so now it rewrites the suite name on all of them. But there's a catch - when it ends up executing So instead, I've done this: the suite name is now trimmed of the package prefix And they're slightly nicer when in the list view: We could flip this, which would make the list view more verbose, but would make the title nicer in the per-test view. I haven't played enough with it to know how useful these suite and class categorisations are. Fitting Java concepts to Go is a bit of a stretch here since the "class" isn't really the granulation we have. @BigLep have you toyed in BuildPulse enough to have an opinion? Maybe we should ask their advice? |
… Pulse When you go test ./itests/path_to_test.go then your binary is named "command-line-arguments" thanks to a Go quirk. This hack is to just fix that directly in the JUnit output before we upload it so we have proper naming.
2615814
to
605a160
Compare
When you go test ./itests/path_to_test.go then your binary is named "command-line-arguments" thanks to a Go quirk. This hack is to just fix that directly in the JUnit output before we upload it so we have proper naming.
Ref: #12127