Skip to content

Add user-friendly message upon runner registration limit

What does this MR do?

This MR is a follow-up to !60157 (merged) in order to improve the error messages shown to the user in case of running against the limit when registering a runner.

Screenshots (strongly suggested)

Current state:

image

Desired state:

image

  • Command line:

    pry(main)> Plan.default.actual_limits.update!(ci_registered_project_runners: 1)
    $ curl --request POST --header "PRIVATE-TOKEN: ${TOKEN}" "http://localhost:3000/api/v4/projects/21/runners" --form "runner_id=24"
    {"message":{"assign_to":["Validation failed: Maximum number of ci registered project runners (1) exceeded"]}}

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #321368

Merge request reports