Skip to content

Step 1 MR Refactor (FE): Add info/error messages to security widget summary

Why are we doing this work

Currently for a MR, after the pipeline for the MR completes, a security report summary is shown on the MR page:

ksnip_20201012-215337

We want to add descriptive information/error messages to give the user better info on what's going on with the security summary and steps they can take to fix any issues with it.

Relevant links

Mocks B5 - B6

Non-functional requirements

  • Documentation: will need to be updated to cover the new messages that can be displayed

Decisions

Implementation plan (likely out of date, see #267504 (comment 607944913))

Note that some of the unchecked items below have been drafted in a PoC MR !64608 (closed).

frontend

  • One or more security jobs failed (see PoC MR !64608 (closed))
    • The design/appearance of this alert is currently under discussion, and may still change. See this thread).
    • Design failed_jobs_alert
    • Expose/consume failures_project_pipeline_path for link to job failures
    • Add apollo query for getting security jobs' statuses. If any job has detailedStatus.text === 'failed', show the alert.
    • Probably need to add a new slot to ReportSection component between the .media element and before the body slot containing element to contain the alert
  • User's source branch is behind the target branch
  • User enabled security scanners after source branch was created (see PoC MR !64608 (closed))
    • Expose security_reports_up_to_date? method on MergeRequestPollWidgetEntity
    • Render security widget if there are any enabled_reports or if security_reports_up_to_date? is false.
    • Ensure widget displays message Security scanning detected no results for the source branch only and shows the error status rather than success status. Might require some Vuex work.
Edited by Mark Florian