Remove exception raising from JUnit parser
What does this MR do?
This change stops GitLab from raising exceptions and ultimately returning a 500 error when someone tries to load a pipeline with a malformed JUnit XML report artifact, as described in #37347 (closed)
It also includes frontend updates to render suite_error
in the MR to inform the viewer why there is no JUnit data.
What does this MR not do?
- Fix any broken JUnit reports. All this does is return a more helpful error.
- ~~Render any of the helpful error messages. This adds a field to the API TestSuiteEntity and stops crashing out with a 500. There will be a separate frontend MR to render the error.~~
- Refactor out any of the metaprogramming or duplicative code in
Ci::Reports::TestReports
orCi::Reports::TestSuite
. It becomes a bit more obviously similar in this refactor, and I'd like to submit a follow-up ~"technical debt" MR to clean it up.
Screenshots
None yet, but a before and after should be up soonish.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry Documentation (if required)-
Code review guidelines -
Merge request performance guidelines -
Style guides Database guidesSeparation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. Tested in all supported browsersInformed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- ~~Label as security and @ mention
@gitlab-com/gl-security/appsec
~~ The MR includes necessary changes to maintain consistency between UI, API, email, or other methodsSecurity reports checked/validated by a reviewer from the AppSec team
Edited by Ricky Wiens