-
Notifications
You must be signed in to change notification settings - Fork 5.4k
SDK Validation
Short Link: | aka.ms/azsdk/sdk-automation-faq |
---|
- How to Re-run SDK Validation Checks
- How to Re-evaluate
SDK Validation Status
Check - How to Download the Generated Artifacts
- How to View the Html Report of
SDK Validation
Checks Result - How to View the Detailed SDK Generation Errors
- Use Pipeline to Create SDK Pull Request from Your API Specs
- Common Error Fix Guidance
- Import Resolution Errors
- .NET SDK Generation Error Fix Guidance
To trigger a re-run of a specific SDK Validation check, add a comment in the format: /azp run SDK Validation - {Language}
For example, commenting /azp run SDK Validation - Go
will initiate a new run of the "SDK Validation - Go" check.
Re-running any SDK Validation
checks will automatically re-evaluate the SDK Validation Status
check. If you don't see any SDK Validation - {Language}
checks in your PR's checklist, it means you don't have the required permission to trigger them. Refer to the instructions at https://aka.ms/azsdk/access to get the necessary write access. Additionally, make sure your membership in the Azure
GitHub organization is set to public, for example, you can verify your membership visibility on Azure page.
Ensure the SDK Validation CI check succeeds. If the check fails, the artifacts might not have been generated.
Let's take Python as an example.
-
Navigate to
Checks
page: click on the Checks tab in the navigation pane of the pull request. -
View the SDK Validation - Python check result: click on the
SDK Validation - Python
item in the left CI check list. -
View Azure DevOps Build Pipeline Run: click on the
Pipeline result
link. -
Access Artifacts Page: click on the
artifacts
link. -
Locate Generated Artifacts: The generated artifacts for Python are located under the Packages folder.
-
Refer to the former
Steps to Download Artifacts
to download html report file. -
The html report is like this screenshot:
-
Open the Azure DevOps Build Pipeline Run: click the
Pipeline result
link. -
Examine the Pipeline Run Log: click directly on the
error
entry directly. -
Review Detailed Log Information: expand the log group immediately above the error summary group.
For detailed instructions, please refer to Using the SDK Generation Pipelines.
Error Message Pattern: error import-not-found: Couldn't resolve import '[.*].tsp'
Root Cause: The folder containing the imported TypeSpec files is not specified in the tspconfig.yaml
file's additionalDirectories
setting.
Solution Steps:
- Locate the
tspconfig.yaml
file in your TypeSpec project root - Find the
additionalDirectories
array in the configuration - Add the path to the folder containing the imported
.tsp
files - Ensure the path is relative to the
tspconfig.yaml
file location Reference: Sample tspconfig.yaml
If your pipeline run logs already outline the naming violations, simply locate the reported issues and proceed as follows:
-
Review the Pipeline Logs: Identify the naming violations highlighted in the log output.
-
Consult Naming Conventions: Familiarize yourself with the Naming Conventions guidelines to understand the expected naming rules.
-
Apply Polishing Configurations: Use the Polishing Configurations as a reference to adjust your SDK naming as per the conventions.
-
Update and Validate: Modify the specs to correct the naming issues and run the CI checks again to confirm that all violations have been resolved.