Skip to content

refactor: remove redis sentinel support and simplify redis connection handling#178

Merged
l50 merged 1 commit intomainfrom
update-src-and-tests
Apr 11, 2026
Merged

refactor: remove redis sentinel support and simplify redis connection handling#178
l50 merged 1 commit intomainfrom
update-src-and-tests

Conversation

@l50
Copy link
Copy Markdown
Contributor

@l50 l50 commented Apr 11, 2026

Key Changes:

  • Removed all Redis Sentinel-specific logic and configuration from codebase
  • Refactored Redis client helpers to support only direct Redis connections
  • Updated connection/reconnection logic to eliminate Sentinel DNS/IP refresh
  • Simplified tests and documentation to reflect direct Redis usage only

Added:

  • Manual test guide for multi-forest end-to-end operations (unrelated to
    Sentinel removal, but included in this change for completeness) -
    docs/testing/MANUAL-ESSOS.md documents manual steps for multi-domain attack
    chains

  • New manual test guide for multi-forest/Essos compromise workflow, including
    all operational steps, troubleshooting, and known issues

Changed:

  • Redis client creation helpers (create_redis_client, create_verified_redis_client)
    now use only direct Redis URL connections with optional single-connection mode

  • All references to "Sentinel" failover, stale connections, or master discovery
    replaced with generic Redis connection handling and pod restart recovery

  • Logging, comments, and error messages updated to no longer mention Sentinel

  • Task queue, orchestrator, and dispatcher logic refactored to remove
    Sentinel-specific reconnection and state reset paths

  • Documentation (codemap.md, inline code docs) updated to reflect removal
    of Sentinel features and clarify direct Redis usage

  • All Redis-related health check, retry, and reconnection logic now targets
    direct connections, not Sentinel pools or master/replica roles

  • Tests updated to remove patching and assertions related to
    invalidate_sentinel_client and Sentinel failover scenarios

  • Env var documentation and code references updated to reflect direct Redis use

Removed:

  • All Redis Sentinel support, including:
    • Sentinel connection pooling, master/replica discovery, and DNS resolution
    • invalidate_sentinel_client function and calls throughout codebase
    • Sentinel-related configuration and environment variable handling
    • Replica client and master role verification logic
    • Documentation and comments referencing Sentinel failover or pod restarts
  • Sentinel-specific error handling and reconnection logic in orchestration,
    task queues, dispatcher monitoring, and recovery modules
  • Sentinel handling and patching from all tests and test fixtures
  • Redis Sentinel configuration, DNS resolution, and all related branching logic
  • All code and tests for verifying master/replica roles and Sentinel failover
  • Sentinel-specific error keywords and handling logic across modules and tests

…ry logic

**Added:**

- Added a new manual multi-forest end-to-end test guide (`MANUAL-ESSOS.md`)
  under `docs/testing` to document required manual steps for multi-domain
  operation validation
**Changed:**

- Updated Redis connection logic to use direct Redis URL and standard
  connection parameters only
- Simplified health check, reconnection, and error recovery flows to remove
  Sentinel references, focusing on pod restart resilience
- Refactored comments, docstrings, and log messages to remove mentions of
  Sentinel and clarify connection error handling
- Adjusted tests to remove expectations for Sentinel logic, including patches,
  mocks, and error messages related to Sentinel
- Updated documentation and code comments to reflect removal of Sentinel and
  clarify Redis connection strategy

**Removed:**

- Eliminated all Redis Sentinel-specific connection logic, including detection,
  DNS resolution, and failover handling from the codebase
- Removed `invalidate_sentinel_client`, Sentinel configuration, and all
  references in `ares.core.redis_client` and related modules
- Deleted Sentinel-specific error handling, retry, and reconnection code in
  task queues, orchestrators, and dispatcher monitoring
- Removed Sentinel role verification and replica client creation logic
@dreadnode-renovate-bot dreadnode-renovate-bot Bot added area/docs Changes made to project documentation area/tests labels Apr 11, 2026
@l50 l50 merged commit b1c3fb9 into main Apr 11, 2026
8 checks passed
@l50 l50 deleted the update-src-and-tests branch April 11, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Changes made to project documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant