Check forbidden arguments in register command before calling the server
What does this MR do?
This MR swaps the order in which the register command performs operations, so that the forbidden arguments check happens before the (redundant) call to POST /runner/verify
.
Why was this MR needed?
To provide quicker feedback to the user.
What's the best way to test this MR?
Run the following command (the token value doesn't really matter):
gitlab-runner register --url http://gdk.test:3000 --token glrt-xzw5Xck7wjxjKBCP5-Mg --executor shell --tag-list shell --non-interactive
It should fail with an error message. The command should succeed however if --registration-token
is used, as this will trigger a legacy processing logic.