Skip to content

Align ConnectorClientOptions with @azure/core-rest-pipeline PipelineOptions #29

Description

@daviburg

Context

The Node SDK's ConnectorClientOptions is a plain interface with hard-coded field names for retry and timeout. The .NET SDK's ConnectorClientOptions extends Azure.Core.ClientOptions, inheriting standardized retry policy configuration, transport injection, and diagnostics settings.

Parity gap

// Current Node SDK — plain interface
export interface ConnectorClientOptions {
    baseUri?: string;
    maxRetryAttempts?: number;   // bespoke name
    timeoutMs?: number;          // bespoke name
    useExponentialBackoff?: boolean;
    initialRetryDelayMs?: number;
}

// .NET SDK — extends ClientOptions
public class ConnectorClientOptions : ClientOptions {
    // Inherits: Retry.MaxRetries, Retry.Delay, Retry.MaxDelay, Transport, Diagnostics
}

Practical impact:

  • Retry config naming is non-standard (Azure SDK uses retryOptions.maxRetries, retryOptions.retryDelayInMs)
  • No transport swapping → can't inject a mock HTTP transport in tests
  • No built-in diagnostics/telemetry configuration hook

Proposed change

Convert ConnectorClientOptions from an interface to a class that aligns field names with @azure/core-rest-pipeline's PipelineOptions:

import { PipelineOptions } from "@azure/core-rest-pipeline";

export interface ConnectorClientOptions extends PipelineOptions {
    baseUri?: string;
    // retryOptions, userAgentOptions, etc. inherited from PipelineOptions
}

This is a breaking change to the options property names. Best coordinated with the @azure/core-rest-pipeline adoption issue.

Azure SDK guideline

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions