Skip to content

Show progress status and pipeline error states

Fernando Cardenas requested to merge 425357-add-in-progress-status into main

Description

Improves UI States for Security Reports. I was able to provide screenshots for some of the cases. The others, are tested with unit tests as they only change the text copy. They are harder to test since we poll every 30 seconds. Some of the intermediate states happen too fast between polls, but I will try to add screenshots. (The Parsing) state won't be reproducible in smaller projects since it parses quicker than our polling interval. Polling interval that we use for vs-code to fetch all the MR and branch data.

Implementation Info

  • This refactor takes export type GqlSecurityFindingReport = GetSecurityFindingsReportQuery['project']['mergeRequest']['findingReportsComparer']['report']; and goes up one level to expose the status field in findingReportsComparer. The change is propagated in all usages.
  • Secondary to that, we added additional security report states derived from both the pipelines status AND the reports comparer statuses.
  • Possible states defined in the unit tests.

Related Issues

Resolves gitlab#425357 (closed)

How has this been tested?

  • Check out the branch in this MR 425357-add-in-progress-status for the gitlab-vscode-extension
  • Clone the https://gitlab.com/gitlab-org/frontend/playground/gitlab-mr-widgets-demo project locally
  • Branch off of the test branch main-patch-cf9d from the gitlab-mr-widgets-demo project project
  • Push up main-patch-cf9d-branched to the origin.
  • Create a MR to merge main-patch-cf9d-branched to main
  • Open in vs-code the the gitlab-mr-widgets-demo project, verify the current checked out branch is main-patch-cf9d-branched
  • Open the gitlab extension and observe the UI going through state changes as the pipeline runs and completes

Local testing tips

Screenshots (if appropriate):

Status Screenshot
No Scan Results (no MR) Screenshot_2024-02-05_at_12.14.48_AM
No scan results (after pipeline fun) Screenshot_2024-02-05_at_3.38.07_PM
In Progress Screenshot_2024-02-05_at_3.22.56_PM
Parsing Screenshot_2024-02-05_at_3.27.17_PM
Completed Screenshot_2024-02-05_at_3.28.01_PM
Pipeline Canceled Screenshot_2024-02-05_at_3.56.07_PM

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)
  • Test gap
Edited by Fernando Cardenas

Merge request reports