Skip to content

GitLab Version - Update Version Status Indicator

Zack Cuddy requested to merge 295266_1_5-update-version-check into master

What does this MR do and why?

Implements frontend for: #295266 (closed)
Part 1/2 for #254206 (closed)
Implements the Internal Endpoint added as part of !73504 (merged)

This change hooks up the above mentioned API to the GitLab frontend. Currently when showing version status of a GitLab instance we hit the /check.svg endpoint that returns a SVG. This type of endpoint doesn't allow us an easy way to hook up our GitLab UI styles or make changes very easily.

Instead with the new endpoint, we can obtain the raw version status data, then we can generate our own status indicator with GlBadge.

Screenshots or screen recordings

Status Badges

Before After
Help Page Help_Page_Before Help_Page_After
Admin Dashboard Admin_Page_Before Admin_Page_After

All Status Badges Variants

Type UI
Up to date
Update available
Update ASAP

No Version Check/Non-Admin

Location UI
Help Page
Admin Dashboard

How to set up and validate locally

Important: Since version_check uses ReactiveCaching you will need to "warm the cache up" when testing. This will mean that your first hit on your instance will be null. In the background the cache will be fetched/created async. So after reloading you should see the badge appear.

Important: You must be an Admin user to see the badge, it is worth testing that a non-admin will not see the badge any longer on the Help page.

Help Page:

  1. Navigate to the GitLab help page (ex. http://127.0.0.1:3000/help)
  2. Ensure the correct badge is displayed and the UI looks correct

Admin Dashboard:

  1. Navigate to the GitLab Admin Dashboard (ex. http://127.0.0.1:3000/admin)
  2. Scroll down to the Components card
  3. Ensure the correct badge is displayed and the UI looks correct

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #295266 (closed)

Edited by Zack Cuddy

Merge request reports