Fix project transfer corrupting shared runners state
What does this MR do?
This MR is extracted from !47316 (merged)
See #271728 (closed)
Fixes an issue where a project transferred to a group that disables the use of shared runners can still access the shared runners.
The database is in an inconsistent state, the project below should have shared_runners_enabled: false
:
[ gprd ] production> project = Project.find_by_full_path('issue-testing/test-11_02')
=> #<Project id:22177621 issue-testing/test-11_02>>
[ gprd ] production> project.shared_runners_enabled
=> true
[ gprd ] production> project.shared_runners.count
=> 15
[ gprd ] production> project.group.shared_runners_setting
=> "disabled_and_unoverridable"
To fix this, a post-deployment migration is required to make sure the inconsistent state is reverted. Could the database folks confirm that this will indeed fix the problem on dot com and self-managed?
This was introduced in 13.5 by !36080 (merged), so I'm setting ~"Pick into 13.5" and Pick into auto-deploy (is this latter one still needed?
Screenshots (strongly suggested)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team