Skip to content

Draft: Delete stale runners in Runner resource class

Harsha Muralidhar requested to merge hmuralidhar-delete-stale-runners-api into master

What does this MR do and why?

Runner fabrication takes up to 2 mins in production when there is stale runner build up.

[Dec 16 2022 06:20:43 UTC (QA Tests)] INFO  -- Looking for list of runners via API...
[Dec 16 2022 06:22:12 UTC (QA Tests)] INFO  -- ==> Built a QA::Resource::Runner with name 'qa-runner-1671171621' via api in 96.32 seconds

From: https://ops.gitlab.net/gitlab-org/quality/production/-/jobs/8778367

This MR adds a function to delete stale runners via API.

How to set up and validate locally

Run any spec which fabricates a runner:

WEBDRIVER_HEADLESS=false GITLAB_ADMIN_PASSWORD="xxx" GITLAB_QA_ACCESS_TOKEN=xxx GITLAB_PASSWORD="xxx" QA_DEBUG=true QA_GITLAB_URL=http://192.168.1.105:3000 bundle exec rspec ./qa/specs/features/ee/browser_ui/10_govern/security_reports_spec.rb

MR acceptance checklist

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

Merge request reports