Skip to content

Abort rendering of security reports that aren't set up

What does this MR do?

This MR creates a new EE::MergeRequest#enabled_reports method that indicates what MR reports are enabled/disabled. We then use this data to populate the MergeRequestStore in order to abort the rendering of disabled reports in the MR widget instead of allowing the reports to show up and eventually error out when the corresponding XHR requests resolve.

This change only affects reports rendering when the corresponding *MergeRequestReportApi feature flag is enabled.

Screenshots

Here's an example where the SAST report isn't set up. With the current behavior, the SAST report renders but eventually errors out:

image

With the new behavior, the SAST report never renders (and doesn't attempt to fetch SAST reports):

image

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Paul Gascou-Vaillancourt

Merge request reports