Switch to using hosted_runners table to distinguish between runners

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Dedicated is behind so today we are using the runner creator is admin bot in the runner. We should switch this to check is the runner is a hosted_runner which is populated for dedicated only based on a parameter passed via the instrumentor.

      # On a dedicated installation we use a table to track which runners are hosted at registration time
      # TODO: after 18.0 this should change to
      # return true if ::Gitlab::CurrentSettings.gitlab_dedicated_instance? &&
      #   hosted_registration.present?
      override :dedicated_gitlab_hosted?
      def dedicated_gitlab_hosted?
        return true if ::Gitlab::CurrentSettings.gitlab_dedicated_instance? &&
          hosted_registration.present?
          creator == Users::Internal.admin_bot

        super
      end
Edited by 🤖 GitLab Bot 🤖