Skip to content

Comments

Changes for updating SDK to new preview version and AlwaysServe flag.#32208

Merged
Yao725 merged 11 commits intoAzure:mainfrom
imsiddhartha:dev/ssaklecha/TM-2022-04-01-preview
Nov 17, 2022
Merged

Changes for updating SDK to new preview version and AlwaysServe flag.#32208
Yao725 merged 11 commits intoAzure:mainfrom
imsiddhartha:dev/ssaklecha/TM-2022-04-01-preview

Conversation

@imsiddhartha
Copy link
Contributor

Contributing to the Azure SDK

Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.

For specific information about pull request etiquette and best practices, see this section.

@imsiddhartha
Copy link
Contributor Author

There were some pipeline failures while generating .NET SDK for TM, thanks @Yao725 for the detailed analysis:

Earlier when the stable version 1.0.0 was released, this commit was used as the source readme file from swagger repo, which means generator script will use the API file with same commit id, and you can see at that time the endpointType is just a string.

And if you navigate to the latest API file, it becomes the enum. This is the root cause of this change, if you changed a path parameter to an enum, SDK generator will automatically split them to a new resource.

For instance, previously we have a resource called TrafficManagerEndpoint, after the endpoint type explicitly marked as enum, generator will use three new resources(aka TrafficManagerAzureEndpoint, TrafficManagerExternalEndpoint and TrafficManagerNestedEndpoint) to replace the old resource. So we have the breaking changes.

This is the PR responsible for the errors: trafficmanager: adding the missing enum values for traffic manager endpoint by tombuildsstuff · Pull Request #16472 · Azure/azure-rest-api-specs (github.com)

I wonder why .NET SDK was not updated after this PR and was this accidental or it was supposed to be like that

To minimize the breaking changes and keep backward compatibility, we removed the enum definition in the autorest.md configuration and added the supported endpoint type to the parameter description, please take a look at this commit and let me know if you are ok with this change.

@imsiddhartha imsiddhartha requested review from Yao725 and m-nash and removed request for Yao725 November 15, 2022 14:03
@Yao725 Yao725 merged commit 98114d0 into Azure:main Nov 17, 2022
sofiar-msft pushed a commit to sofiar-msft/azure-sdk-for-net that referenced this pull request Dec 7, 2022
…Azure#32208)

* Changes for updating SDK to new preview version and AlwaysServe flag.

* Revert breaking changes.

* Reverting changes.

* Fix test, update API:2022-04-01-preview

* Fix build.

* minimize the breaking changes and fix the pipeline

* Revert change.

* Recorded tests against new API.

Co-authored-by: Yao Kou <yaokou@microsoft.com>
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.

3 participants