-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Added a step to validate rest api spec location before release #40783
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to understand the impact of this for libraries that are not generated. In looking over the script, a warning is generated in the case that neither an autorest nor typespec reference file is found, despite that being a legitimate scenario.
It would log a warning if the code hasn't been generated but doesn't fail the pipeline. It doesn't impact followed steps in the pipeline. |
@jsquire , I've modified the common script to halt execution silently if the configuration value is absent. This validation will only occur during a GA package release, and only if the configuration value is valid. |
Thanks. I've removed my block. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable. Please be sure to test this with the template release.
This is the test pipeline result for template service, and the result looks as expected. |
Looks like the test run is https://dev.azure.com/azure-sdk/internal/_build/results?buildId=3406027&view=logs&j=7bb69cc7-6f52-585e-8b13-5bae7c4a9fa4&t=7abbbe6b-d005-5c95-feb6-99ffe4e699e1. Have we tested it with a GA library? If we cannot easily test this we need watch this check closely over the next set of releases to ensure we don't hit any blocking bugs. |
API change check API changes are not detected in this pull request. |
@weshaggard , I modified the version to ServiceDir:template, PackageName:Azure.Template. Commit 05c4049bc22f0ec65acc18f9835132397049cb9e exists in 'main' branch of Azure/azure-rest-api-specs repository.
[debug]ServiceDir:template, PackageName:Azure.Template. 'input-file' is set as:$(this-folder)/swagger/mini-secrets.json
##[error]ServiceDir:template, PackageName:Azure.Template. Invalid file url: $(this-folder)/swagger/mini-secrets.json
##[error]PowerShell exited with code '1'. I think this PR is ready to merge. |
Ok let's be on the lookout for any fallout of this change as releases progress. |
### Purpose of this PR The purpose is to gate on the REST API specifications used to release SDK are from the main branch of [Azure/azure-rest-api-spec](https://github.com/Azure/azure-rest-api-specs). ### Packages impacted by this PR All the data plane GA packages to be released. I scanned through this JS repo and identified 11 data plane services that have released GA packages but their configuration file either `tsp-location.yaml` or `swagger\README.md` reference the REST API specs from a non-main branch of Azure spec repo. Please refer to [this spreadsheet](https://microsoftapc-my.sharepoint.com/:x:/g/personal/raychen_microsoft_com/ETMHnmWSA6VKmGouTjAITwEBqSavTLQkOcd2Ykx2eEE8_g?e=oalb1N) to get the details of all the violated packages. After this PR is merged, the next GA release for these packages will be blocked. They need to correct the spec path before releasing GA packages. ### Describe the problem that is addressed by this PR Added a pipeline from common template to release pipeline to validate the REST API specification location is from the main branch of [Azure/azure-rest-api-spec](https://github.com/Azure/azure-rest-api-specs). This validation will be skipped if the package to be released is non-GA package. ### Provide a list of related PRs The common script and pipeline were merged by another PR. Azure/azure-sdk-tools#7451 FYI - The same change has been added to other language repos' release pipelines. Azure/azure-sdk-for-net#40783 Azure/azure-sdk-for-java#38332
The purpose is to gate on the REST API specifications used to release SDK are from the
main
branch ofAzure/azure-rest-api-specs
repository.Added a step for the validation to the release pipeline.
The common script and pipeline are in another PR.
Azure/azure-sdk-tools#7451
Holding off this PR merge until the above PR is merged and synced to dotnet repository.
@weshaggard , can you review?