Summary of upgrade statuses for runner groups

Details

When there are groups of runners, the data we show in the UI will reflect the runner manager that has checked in last. This means that the upgrade status may change often if the last contacted runner manager changes. By displaying only one upgrade status, we could mislead users to believe all runner managers in the group are up-to-date.

Proposal

  • Collect the upgrade status for all runner managers.
  • If there is at least 1 upgrade available or recommended, we should display that as Upgrades available in the list.
  • If all runner managers are up-to-date, we should display that version in the list.
  • Designs in design management
  • Figma file

Implementation plan

  1. Make CiRunner.upgradeStatus list the max Ci::RunnerVersion.status value from all the versions from dependent Ci::RunnerMachines. Something like:

    SELECT MAX(ci_runner_versions.status)
    FROM "ci_runner_machines"
      INNER JOIN "ci_runner_versions" ON "ci_runner_versions".version = "ci_runner_machines".version
    WHERE "ci_runner_machines"."id" IN (84, 85)

    There might be cases where the runner has no associated runner managers (or they have no reported version), but the runner itself contains a version. In that case, we should use the upgrade status for the runner version (which is the current logic in EE::Types::Ci::RunnerType#upgrade_status).