Skip to content

Avoid using `Redis#keys`

Bob Van Landuyt requested to merge bvl-do-not-use-redis-keys into master

What does this MR do?

This monkey patches Redis#keys in the specs to raise an error.

That way we can avoid using it in production.

Why was this MR needed?

As @andrewn explained in https://gitlab.com/gitlab-org/gitlab-ce/issues/37383#note_43252534, KEYS iterates over each key in redis.

Does this MR meet the acceptance criteria?

  • Changelog entry added, if necessary
  • Tests added for this feature/bug
  • Review
    • Has been reviewed by Backend

What are the relevant issue numbers?

This is needed as a step to make the Circuitbreaker production ready: #37383 (closed)

Edited by Bob Van Landuyt

Merge request reports