Add warning for REDIS_NAMESPACE deprecation at startup (#34581)
Some checks are pending
JavaScript Linting / lint (push) Waiting to run
Ruby Linting / lint (push) Waiting to run
JavaScript Testing / test (push) Waiting to run
Test one step migrations / pre_job (push) Waiting to run
Test one step migrations / test (14-alpine) (push) Blocked by required conditions
Test one step migrations / test (15-alpine) (push) Blocked by required conditions
Test two step migrations / pre_job (push) Waiting to run
Test two step migrations / test (14-alpine) (push) Blocked by required conditions
Test two step migrations / test (15-alpine) (push) Blocked by required conditions
Ruby Testing / build (production) (push) Waiting to run
Ruby Testing / build (test) (push) Waiting to run
Ruby Testing / test (1, .ruby-version) (push) Blocked by required conditions
Ruby Testing / test (1, 3.1) (push) Blocked by required conditions
Ruby Testing / test (1, 3.3) (push) Blocked by required conditions
Ruby Testing / test (2, .ruby-version) (push) Blocked by required conditions
Ruby Testing / test (2, 3.1) (push) Blocked by required conditions
Ruby Testing / test (2, 3.3) (push) Blocked by required conditions
Ruby Testing / test (3, .ruby-version) (push) Blocked by required conditions
Ruby Testing / test (3, 3.1) (push) Blocked by required conditions
Ruby Testing / test (3, 3.3) (push) Blocked by required conditions
Ruby Testing / test (4, .ruby-version) (push) Blocked by required conditions
Ruby Testing / test (4, 3.1) (push) Blocked by required conditions
Ruby Testing / test (4, 3.3) (push) Blocked by required conditions
Ruby Testing / End to End testing (.ruby-version) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.1) (push) Blocked by required conditions
Ruby Testing / End to End testing (3.3) (push) Blocked by required conditions
Ruby Testing / Testing search (.ruby-version) (push) Blocked by required conditions
Ruby Testing / Testing search (3.1) (push) Blocked by required conditions
Ruby Testing / Testing search (3.3) (push) Blocked by required conditions

This commit is contained in:
Claire 2025-05-05 15:01:16 +02:00
parent 43311fd753
commit 27453ce611

View File

@ -0,0 +1,16 @@
# frozen_string_literal: true
if ENV['REDIS_NAMESPACE']
es_configured = ENV['ES_ENABLED'] == 'true' || ENV.fetch('ES_HOST', 'localhost') != 'localhost' || ENV.fetch('ES_PORT', '9200') != '9200' || ENV.fetch('ES_PASS', 'password') != 'password'
warn <<~MESSAGE
WARNING: the REDIS_NAMESPACE environment variable is deprecated and will be removed in Mastodon 4.4.0.
Please update to Mastodon 4.3 and see documentation at https://github.com/mastodon/redis_namespace_migration
MESSAGE
warn <<~MESSAGE if es_configured && !ENV['ES_PREFIX']
In addition, as REDIS_NAMESPACE is being used as a prefix for Elasticsearch, please do not forget to set ES_PREFIX to "#{ENV.fetch('REDIS_NAMESPACE')}".
MESSAGE
end