Skip to content

Ignore forbidden arguments to register if using --registration-token

What does this MR do?

This MR changes the register command slightly so that passing forbidden arguments to it when using a new glrt- token only issues a warning instead of a fatal error when the token is passed through --registration-token. The fatal error is still displayed if using the --token argument.

Why was this MR needed?

See gitlab#387993 (comment 1433301853)

What's the best way to test this MR?

Docs: https://main-runner-4157.docs.gitlab-review.app/runner/register/index.html#register-a-runner-with-a-registration-token-deprecated

gitlab-runner register --url https://gitlab.com --registration-token glrt-xzw5Xck7wjxjKBCP5-Mg --executor shell --tag-list shell --non-interactive

image

I didn't implement tests for this change since it would require non-trivial changes to testRegisterCommandRun and all the tests using it, in the end for something that is going away, meaning we would need to undo those changes in a near future. If you prefer to have coverage for this anyway, let me know and I'll add the coverage.

What are the relevant issue numbers?

#32804 (closed)

Edited by Pedro Pombeiro

Merge request reports