Add option to disable separated caches
What does this MR do and why?
Security Release 14.10.1 introduced the seperation of caches for protected and not protected refs. This is a breaking change for some workflows and therefore, this behaviour is made configurable here. The default is set to behave like it currently does with seperated caches
Related to #361643 (closed)
Screenshots or screen recordings
Seperated Caches disabled
Seperated Caches enabled & Protected Ref
Seperated Caches enabled & Not Protected Ref
Settings
Migration
== 20220507204024 AddSeparatedCachesOptionToProjectCiSettings: migrating ======
-- add_column(:project_ci_cd_settings, :separated_caches, :boolean, {:default=>true, :null=>false})
-> 0.0030s
== 20220507204024 AddSeparatedCachesOptionToProjectCiSettings: migrated (0.0031s)
== 20220507204024 AddSeparatedCachesOptionToProjectCiSettings: reverting ======
-- remove_column(:project_ci_cd_settings, :separated_caches, :boolean, {:default=>true, :null=>false})
-> 0.0029s
== 20220507204024 AddSeparatedCachesOptionToProjectCiSettings: reverted (0.0049s)
How to set up and validate locally
- Checkout branch
- Start GDK
- Verify that Settings > CI/CD > General Pipelines has the setting for seperated caches enabled by default
- Start a pipeline for a protected branch
- Verify that the cache key has
-protected
appended - Start a pipeline for a not protected branch
- Verify that the cache key has
-not_protected
appended - Disable seperated caches in Settings > CI/CD > General Pipelines
- Start a pipeline for a protected branch
- Verify that the cache key has nothing appended
- Start a pipeline for a not protected branch
- Verify that the cache key has nothing appended
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 Pedro Pombeiro