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

New validation for REST API spec location before SDK release #7451

Merged
merged 10 commits into from
Jan 15, 2024

Conversation

raych1
Copy link
Member

@raych1 raych1 commented Dec 14, 2023

We only support the SDK release for the spec checked into 'main' branch of Azure/azure-rest-api-specs repository.

  • Added common script for validation on tsp-location.yaml (typespec case) and validation on autorest.md (swagger case)
  • Added common pipeline

@weshaggard can you review?

SDK release pipeline would run this validation to ensure the spec comes from
the main branch of Azure/azure-rest-api-specs repo
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

Copy link
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

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

This looks reasonable to me I'll leave it to Renhe to sign-off as he will have more knowledge about the content of these files.

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

[ValidateNotNullOrEmpty()]
[string] $ArtifactLocation,
[Parameter(Position = 2)]
[string]$GitHubPat = $($env:GH_TOKEN),
Copy link
Member Author

Choose a reason for hiding this comment

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

Get the token from environment variable so that it won't be leaked in the pipeline log.

@raych1
Copy link
Member Author

raych1 commented Jan 12, 2024

@weshaggard , can you also approve this PR if the change looks good?

Copy link
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

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

A couple comments but overall looks good to get started using.

@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

azure-sdk added a commit to Azure/azure-sdk-for-js that referenced this pull request Jan 15, 2024
Sync eng/common directory with azure-sdk-tools for PR
Azure/azure-sdk-tools#7451 See [eng/common
workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow)

---------

Co-authored-by: raychen <raychen@microsoft.com>
@raych1 raych1 merged commit 7edea26 into main Jan 15, 2024
11 checks passed
@raych1 raych1 deleted the user/raych1/validate-restapi-spec-location branch January 15, 2024 03:50
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
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.

None yet

8 participants