Skip to content

Remove exception raising from JUnit parser

drew stachon requested to merge remove-exceptions-from-junit-parser into master

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.

image

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 or Ci::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

Availability and Testing

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 methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Ricky Wiens

Merge request reports