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

[Codegen] Support v3 lro poller without backward compatibility #2954

Open
HarshaNalluru opened this issue Dec 17, 2024 · 2 comments
Open

[Codegen] Support v3 lro poller without backward compatibility #2954

HarshaNalluru opened this issue Dec 17, 2024 · 2 comments
Assignees
Labels
P1 priority 1 RLC

Comments

@HarshaNalluru
Copy link
Member

HarshaNalluru commented Dec 17, 2024

Support v3 poller without backward compatibility too

Refer to the changes at Azure/azure-sdk-for-js@15629cd

  1. Removed Imports:

    • Removed imports related to AbortSignalLike, CancelOnProgress, and CreateHttpPollerOptions from @azure/core-lro.
  2. Function Signature Changes:

    • The functions getLongRunningPoller signatures were changed:
      • The return type changed from Promise<SimplePollerLike<OperationState<TResult>, TResult>> to PollerLike<OperationState<TResult>, TResult>.
      • The parameter options type changed from CreateHttpPollerOptions<TResult, OperationState<TResult>> to GetLongRunningPollerOptions.
  3. Removed Interface:

    • The SimplePollerLike interface was removed.
  4. Added Interface:

    • Introduced a new interface GetLongRunningPollerOptions with properties intervalInMs and restoreFrom.
      export interface GetLongRunningPollerOptions {
        intervalInMs?: number;
        restoreFrom?: string;
      }
  5. Function Implementation Changes:

    • The implementation of getLongRunningPoller now returns createHttpPoller(poller, options) directly instead of wrapping it in a SimplePollerLike.

These changes simplify the poller-related code by removing backward compatibility methods and interfaces, focusing only on the v2 poller.

@HarshaNalluru
Copy link
Member Author

HarshaNalluru commented Dec 17, 2024

@HarshaNalluru
Copy link
Member Author

HarshaNalluru commented Dec 17, 2024

Clarification

  • This is for the packages that do not need backward compatibility
  • We are imagining an option/flag to be set to enable or disable this @deyaaeldeen

@HarshaNalluru HarshaNalluru changed the title [Codegen] Support v2 lro poller without backward compatibility [Codegen] Support v3 lro poller without backward compatibility Dec 17, 2024
@qiaozha qiaozha added RLC P1 priority 1 labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 priority 1 RLC
Projects
None yet
Development

No branches or pull requests

3 participants