Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom prefix to Redis keys #298

Merged
merged 10 commits into from
Mar 4, 2024
Merged

Conversation

dmgav
Copy link
Contributor

@dmgav dmgav commented Mar 4, 2024

Description

After the code changes in this PR, RE Manager is adding an identical prefix to each Redis key. The default prefix is qs_default (the parameter name plan_queue becomes qs_default_plan_queue, etc.) A custom prefix can be passed using --redis-name-prefix CLI parameter or the redis_name_prefix parameter in the network section of the YML config file. A properly chosen prefix allows to easily distinguish between parameters created by the queue server and other applications using the same Redis server. Two instance of RE Manager using different prefix can share the same Redis server. (It is still recommended that the Redis server is running on the same machine as RE Manager).

RE Manager can still used old names without prefix. Do configure RE Manager to key names without prefix, pass "" (empty string) to the --redis-name-prefix CLI parameter or set network/redis_name_prefix key in the YML config file.

Motivation and Context

The motivations for the change:

  • keep Redis keys better organized;
  • provide an option to separate instances of RE Manager running on the same machine (not necessarily simultaneously), so that each instance could maintain it's own plan queue and history (and other parameters);
  • treat RE Manager used in unit tests as a separate instance. All unit tests are now executed using qs_unit_tests key prefix, so running unit tests do not change the plan queue and history used for manual testing and development on the same machine (each unit test clears the plan queue and history before and after the test).

Summary of Changes for Release Notes

Fixed

Added

  • RE Manager is now adding a prefix to each Redis key name. The default prefix is qs_default. Custom prefix can be passed with --redis-name-prefix CLI parameter or set as network/redis_name_prefix parameter in YML config file.

Changed

  • By default, RE Manager is adding qs_default prefix to each Redis key. To access plan queue and history created by older versions of RE Manager, pass "" (empty string) to --redis-name-prefix CLI parameter or network/redis_name_prefix parameter in the YML config file.

Removed

How Has This Been Tested?

Unit tests were added. The existing unit tests were modified.

@dmgav dmgav merged commit 0e26afe into bluesky:main Mar 4, 2024
35 checks passed
@dmgav dmgav deleted the redis-name-prefix branch March 4, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant