-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New registration flow #198
base: master
Are you sure you want to change the base?
Conversation
2fce958
to
7b6d720
Compare
I'm not very good with tests, but I imagine, that automated testing is complicated now when there's a new runner activation flow. There's no more getting an authentication token from GitLab through API. You create a runner from GitLab UI, get an authentication token there, and use it to configure your runner. |
tbh, I'm not sure if it's worth to keep all that Ruby code magic just to verify the runner. It could also just be an root@newworld:~# docker exec -it gitlab-runner gitlab-runner verify
Runtime platform arch=amd64 os=linux pid=80 revision=6428c288 version=17.2.0
Running in system-mode.
Verifying runner... is alive runner=8s7eCp3D
ERROR: Verifying runner... is removed runner=8s7eCp3D status=POST https://gitlab.example.org/api/v4/runners/verify: 403 Forbidden
FATAL: Failed to verify runners
root@newworld:~# echo $?
1 Edit: There is just no need for all the Deferred and Ruby logic, just to verify if the runner token is valid. With the new registration logic, we could switch to a simple static template file and be good. |
Technically most likely yes, we could get there in the end. My ain was not to ruin current process and leave the module backwards compatible with older runner (like 15.2 on Debian 9). Of course module states to support 11-12 though 🗡️ Anyway next version could be much simpler, by removing all that magic, yes :) |
We really don't need to support Debian 9. Debian 11 and 12 are fine. |
@juokelis I tried out your PR code in my test environment but I am getting following error. It looks weird, I ensured verify method is available in Only changes I've made to my hiera is replacing the
Any idea ? |
I used registration_token rather than token and everything worked. |
Is it really necessary to keep the backwards compatibility. The old method is quite deprecated. I would just go straight to the new much simpler solution. |
Pull Request (PR) description
New registration flow
This Pull Request (PR) fixes the following issues
Fixes #186