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
nixos/gitlab-runner: reload on config change #74379
Conversation
With this change it is no longer required to restart the runner on every change. Instead it can just reload it's config while running.
Is it possible to specify to the gitlab-runner where to put the lockfile? |
Yeah, writing to We could do some I left feedback upstream at https://gitlab.com/gitlab-org/gitlab-runner/issues/4876#note_253544148. If somebody would be up to do a MR implementing https://gitlab.com/gitlab-org/gitlab-runner/issues/5024, we could fetchpatch and apply to gitlab-runner until it's merged… |
We could also put the config file to |
Yes, but if we do that, it can't be updated from nix, because how do you diff state changed by gitlab-runner from intended config changes done via nix?
|
@flokli I've started to work on this: https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/1700 |
Do we want to just patch this? https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/1700/diffs?commit_id=5be5ab6eeaad6c10ef3b692df662547e60a99e88 It does seem like nobody is reacting on GitLab side. |
yes, I think we should.
Can you add a PR `fetchpatch`ing it?
|
Seems like upstream decided to remove the lock file again https://gitlab.com/gitlab-org/gitlab-runner/issues/4876#note_257319457 @flokli Do you know what state changes gitlab-runner does? The only one I know of is if you run |
The registration token is passed down to the |
gitlab-runner has been updated: #76190
|
Does anybody still want dynamic config reload? |
Yes please :-) I assume we can merge this even with https://gitlab.com/gitlab-org/gitlab-runner/issues/5024#note_273315256 being stuck. |
The current module on master is broken with gitlab-runner 12.5.0 as it tries to create a
Config.toml
lock next to it's config file, which is located in the nix store and thus not writable.This fixes this issue.
Also with this change it is no longer required to restart the runner on every
change. Instead it can just reload it's config while running.
This is an alternative to #53048 with the additional advantage that the config is located in the usual location under
/etc
.Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @max-wittig @zimbatm @globin @makefu @fpletz @flokli @bgamari