Skip to content

Refactor redis instrumentation specs to use standalone Redis

What does this MR do and why?

This MR refactors redis-related instrumentation specs to read from resque.yml. Currently, our CI runs shared-state/sessions/trace-chunk workloads using resque.yml but it will be updated to use config/redis.yml and connect to a Redis Cluster soon (!124256 (closed)).

This MR fixes specs that are not directly related to !124256 (closed) to keep the original MR more scoped.

When updating Gitlab Rails's shared-state workload to be compatible with Redis Cluster in !124256 (closed), redis-related instrumentation specs broke (https://gitlab.com/gitlab-org/gitlab/-/jobs/4594679529) for a number of reasons

  • In Gitlab::Instrumentation::Redis, Cache and SharedState redises would run against a Redis Cluster, preventing us from making intentional cross-slot calls for tracking purposes.
  • In Gitlab::Redis::CrossSlot, our multistore and Redis-client specs need a non-Redis-Cluster connection (which we are fast running out of)
  • In Gitlab::Instrumentation::RedisInterceptor, more specs broke when SharedState runs against a Redis Cluster since
    • auth fails differently in Redis::Cluster
    • MOVED redirections will add to read_byte size. While that is of minor concern in prod, it breaks our tests in a flaky manner.
    • Actual cross-slot calls are failing

See gitlab-com/gl-infra/scalability#2193 (closed)

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

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 Sylvester Chin

Merge request reports