Skip to content

fix(admin): support Redis Cluster initialization in by-admin CLI #63

Description

@zhchxiao123

What to build

Make the by-admin CLI use the same Redis Cluster-aware configuration path as worker startup, so worker lifecycle commands, agent-type admission commands, and metrics snapshots work against Redis Cluster deployments as well as standalone Redis.

Today workers can be configured with Redis Cluster via REDIS_MODE=cluster, REDIS_CLUSTER_NODES, and REDIS_KEY_SCHEMA_VERSION=v2, but the admin CLI still initializes Redis through a standalone URL-only client path. In a Cluster deployment that can fail to follow MOVED/ASK routing and leaves operators without the management surface needed to inspect or control workers.

Acceptance criteria

  • by-admin can initialize a RedisCluster client from environment configuration when REDIS_MODE=cluster, including REDIS_CLUSTER_NODES, REDIS_USERNAME, REDIS_PASSWORD, and REDIS_KEY_SCHEMA_VERSION=v2.
  • Existing standalone URL-based usage remains backward compatible for operators using BYAI_REDIS_URL or REDIS_URL.
  • Cluster mode fails fast with a clear error when REDIS_KEY_SCHEMA_VERSION is not v2, matching worker startup behavior.
  • Worker lifecycle, agent-type allow/deny, and metrics snapshot command tests cover both standalone and cluster-aware initialization paths without requiring a live Redis Cluster.
  • Documentation or CLI help makes the supported Cluster configuration path discoverable for by-admin users.

Blocked by

None - can start immediately

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions