Skip to content

Remove setting Redis config file path via env

Gregorius Marco requested to merge mg-remove-redis-config-via-env-var-2 into master

What does this MR do and why?

This MR is to unrevert !119730 (merged).

The original MR causes a master broken incident on this job:

Run options: include {:last_run_status=>"failed"}
An error occurred in a `before(:suite)` hook.
Failure/Error: super(commands, &block)
Redis::CannotConnectError:
  No sentinels available.
# ./spec/spec_helper.rb:503:in `block in process'
# ./spec/spec_helper.rb:502:in `process'
# ./lib/gitlab/instrumentation/redis_interceptor.rb:10:in `block in call'
# ./lib/gitlab/instrumentation/redis_interceptor.rb:41:in `instrument_call'
# ./lib/gitlab/instrumentation/redis_interceptor.rb:9:in `call'
# ./lib/gitlab/redis/wrapper.rb:23:in `block in with'
# ./lib/gitlab/redis/wrapper.rb:23:in `with'
# ./spec/support/redis.rb:25:in `block (3 levels) in <main>'
# ./spec/support/redis.rb:24:in `each'
# ./spec/support/redis.rb:24:in `block (2 levels) in <main>'

The potential root cause of the failure above is due to this workaround https://gitlab.com/gitlab-org/gitlab/-/blob/209b22b8ce348a68cce588354f071074e0b83fa1/spec/config/mail_room_spec.rb#L30-38 where spec/fixtures/config/redis_new_format_host.yml is temporarily copied to config/redis.queues.yml. Other parallel jobs could read the sentinel field from the fixtures, thus resulting in No sentinels available. error.


Remove setting Redis config file path via env

Setting environment variable like GITLAB_REDIS_CACHE_CONFIG_FILE and the global GITLAB_REDIS_CONFIG_FILE for Redis config file path is no longer supported.

Changelog: removed

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports