Skip to content

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

image

Seperated Caches enabled & Protected Ref

image

Seperated Caches enabled & Not Protected Ref

image

Settings

image

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

  1. Checkout branch
  2. Start GDK
  3. Verify that Settings > CI/CD > General Pipelines has the setting for seperated caches enabled by default
  4. Start a pipeline for a protected branch
  5. Verify that the cache key has -protected appended
  6. Start a pipeline for a not protected branch
  7. Verify that the cache key has -not_protected appended
  8. Disable seperated caches in Settings > CI/CD > General Pipelines
  9. Start a pipeline for a protected branch
  10. Verify that the cache key has nothing appended
  11. Start a pipeline for a not protected branch
  12. 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.

Edited by Pedro Pombeiro

Merge request reports