Skip to content

Allow external diff files to be removed.

Nick Thomas requested to merge 37995-allow-external-diffs-to-be-removed into master

What does this MR do?

Some time ago, we added the capability to store merge request diffs in external files, rather than in the database. We have an open issue to enable this option on GitLab.com: https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/7356 , which is blocked because this is a one-way operation at present 🙀

In the event of needing to roll back a migration to external diffs, we need code that can read the diff content from the external file and re-insert it into the database. For now, it can be triggered manually in the Rails console if found to be necessary.

For this rollback to work, the external diff settings must remain present in config/gitlab.yml. To prevent the scheduler from coming along and re-migrating them back to external diffs, the enabled: true attribute must be set to enabled: false.

Screenshots

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

Closes #37995 (closed)

Edited by Nick Thomas

Merge request reports