Change runner type "specific" to "project"

Release notes

{placeholder for release notes}

Problem to solve

Runners have 3 types, shared, group, and specific. They are based on where runners were registered (in the admin area (shared), in a group (group), and in a project (specific). We inconsistently use shared and instance to refer to runners that were registered in the admin area. We have heard multiple internal GitLab members ask for this change to be made, and have seen confusion with GitLab users when I used shared runners in usability studies.

Proposal

Rename specific to project.

Vision

runner-terminology

List of related files

@mrincon made a first attempt at finding occurrences of shared/specific in the code, this is a list:

Click to expand

With shared/specific translatable UI strings

These files contain UI strings that mention "shared" and/or "specific" to refer to runners.

app/views/shared/runners/_runner_type_alert.html.haml
app/views/shared/runners/_shared_runners_description.html.haml
app/views/groups/runners/_runner.html.haml
app/views/groups/runners/_group_runners.html.haml
app/views/projects/runners/_shared_runners.html.haml
app/views/projects/runners/_specific_runners.html.haml

app/assets/javascripts/runner/components/runner_type_alert.vue # docs link
app/assets/javascripts/group_settings/components/shared_runners_form.vue
app/assets/javascripts/projects/settings/components/shared_runners_toggle.vue

ee/app/views/admin/projects/_shared_runner_status.html.haml
ee/app/views/namespaces/_shared_runner_status.html.haml # docs link
ee/app/views/namespaces/_shared_runners_minutes_setting.html.haml

ee/app/assets/javascripts/jobs/components/shared_runner_limit_block.vue

Only in-code shared/specific naming

These files use filenames, variables, etc... that are specific. Leaving them unchanged is possible to close this issue, but it creates friction for contributors.

app/assets/javascripts/group_settings/mount_shared_runners.js
app/assets/javascripts/pages/shared/mount_runner_aws_deployments.js
app/assets/javascripts/projects/settings/components/shared_runners_toggle.vue
app/controllers/projects/runners_controller.rb
app/helpers/ci/runners_helper.rb
app/models/ci/runner.rb # may need databse action
app/services/groups/update_shared_runners_service.rb
app/views/groups/runners/_shared_runners.html.haml
app/views/projects/runners/_group_runners.html.haml
app/views/projects/runners/_index.html.haml

lib/api/ci/runner.rb
lib/api/ci/runners.rb
lib/api/entities/ci/runner.rb
lib/gitlab/background_migration/reset_shared_runners_for_transferred_projects.rb

qa/qa/specs/features/browser_ui/4_verify/runner/register_runner_spec.rb

spec/controllers/projects/runners_controller_spec.rb
spec/features/admin/admin_runners_spec.rb
spec/features/runners_spec.rb
spec/frontend/group_settings/components/shared_runners_form_spec.js
spec/frontend/projects/settings/components/shared_runners_toggle_spec.js
spec/frontend/runner/components/runner_list_spec.js
spec/frontend/runner/components/runner_list_spec.js
spec/frontend/runner/components/runner_manual_setup_help_spec.js
spec/frontend/runner/components/runner_type_alert_spec.js # docs link
spec/frontend/runner/components/runner_type_badge_spec.js
spec/frontend/runner/components/runner_type_help_spec.js
spec/frontend/runner/runner_detail/runner_details_app_spec.js
spec/graphql/resolvers/ci/runners_resolver_spec.rb
spec/helpers/ci/runners_helper_spec.rb
spec/lib/gitlab/background_migration/reset_shared_runners_for_transferred_projects_spec.rb
spec/models/ci/runner_spec.rb
spec/requests/api/ci/runner/jobs_artifacts_spec.rb
spec/requests/api/ci/runner/jobs_put_spec.rb # reference to setting (shared_runners_enabled)
spec/requests/api/ci/runner/jobs_request_post_spec.rb
spec/requests/api/ci/runner/jobs_trace_spec.rb
spec/requests/api/ci/runners_spec.rb
spec/services/groups/update_shared_runners_service_spec.rb
spec/views/projects/runners/_specific_runners.html.haml_spec.rb
spec/views/shared/runners/_runner_details.html.haml_spec.rb

ee/app/assets/javascripts/jobs/components/shared_runner_limit_block.vue
ee/app/helpers/ee/ci/runners_helper.rb
ee/app/services/clear_namespace_shared_runners_minutes_service.rb
ee/app/views/admin/application_settings/_shared_runners_minutes_setting.html.haml
ee/app/views/namespaces/_shared_runners_minutes_settings.html.haml
ee/app/views/shared/_shared_runners_minutes_limit_flash_message.html.haml
ee/app/views/shared/_shared_runners_minutes_limit.html.haml
ee/app/workers/clear_shared_runners_minutes_worker.rb

ee/lib/gitlab/ci/minutes/runners_availability.rb

ee/spec/controllers/projects/runners_controller_spec.rb
ee/spec/features/ci_shared_runner_settings_spec.rb
ee/spec/features/ci_shared_runner_warnings_spec.rb
ee/spec/fixtures/api/schemas/job/runners.json
ee/spec/frontend/jobs/shared_runner_limit_block_spec.js
ee/spec/frontend/projects/settings/components/shared_runners_toggle_spec.js
ee/spec/helpers/ee/ci/runners_helper_spec.rb
ee/spec/lib/gitlab/ci/minutes/runners_availability_spec.rb
ee/spec/requests/api/ci/runner/jobs_put_spec.rb
ee/spec/requests/api/ci/runner/jobs_trace_spec.rb
ee/spec/services/clear_namespace_shared_runners_minutes_service_spec.rb
ee/spec/workers/clear_shared_runners_minutes_worker_spec.rb

Codebase-wide search for variable names in the project

These should tend to 0!

shared_runners_enabled 338 results in 94 files
shared_runners_disabled 28 results in 6 files 
shared_runner 1338 results in 243 files
specific_runner 64 results in 7 files

Docs (non extensive list)

doc/api/runners.md
doc/ci/runners/configure_runners.md
doc/ci/runners/index.md
doc/ci/runners/runners_scope.md
doc/ci/runners/build_cloud/linux_build_cloud.md
doc/ci/runners/build_cloud/windows_build_cloud.md

Further details

This was from previous conversations:

We need to clarify the names of the runners we provide.

Shared runner was the initial name when we had only two types:

  • shared, which was instance wide, available for all users
  • specific, which was for one or more specific projects

In the implementation, the shared runner had is_shared = true set in the database.

Then we introduced the group type.

In the implementation, we migrated from a boolean field to an enum type, with the types named as instance, group, and project.

Edited by Darren Eastman