Update the test framework to use the new runner registration flow
Breaking changes to runner registration are coming in GitLab 17.x
Notable items in the rollout schedule:
- In GitLab 15.10, we plan to implement runner creation directly in the runners administration page, and prepare the runner to follow the new workflow.
- In GitLab 17.0, we plan to disable registration tokens. For self-managed instances, to continue using registration tokens, you can disable the enforce_create_runner_workflow feature flag until GitLab 18.0. Previous gitlab-runner versions (that don’t include the new system_id value) will start to be rejected by the GitLab instance;
- In GitLab 18.0, we plan to completely remove support for runner registration tokens.
The FAQ includes information about what changes users (including us) need to make. We should be able to start work immediately because 15.9 added a GraphQL mutation to create runners for the new registration flow.
See gitlab-org&7663 all the related work.
[UPDATE]
The changes made to all environments except gitlab.com
in %17.0 will be made by an application settings change, as opposed to a feature flag. This will prevent us from being able to disable the setting via a simple feature flag toggle.
The date for fully removing support is likely being pushed back quite a bit as well. We want to make sure all of our users have enough lead time to make the appropriate changes.
Tasks
-
Investigate requirements -
Perform API/version check to determine if current version supports new auth process -
New method for runner auth API endpoint (bypasses UI interaction to setup runner on GitLab side before runner installation) -
Add control flow for switching between classic runner registration and new runner authorization -
Refactor the following components to allow for switching workflows - Service::DockerRun::GitlabRunner
- Resource::RunnerBase
- Resource::GroupRunner
- Resource::ProjectRunner
Goal is to allow automatic switching between workflows as we will have some time during which we might need to support both. Both flows are supported temporarily, however the deprecated flow E2E test code will be removed in gitlab-org/gitlab#460396