Skip to content

refactor(shared): move redis_management to autobot-shared (#2313)#2469

Merged
mrveiss merged 1 commit intoDev_new_guifrom
refactor/move-redis-management
Mar 26, 2026
Merged

refactor(shared): move redis_management to autobot-shared (#2313)#2469
mrveiss merged 1 commit intoDev_new_guifrom
refactor/move-redis-management

Conversation

@mrveiss
Copy link
Owner

@mrveiss mrveiss commented Mar 26, 2026

Summary

  • Moved redis_management/ from autobot-backend/utils/ to autobot-shared/ as the canonical location
  • Backend-specific constant imports (REDIS_CONFIG, RetryConfig, TimingConstants) replaced with inline literal values
  • Backend config_manager and prometheus_metrics use lazy imports (available when running under backend, gracefully absent otherwise)
  • autobot-shared/redis_client.py updated to import from new shared location
  • Old autobot-backend/utils/redis_management/__init__.py replaced with backward-compat shim
  • Test file updated to import from new location

Files moved

  • types.py — as-is (no backend deps)
  • statistics.py — as-is (no backend deps)
  • config.py — inlined constant defaults, uses autobot_shared.network_constants
  • connection_manager.py — lazy imports for backend-specific modules

Closes #2313

Test plan

  • All pre-commit hooks pass (black, isort, flake8, bandit)
  • from utils.redis_management import RedisConnectionManager still works (backward compat shim)
  • from autobot_shared.redis_management import RedisConnectionManager works (new canonical import)
  • Redis client functionality unchanged

Move redis_management/ from autobot-backend/utils/ to autobot-shared/ so all
components share the same connection management code. Backend-specific constant
imports (REDIS_CONFIG, RetryConfig, TimingConstants) replaced with inline values.
Backend config_manager and prometheus_metrics use lazy imports.

- types.py, statistics.py: moved as-is (no backend deps)
- config.py: replaced constant imports with literal defaults
- connection_manager.py: lazy imports for config_manager and metrics
- Old __init__.py replaced with backward-compat shim
- redis_client.py updated to import from new location
@mrveiss mrveiss merged commit 8ce2c8d into Dev_new_gui Mar 26, 2026
3 of 4 checks passed
@mrveiss mrveiss deleted the refactor/move-redis-management branch March 26, 2026 16:07
@github-actions
Copy link

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

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