Add upgradeStatus to CiRunnerManager GraphQL API
What does this MR do and why?
Add upgradeStatus to CiRunnerManager GraphQL API for use in the new FE page New runner details page to support groups of ru... (#409388 - closed)
How to set up and validate locally
- Register a new runner
- in rails console run
Ci::RunnerManager.last.heartbeat({version: "15.2.2"}, update_contacted_at: true)
- for some reason, GDK has trouble accessing GitLab, see more in DNS rebinding protection does not work properly... (#413528 - closed). To workaround this, just apply this diff:
diff --git a/lib/gitlab/ci/runner_releases.rb b/lib/gitlab/ci/runner_releases.rb index a27dd3896e18..a0c01a470ba2 100644 --- a/lib/gitlab/ci/runner_releases.rb +++ b/lib/gitlab/ci/runner_releases.rb @@ -31,7 +31,7 @@ def releases expires_in: RELEASES_VALIDITY_PERIOD, race_condition_ttl: 10.seconds ) do - response = Gitlab::HTTP.try_get(runner_releases_url) + response = HTTParty.get(runner_releases_url) @releases_by_minor = nil unless response&.success?
- visit
-/graphql-explorer
and execute the following query (replace 2 with ID of your runner):query { runner(id: "gid://gitlab/Ci::Runner/2") { id managers{ edges { node { upgradeStatus } } } } }
- you should get the following response
{ "data": { "runner": { "id": "gid://gitlab/Ci::Runner/2", "managers": { "edges": [ { "node": { "upgradeStatus": "RECOMMENDED" } } ] } } } }
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #412993 (closed)
Edited by Vladimir Shushlin