Pass runner_manager to destroy_conditionally! call
What does this MR do and why?
This MR changes the code handling the DELETE /runners/managers
endpoint to fix the value passed to the destroy_conditionally!
(current_runner
instead of current_runner_manager
), given that we have the problem brought up in https://gitlab.com/gitlab-com/ops-sub-department/section-ops-request-for-help/-/issues/430 and this is the only code path that even vaguely refers to a possible runner deletion in a call to that endpoint. Normally, destroy_conditionally!
should not be deleting the runner because a block is passed to the method, so resource.destroy should not be called.
So apart from fixing the value passed to destroy_conditionally!
, this MR is more to get that possibility out of the way, while we focus on other approaches such as adding better audit logs around runner deletion.
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
- Pass current_runner_manager to destroy_conditio... (#505810 - closed) • Pedro Pombeiro • 17.7
- https://gitlab.com/gitlab-com/ops-sub-department/section-ops-request-for-help/-/issues/430+
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.