Skip to content

Stop clearing the database cache on rake cache:clear

What does this MR do?

Takes database cache clearing out of rake cache:clear, leaving it in rake cache:clear:all

Are there points in the code the reviewer needs to double check?

Why was this MR needed?

Is the worker in fact impractical for clearing the database cache on GitLab.com? If so, we can look at versioning the cache data in a separate MR for 8.14, but this patch will at least prevent each release from giving us problems in the meantime.

Omnibus runs rake cache:clear on every release, but we want the database cache to persist across releases

Screenshots (if relevant)

gitlab-mbp:gitlab lupine$ rake --trace cache:clear
** Invoke cache:clear (first_time)
** Invoke cache:clear:redis (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute cache:clear:redis
** Execute cache:clear

gitlab-mbp:gitlab lupine$ rake --trace cache:clear:all
** Invoke cache:clear:all (first_time)
** Invoke cache:clear:db (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute cache:clear:db
** Invoke cache:clear:redis (first_time)
** Invoke environment
** Execute cache:clear:redis
** Execute cache:clear:all

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #23653 (closed) #23648 (moved) https://gitlab.com/gitlab-com/infrastructure/issues/632

/cc @yorickpeterse @stanhu

Merge request reports