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

Added a step to validate rest api spec location before release #38332

Merged
merged 3 commits into from
Jan 26, 2024

Conversation

raych1
Copy link
Member

@raych1 raych1 commented Jan 17, 2024

The purpose is to gate on the REST API specifications used to release SDK are from the main branch of Azure/azure-rest-api-specs repository.

Added a step for the validation to the release pipeline.

The common script and pipeline are merged by another PR.
Azure/azure-sdk-tools#7451

FYI - The same change has been added to dotnet release pipeline.
Azure/azure-sdk-for-net#40783

@weidongxu-microsoft
Copy link
Member

I believe the script checks for both TypeSpec and Swagger source.

I can fix (if not already fixed) the case for TypeSpec.

From a scan run by Ray (email "REST API spec location validation for Azure SDK packages") there is some "commit not from main branch" in Swagger case.
Some of them are legacy and we probably won't release again (e.g. synapse, formrecognizer). But some may need fix from dev (e.g. communication, azure-storage-file-share).

Do we plan to require them do the fix before next release?
@srnagar @alzimmermsft

jeremymeng pushed a commit to Azure/azure-sdk-for-js that referenced this pull request Jan 19, 2024
### 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
Copy link
Member

@srnagar srnagar left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@weidongxu-microsoft weidongxu-microsoft left a comment

Choose a reason for hiding this comment

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

@raych1

I think we can merge after you check Srikanta's comment.

Added comment for the step.
@raych1
Copy link
Member Author

raych1 commented Jan 26, 2024

/check-enforcer override

@raych1 raych1 merged commit d1dd313 into main Jan 26, 2024
32 of 34 checks passed
@raych1 raych1 deleted the user/raych1/verify-spec-location branch January 26, 2024 01:05
Netyyyy pushed a commit that referenced this pull request Feb 2, 2024
* Added a step to validate rest api spec location before release

* Correct the artifactLocation parameter value

* Update archetype-java-release.yml

Added comment for the step.

(cherry picked from commit d1dd313)
Netyyyy added a commit that referenced this pull request Feb 5, 2024
* Prepare for Spring Cloud Azure 4.15.0 release (#38590)

* update version client

* update version/changelog/readme

* Added a step to validate rest api spec location before release (#38332)

* Added a step to validate rest api spec location before release

* Correct the artifactLocation parameter value

* Update archetype-java-release.yml

Added comment for the step.

(cherry picked from commit d1dd313)

* Increment versions for spring releases (#38615)

* Increment package versions for spring releases

* Update version_client.txt

* Update pom.xml

---------

Co-authored-by: Muyao Feng <92105726+Netyyyy@users.noreply.github.com>

* fix

---------

Co-authored-by: Ray Chen <raychen@microsoft.com>
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.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.

4 participants