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

Update LRO generation #1586

Merged
merged 12 commits into from
Jan 31, 2023
Merged

Update LRO generation #1586

merged 12 commits into from
Jan 31, 2023

Conversation

joheredi
Copy link
Member

@joheredi joheredi commented Sep 27, 2022

Porting changes from ##1568 after merging cadl-integration into main.

Updating LRO generation to the new API and adding a flag to generate using the legacy API

fixes #1598

Has dependency with issue: Azure/azure-sdk-for-js#24159

Copy link
Member

@deyaaeldeen deyaaeldeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for porting the changes! 🚀

I see there are two main failures in CI:

  • clients that still need to be regenerated, would you mind regenerating them?
  • test failures and these should be fixed once modify lro #1518 is merged in.

deyaaeldeen added a commit to Azure/azure-sdk-for-js that referenced this pull request Jan 5, 2023
…te (#24159)

### Packages impacted by this PR
@azure/core-lro

### Issues associated with this PR
[Failures](https://dev.azure.com/azure-sdk/public/_build/results?buildId=2034536&view=logs&j=71cc2e7d-6454-5bf0-71b5-f1eef07a6c23&t=f2857310-5d68-5640-1409-0ba88dcfe076&l=1299) in Azure/autorest.typescript#1586

### Describe the problem that is addressed by this PR
`poll()` always sends the polling request as long as the operation has a location to poll from. However, once the operation is in a terminal state, there is no need to send the polling request.

### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
Sending the useless polling request is not the end of the world and won't affect the state of the poller. I don't feel strongly about the change but it is nice to not do unjustified extra work.

### Are there test cases added in this PR? _(If not, why?)_
Yes.

### Provide a list of related PRs _(if any)_
N/A

### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_
- [x] Added a changelog (if necessary)
Copy link
Member

@deyaaeldeen deyaaeldeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @joheredi for porting the changes!

We still need to update RLC LROs to not throw by enabling the core-lro flag but I can do that in another PR.

Copy link
Contributor

@MaryGao MaryGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MaryGao MaryGao merged commit a9409c6 into Azure:main Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RLC] Upgrade core-lro & Turn on the option resolveOnUnsuccessful in LRO helper function
4 participants