Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GA core-lro v3 #29450

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

GA core-lro v3 #29450

wants to merge 1 commit into from

Conversation

MaryGao
Copy link
Contributor

@MaryGao MaryGao commented Apr 26, 2024

The preview pr is merged here: #29311.

GA core-lro v3:

Impacted SDKs:

  • Currently I think no SDKs would be impacted.

    • Existing HLC SDKs would use v2, no impact;
    • RLC LRO wrapped its interface with v3 and without any breakings(see pr detail), no impact;
    • Modular would use v3. The only modular SDK that is OpenAI without LRO operations, so no impact.
  • In future there would be breaking when migrating HLC to Modular.

Main changes:

- export function createHttpPoller<TResult, TState extends OperationState<TResult>>(lro: LongRunningOperation, options?: CreateHttpPollerOptions<TResult, TState>): Promise<SimplePollerLike<TState, TResult>>;
+ export function createHttpPoller<TResult, TState extends OperationState<TResult>>(lro: RunningOperation, options?: CreateHttpPollerOptions<TResult, TState>): PollerLike<TState, TResult>;

- export interface SimplePollerLike<TState extends OperationState<TResult>, TResult> {
+ export interface PollerLike<TState extends OperationState<TResult>, TResult> extends Promise<TResult> {
-    getOperationState(): TState;
+    readonly operationState: TState | undefined;
-    getResult(): TResult | undefined;
+    readonly result: TResult | undefined;
-    isDone(): boolean;
+    readonly isDone: boolean;
-    isStopped(): boolean;
-    stopPolling(): void;
-    toString(): string;
+    serialize(): Promise<string>;
+    submitted(): Promise<void>;
    onProgress(callback: (state: TState) => void): CancelOnProgress;
    poll(options?: {
        abortSignal?: AbortSignalLike;
-     }): Promise<void>;
+     }): Promise<TState>;
    pollUntilDone(pollOptions?: {
        abortSignal?: AbortSignalLike;
    }): Promise<TResult>;   
}

@MaryGao MaryGao marked this pull request as ready for review April 26, 2024 07:10
@MaryGao
Copy link
Contributor Author

MaryGao commented Apr 26, 2024

/azp run js - core - ci

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@MaryGao MaryGao requested review from bterlson and xirzec April 26, 2024 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants