Skip to content

refactor(client): align ConfigGetAsync and FunctionListAsync with other GLIDE clients #495

Description

@currantw

Summary

ConfigGetAsync(ValkeyValue) and FunctionListAsync(FunctionListOptions?) in GlideClusterClient return multi-node ClusterValue<T> from AllPrimaries when no route is provided. All other GLIDE clients (Python, Java, Node) return a single value from one random node, relying on glide-core's default routing.

Description

Current C# behavior (no-route overloads):

  • ConfigGetAsync(ValkeyValue) → routes to AllPrimaries, returns ClusterValue<KeyValuePair<string, string>[]>
  • FunctionListAsync(FunctionListOptions?) → routes to AllPrimaries, returns ClusterValue<LibraryInfo[]>

Other GLIDE clients (Python, Java, Node):

  • No-route versions rely on glide-core default (Random single node), return a plain single value
  • Multi-node versions are only available when an explicit route is provided

The C# standalone client (GlideClient) already has the correct single-value signatures:

  • ConfigGetAsync(ValkeyValue)Task<KeyValuePair<string, string>[]>
  • FunctionListAsync(FunctionListOptions?)Task<LibraryInfo[]>

Proposed Solution

For both commands:

  1. Remove the no-route multi-value method from IGlideClusterClient
  2. Consolidate the single-value method into IBaseClient/BaseClient (no route, glide-core defaults to Random)
  3. Retain the cluster-only with-route overload returning ClusterValue<T>

This aligns with other GLIDE clients and the existing pattern for ConfigGetAsync(IEnumerable<ValkeyValue>) which is already consolidated in BaseClient.

Effort & Severity Estimates

  • Effort: medium
  • Severity: low

Related

Metadata

Metadata

Assignees

Labels

breakingIntroduces a breaking changecoreCore library (`sources/Valkey.Glide/`)triageNeeds triage — not yet reviewed

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions