Skip to content

Create rake task to populate runner fleet in GDK

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR adds a rake task to generate a meaningful runner fleet for local testing. The number of runners and jobs can be configured.

Part of #385754 (closed)

TODO

  • Create rake task
  • Create group/project hierarchy
  • Create runners with random versions and ci_runner_versions records
  • Assign random tags to runners
  • Assign random executors to runners
  • Create fake jobs with actual durations

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

description screenshot
Generated hierarchy image
Admin groups page image
Admin runners page image
Group runners page image
Admin runner view image
Admin runner jobs view image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Run the following command:

bundle exec rake "gitlab:seed:runner_fleet[root, rf-]"

You can use tail -f log/application_json.log to follow the operation logs.

You should then be able to see the groups and projects (with names starting with rf- prefix), as well as runners with rf-runner tag and their jobs.

Documentation live preview

https://main-ee-107029.docs.gitlab-review.app/ee/development/rake_tasks.html#seeding-a-runner-fleet-test-environment

MR acceptance checklist

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

Edited by Pedro Pombeiro

Merge request reports

Loading