Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
80 changes: 80 additions & 0 deletions QA/python_2025_08_14.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# SDK Failure blocking REST spec merge - Python

## question
Not very clear, what I need to fix in the Spec for the SDK generation for Python to succeed
[Pipelines - Run 20250813.92 logs](https://dev.azure.com/azure-sdk/public/_build/results?buildId=5216426&view=logs&j=83516c17-6666-5250-abde-63983ce72a49&t=00be4b52-4a63-5865-8e02-c61723ad0692)
[Add Apimanagement 2024-10-01-preview by solankisamir · Pull Request #35659 · Azure/azure-rest-api-specs](https://github.com/Azure/azure-rest-api-specs/pull/35659/checks?check_run_id=48039897905)
```
Errors occurred while generating SDK from specification/apimanagement/resource-manager/readme.md. Follow the steps at https://aka.ms/azsdk/sdk-automation-faq#how-to-view-the-detailed-sdk-generation-errors to view detailed errors.
2025-08-13 21:33:30 [ERROR] warning | DeprecatedConfig | Using directive.31.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:30 [ERROR] warning | DeprecatedConfig | Using directive.32.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:30 [ERROR] warning | DeprecatedConfig | Using directive.33.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:30 [ERROR] warning | DeprecatedConfig | Using directive.34.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:30 [ERROR] warning | DeprecatedConfig | Using directive.35.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:30 [ERROR] warning | DeprecatedConfig | Using directive.36.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:30 [ERROR] warning | DeprecatedConfig | Using directive.37.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:30 [ERROR] (node:13140) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
2025-08-13 21:33:30 [ERROR] (Use `node --trace-deprecation ...` to show where the warning was created)
2025-08-13 21:33:30 [ERROR] info | Installing AutoRest extension '@autorest/modelerfour' (4.27.0 -> 4.27.0)
2025-08-13 21:33:30 [ERROR] info | Installed AutoRest extension '@autorest/modelerfour' (4.27.0->4.27.0)
2025-08-13 21:33:30 [ERROR] info | Installing AutoRest extension '@autorest/python' (6.38.0 -> 6.38.0)
2025-08-13 21:33:30 [ERROR] info | Installed AutoRest extension '@autorest/python' (6.38.0->6.38.0)
2025-08-13 21:33:30 [ERROR] error | [Exception] No input files provided.
2025-08-13 21:33:30 [ERROR]
2025-08-13 21:33:30 [ERROR] Use --help to get help information or see https://aka.ms/autorest/cli for additional documentation
2025-08-13 21:33:30 [ERROR] error | Error: [Exception] No input files provided.
2025-08-13 21:33:30 [ERROR]
2025-08-13 21:33:30 [ERROR] Use --help to get help information or see https://aka.ms/autorest/cli for additional documentation
2025-08-13 21:33:30 [ERROR] error | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.
2025-08-13 21:33:32 [ERROR] warning | DeprecatedConfig | Using directive.27.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:32 [ERROR] warning | DeprecatedConfig | Using directive.28.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:32 [ERROR] warning | DeprecatedConfig | Using directive.29.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:32 [ERROR] warning | DeprecatedConfig | Using directive.30.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:32 [ERROR] warning | DeprecatedConfig | Using directive.31.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:32 [ERROR] warning | DeprecatedConfig | Using directive.32.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:32 [ERROR] warning | DeprecatedConfig | Using directive.33.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:32 [ERROR] warning | DeprecatedConfig | Using directive.34.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:32 [ERROR] warning | DeprecatedConfig | Using directive.35.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:32 [ERROR] warning | DeprecatedConfig | Using directive.36.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:32 [ERROR] warning | DeprecatedConfig | Using directive.37.suppress which is deprecated and will be removed in the future.
2025-08-13 21:33:32 [ERROR] info | Loading AutoRest extension '@autorest/modelerfour' (4.27.0->4.27.0)
2025-08-13 21:33:32 [ERROR] info | Loading AutoRest extension '@autorest/python' (6.38.0->6.38.0)
2025-08-13 21:33:32 [ERROR] error | [Exception] No input files provided.
2025-08-13 21:33:32 [ERROR]
2025-08-13 21:33:32 [ERROR] Use --help to get help information or see https://aka.ms/autorest/cli for additional documentation
2025-08-13 21:33:32 [ERROR] error | Error: [Exception] No input files provided.
2025-08-13 21:33:32 [ERROR]
2025-08-13 21:33:32 [ERROR] Use --help to get help information or see https://aka.ms/autorest/cli for additional documentation
2025-08-13 21:33:32 [ERROR] error | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.
2025-08-13 21:33:32 [ERROR] Fail to generate sdk for specification/apimanagement/resource-manager/readme.md: Command '['/mnt/vss/_work/1/s/azure-rest-api-specs/node_modules/.bin/autorest', '/mnt/vss/_work/1/s/azure-rest-api-specs/specification/apimanagement/resource-manager/readme.md', '--generate-sample=True', '--generate-test=True', '--include-x-ms-examples-original-file=True', '--keep-setup-py=True', '--python', '--python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk', '--use=@autorest/[email protected]', '--use=@autorest/[email protected]', '--version=3.10.2', '--version-tolerant=False']' returned non-zero exit status 1.
2025-08-13 21:33:32 [ERROR] ======================================= Whant Can I do (begin) ========================================================================
2025-08-13 21:33:32 [ERROR] Fail to generate sdk for specification/apimanagement/resource-manager/readme.md. If you are from service team, please first check if the failure happens only to Python automation, or for all SDK automations.
2025-08-13 21:33:32 [ERROR] If it happens for all SDK automations, please double check your Swagger / Typespec, and check whether there is error in ModelValidation and LintDiff.
2025-08-13 21:33:32 [ERROR] If it happens to Python alone, you can open an issue to https://github.com/Azure/autorest.python/issues. Please include the link of this Pull Request in the issue.
2025-08-13 21:33:32 [ERROR] ======================================= Whant Can I do (end) =========================================================================
Refer to the inner logs for details or report this issue through https://aka.ms/azsdk/support/specreview-channel.
ErrorStack: Error: [EXT-ERR] Failed to read generateOutput.json. Please check if the generate script is configured correctly.
```

## answer
```diff
- Microsoft.ApiManagement/stable/2024-05-01/apimworkspaces.json
- Microsoft.ApiManagement/stable/2024-05-01/definitions.json
- Microsoft.ApiManagement/stable/2024-05-01/operationStatuses.json
-tag: package-preview-2024-06
+tag: package-preview-2024-10-01
```
I think this line is useless and may cause confusion. Please remove it.
```diff
title: ApiManagementClient
description: ApiManagement Client
openapi-type: arm
-tag: package-preview-2024-06
+tag: package-preview-2024-10-01
```
New tag package-preview-2024-10-01-preview is added and I believe you want to use the new tag?
```diff
Suggested change
-tag: package-preview-2024-10-01
+tag: package-preview-2024-10-01-preview
```
16 changes: 16 additions & 0 deletions QA/python_2025_08_21.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Untitled

## question
Hi Language - Python,
We're updating the Python SDK for the service `communication/azure-communication-messages` to include new changes using the 'tsp-client update' using a commit #. However, we do not want to include the changes in the TypeSpec specification from a previous commit since we don't want to release those to Python yet.
Is there a way to only include the latest changes and not the previous one to Python?

Thanks

## answer
Is there a SHA on Github on the RestAPI repo that represents exactly the API you want, and only that? Tsp-Client is cloning the RestAPI repo, so it cannot filter files based on anything else that git can express.

Now, if you have APIs that are merged to main, but you don't want to ship them, you will need to define a custom cliennt.tsp file to explicitly list what you want to keep, and what you won't.

If it is some API you do not want to include, you may try the @scope decorator in client.tsp
https://azure.github.io/typespec-azure/docs/libraries/typespec-client-generator-core/reference/decorators/#@Azure.ClientGenerator.Core.scope
61 changes: 61 additions & 0 deletions QA/python_2025_08_29.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Why is API version not applied when generating Python SDK with emitter?

## question
Hi team,

I have this TypeSpec PR: https://github.com/Azure/azure-rest-api-specs/blob/56fa17886b1cc3ed77c865e43f07152290367aac/specification/cognitiveservices/Language.AnalyzeText/main.tsp#L41, where I’ve added the `@versioned` decorator in `main.tsp` with multiple versions defined in an enum.

However, the generated Python SDK does not include any version information — for example, in `_operations.py` there are no `@api_version_validation` decorators on the methods (see the PR link here: [[Textanalytics] Textanalytics sdk 20250515prevew by amber-Chen-86 · Pull Request #42685 · Azure/azure-sdk-for-python](https://github.com/Azure/azure-sdk-for-python/pull/42685)).

The same TypeSpec setup works correctly for the .NET SDK, where versioning is properly recognized.
Do you know what might cause the Python emitter not to pick up the versioned information? Could this be related to having a different package name/namespace for Python?
Thank you so much!

## answer
The reason you're not seeing @api_version_validation decorators in the generated Python SDK is because all your @added decorators are applied to models. In the Python emitter, we only apply version validation to operations and parameters, not models. This is intentional — models are parsed by the service, and we rely on the service to return appropriate error messages if a model is not valid for a given version.
The @api_version_validation decorators in Python SDK are used to provide runtime validation for operations or parameters that are version-specific. For example, if an operation like analyzeThis is introduced in API version 2025, and a customer configures the client with api_version="2024", without validation they would get a 404 error. With the decorator, they instead get a clearer message like: “This operation is only available after API version 2025 or higher.”
So yes, when you see versioning reflected in the Python SDK, it's typically because entire operations or parameters were added in a new version — not just models. Since your language-text API has the same routes across all versions and only models are versioned, it makes sense that you're not seeing version-specific validation in the Python SDK.

# Pyright error in auto-generated _serialization.py (other packages) blocks my PR

## question
Hi team,

I’m hitting a Pyright failure in CI while merging a Python SDK PR. The error points to auto-generated files named `_serialization.py` in other packages (not the one I’m modifying):
```
error: Cannot access attribute "_validation" for class "function"
```
Details: https://dev.azure.com/azure-sdk/public/_build/results?buildId=5256165&view=logs&j=b70e5e73-bbb6-5567-0939-8415943fadb9&t=56d4e2e6-c43b-527c-bad7-234ebe7429dd&l=490
```
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_serialization.py
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_serialization.py:1586:52 - error: Cannot access attribute "_validation" for class "function"
Attribute "_validation" is unknown (reportFunctionMemberAccess)
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_serialization.py:1587:49 - error: Cannot access attribute "_validation" for class "function"
Attribute "_validation" is unknown (reportFunctionMemberAccess)
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_serialization.py:1593:34 - error: Cannot assign to attribute "additional_properties" for class "object"
Attribute "additional_properties" is unknown (reportAttributeAccessIssue)
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/authoring/__init__.py
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/authoring/__init__.py:24:1 - warning: Operation on "__all__" is not supported, so exported symbol list may be incorrect (reportUnsupportedDunderAll)
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/authoring/_serialization.py
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/authoring/_serialization.py:1586:52 - error: Cannot access attribute "_validation" for class "function"
Attribute "_validation" is unknown (reportFunctionMemberAccess)
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/authoring/_serialization.py:1587:49 - error: Cannot access attribute "_validation" for class "function"
Attribute "_validation" is unknown (reportFunctionMemberAccess)
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/authoring/_serialization.py:1593:34 - error: Cannot assign to attribute "additional_properties" for class "object"
Attribute "additional_properties" is unknown (reportAttributeAccessIssue)
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/authoring/_operations/__init__.py
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/authoring/_operations/__init__.py:18:1 - warning: Operation on "__all__" is not supported, so exported symbol list may be incorrect (reportUnsupportedDunderAll)
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/authoring/aio/__init__.py
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/authoring/aio/__init__.py:21:1 - warning: Operation on "__all__" is not supported, so exported symbol list may be incorrect (reportUnsupportedDunderAll)
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/authoring/aio/_operations/__init__.py
/mnt/vss/_work/1/s/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/authoring/aio/_operations/__init__.py:18:1 - warning: Operation on "__all__" is not supported, so exported symbol list may be incorrect (reportUnsupportedDunderAll)

```

I merged `main` to pick up the latest changes, but the issue persists.
Any suggestions on how to resolve this? Thanks a lot!

For reference: the PR link: [[Conv authoring] python sdk 20250515preview by amber-Chen-86 · Pull Request #42149 · Azure/azure-sdk-for-python](https://github.com/Azure/azure-sdk-for-python/pull/42149)

## answer
your PR is about azure-ai-language-conversations while the CI failure is caused by another package azure-ai-language-questionanswering so the failure is not related with your PR. You could declare the context in your PR.
Loading