Skip to content

Resolve "FE: Show continuous container scanning status (project level)"

Fernando Cardenas requested to merge 368541-add-cvs-status into master

What does this MR do and why?

Introduces a Continuous Container Scanner badge/text for the project level container registry page. Group level is exluded intentionally and their is logic to guard it.

Implementation Notes

  • Associated issue #368541 (closed)
  • A graphQL endpoint doesn't exist for the needed network request
  • A public API endpoint doesn't exist, only an existing internal endpoint
  • We pass the rails generated route as the single source of truth for the correct AXIOS AJAX request path
  • We introduce the AJAX response data leveraging the Apollo Client side resolver. and the @client directive
  • Unit tests to follow once groupcontainer registry approves the initial approach

CE vs. EE

  • Additional changes added to support running in CE without issues.
  • EE only feature

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

(Only change is highlighted area)

Project Before After
Screenshot_2024-05-08_at_2.11.50_PM Screenshot_2024-05-27_at_2.33.20_PM

(No Change)

Group Before After
Screenshot_2024-05-08_at_2.14.29_PM Screenshot_2024-05-08_at_2.15.27_PM

Popover

Screenshot_2024-05-27_at_2.38.14_PM

How to set up and validate locally

EE

  • Disable feature flag :container_scanning_for_registry
  • Navigate to the Project Level container registry page
  • Observe page loads without errors and container for registry status is NOT shown, empty table is OK.

  • In EE version of gitlab Enable feature flag :container_scanning_for_registry
  • Navigate to the Project Level container registry page
  • Observe page loads without errors and container for registry status is shown, empty table is OK.

  • In EE version of gitlab Enable feature flag :container_scanning_for_registry
  • Navigate to the GROUP Level container registry page
  • Observe page loads without errors and container for registry status is NOT shown, empty table is OK.

CE/Foss

  • Disable feature flag :container_scanning_for_registry
  • Navigate to the Project Level container registry page
  • Observe page loads without errors and container for registry status is NOT shown, empty table is OK.

  • Enable feature flag :container_scanning_for_registry
  • in command line export FOSS_ONLY=1
  • Restart GDK
  • Navigate to the Project Level container registry page
  • Observe page loads without errors and container for registry status is NOT shown, empty table is OK.

  • In CE/FOSS version of gitlab Enable feature flag :container_scanning_for_registry
  • Navigate to the GROUP Level container registry page
  • Observe page loads without errors and container for registry status is NOT shown, empty table is OK.

Related to #368541 (closed)

Edited by Fernando Cardenas

Merge request reports

Loading