Fix enabling shared runners on group
What does this MR do and why?
See https://www.loom.com/share/bd00b971405f4c3e881d5bba77c0abe8?sid=6b931414-4db4-4c7d-8995-52a02cb19773 (second half and error)
Fix enabling shared runners on group if override is allowed
In Re-enable shared runners on descendants (!124728 - merged) we started to update allow_descendants_override_disabled_shared_runners
when enabling shared runners.
It turns out that it breaks the old validation, which was validating the fact of changing the field instead of the end state.
This MR fixes the validation and adds some tests.
A few notes
- I tried to make the change minimal to fix the urgent bug before we release 16.2
- I can not simply turn off the feature flag introduced in Re-enable shared runners on descendants (!124728 - merged) because the
update
method there isn't guarded by it.
Screenshots or screen recordings
Screen_Recording_2023-07-14_at_16.59.53
How to set up and validate locally
See the recording above.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vladimir Shushlin