As per internal discussions, we agreed to make the redis_prefix a static configuration. Using the service_id as the redis_prefix is problematic because the value is obtained from the database after migrations, but we need it during the early initialization of the application. This reverses the expected order of startup dependencies and causes problems with commands that should not require a DB connection, such as "collectstatic". Additionally, a meaningless prefix makes debugging much more difficult.
EDA is the only component following this pattern, with this PR it is in line with other components where the prefix is a static setting.
Follow up https://github.com/ansible/eda-server/pull/897 and https://github.com/ansible/eda-server/pull/926
As per internal discussions, we agreed to make the redis_prefix a static configuration. Using the service_id as the redis_prefix is problematic because the value is obtained from the database after migrations, but we need it during the early initialization of the application. This reverses the expected order of startup dependencies and causes problems with commands that should not require a DB connection, such as "collectstatic". Additionally, a meaningless prefix makes debugging much more difficult.
EDA is the only component following this pattern, with this PR it is in line with other components where the prefix is a static setting.
Internal ref: https://redhat-internal.slack.com/archives/C06S8Q06AB0/p1718889268198969?thread_ts=1717425927.035389&cid=C06S8Q06AB0