Skip to content

Fix project transfer corrupting shared runners state

Adrien Kohlbecker requested to merge ak/fix-project-transfer-2 into master

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? 🤔 ) based on the database becoming inconsistent.

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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
Edited by Adrien Kohlbecker

Merge request reports

Loading