Skip to content

Commit aa6b8fe

Browse files
authored
Merge pull request #35 from ChenxiJiang333/update-qas
Update qas
2 parents af2acaf + 06e3b78 commit aa6b8fe

File tree

8 files changed

+569
-45
lines changed

8 files changed

+569
-45
lines changed

QA/python-0529.md

Lines changed: 327 additions & 0 deletions
Large diffs are not rendered by default.

QA/python-0626.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ azure/ai/agents/aio/operations/_operations.py:4090: [R0914(too-many-locals), Age
1111
azure/ai/agents/aio/operations/_operations.py:4475: [R0914(too-many-locals), AgentsClientOperationsMixin.update_agent] Too many local variables (27/25)
1212
azure/ai/agents/aio/operations/_operations.py:4815: [R0914(too-many-locals), AgentsClientOperationsMixin.create_thread_and_run] Too many local variables (32/25)
1313
azure/ai/agents/aio/operations/_operations.py:26: [W0611(unused-import), ] Unused import urllib.parse
14-
14+
1515
The _operations.py is straightly created by code gen. Need advise how to fix them..
1616

1717
## answer
@@ -41,18 +41,24 @@ This should address the `too-many-locals` and `unused import urllib.parse` warni
4141
Hi Language - Python,
4242
Wondering why this pipeline is failing: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4959365&view=logs&j=447d33cb-e696-5bdf-6dab-daffaacae469
4343
The pr checks were successfull…
44+
```
45+
_ ERROR collecting sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/test_cancer_profiling.py _
46+
ImportError while importing test module '/mnt/vss/_work/1/s/sdk/healthinsights/azure-healthinsights-cancerprofiling/tests/test_cancer_profiling.py'.
47+
Hint: make sure your test modules/packages have valid Python names.
48+
Traceback:
49+
.tox/mindependency/lib/python3.13/site-packages/azure/core/rest/__init__.py:27: in <module>
50+
from ._rest_py3 import (
51+
.tox/mindependency/lib/python3.13/site-packages/azure/core/rest/_rest_py3.py:40: in <module>
52+
from ._helpers import (
53+
.tox/mindependency/lib/python3.13/site-packages/azure/core/rest/_helpers.py:28: in <module>
54+
import cgi
55+
E ModuleNotFoundError: No module named 'cgi'
56+
```
4457

4558
## answer
46-
Your nightly/internal pipeline is failing due to a Python 3.13 error that’s been happening for the past couple months. The root cause is that `azure-healthinsights-cancerprofiling` specifies too old of a minimum version of `azure-core` for Python 3.13, where `cgi` was removed.
47-
48-
Your PR checks passed because you only changed `azure-healthinsights-radiologyinsights`, and the pull request build is scoped to only that package. However, internal builds are service-wide, so they include all packages in the `healthinsights` folder, even those not being released. That's why the failure surfaced internally.
49-
50-
To unblock you, I ran a build that artificially limits the build scope to only `azure-healthinsights-radiologyinsights`, which should allow you to release successfully.
59+
Your PR checks passed because you only changed `azure-healthinsights-radiologyinsights`, and the `pull request` build is scoped to only that package. However, `internal` builds are service-wide, so they include all packages in the `healthinsights` folder, even those do not have a release stage. That's why the failure is only on the `internal` build.
5160

52-
If `azure-healthinsights-cancerprofiling` is deprecated and not going to be released again, we should follow the deprecation process as outlined here:
53-
https://github.com/Azure/azure-sdk-for-python/blob/main/doc/deprecation_process.md
54-
55-
If we might need to release it again someday, we should fix the dependencies to keep it from falling into bitrot.
61+
To unblock you, please run a build that artificially limits the build scope to only `azure-healthinsights-radiologyinsights` by adding variable `BuildTargetingString` with value `azure-healthinsights-radiologyinsights`.
5662

5763
# Testing SDK PRs
5864

@@ -88,4 +94,11 @@ Once this PR passes:
8894
https://github.com/Azure/azure-sdk-for-python/pull/41724
8995

9096
You can pull from main and try regenerating. Let me know if you see any diffs in regeneration and if these diffs work out for you.
91-
97+
98+
# Releasing Python SDK
99+
100+
## question
101+
Hello Language - Python, I wanted to release a new version of my team's SDK in GA using the release planner, I wanted to ask if I had to manually run the ADO pipeline for it here (Run release SDK pipeline)[https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-pipeline]
102+
103+
## answer
104+
Since this is an ARM service, you should talk to Yuchao about the process

QA/python-0703.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The recommended approach is to create a custom error format class like:
3737
class BatchErrorFormat(ODataV4Format):
3838
# Custom parsing logic here
3939
```
40-
Then, wrap the operation call like this:
40+
Then, wrap the operation calls like this:
4141
```
4242
try:
4343
generated_client.op()
@@ -56,26 +56,22 @@ class BatchExceptionPolicy:
5656
except HttpResponseError as err:
5757
raise HttpResponseError(response=err.response, model=err.model, error_format=BatchErrorFormat) from err
5858
```
59-
This policy can be injected once into the client constructor using per_call_policies, making it a scalable and maintainable solution. No new feature is needed for this—it’s supported today.
59+
Then inject the policy into the client constructor using `per_call_policies`: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#pipeline
6060

6161
# pipeline got stuck
6262

6363
## question
6464
Hello,
65-
I have a feature branch that won't be merged to main. I just want to release it. Before I do that, I want to make sure the pipeline is green. But it is stuck currently. Could someone help?
65+
I have a feature branch that won't be merged to main. I just want to release it. Before I do that, I want to make sure the pipeline is green. But it is stuck currently. Could someone help?
6666
[Feature/azure ai agents/1.0.2 by howieleung · Pull Request #41623 · Azure/azure-sdk-for-python](https://github.com/Azure/azure-sdk-for-python/pull/41623)
6767

6868
## answer
69-
If your pipeline is stuck and you're working from a feature branch that won't be merged to main, but you still want to release it, here's what you can do:
69+
You can simply run your internal release build against the release branch. If it reaches the "approve release" phase, you're good to go, it's actually more certain than if you got a PR build to run.
7070

71-
First, although your PR has conflicts, you mentioned that rebasing isn't appropriate because the main branch contains the latest beta code, while your feature branch is for a stable release. In this case, you can simply run your internal release build against the release branch. If it reaches the "approve release" phase, you're good to go.
72-
73-
You don’t have to approve a manually queued internal build, and this is consistent with how you've handled prior stable releases. Running the pipeline as a final check is understandable, even if not strictly required.
74-
75-
If you're trying to maintain the PR build pattern, here's a recommended approach:
76-
77-
Get your release branch to the desired state, excluding changelog and version updates.
78-
Submit a PR targeting your release branch that includes the changelog and version updates.
79-
The PR build will use the merge commit from both branches in the python - pullrequest pipeline, avoiding conflicts with main.
80-
Once merged, your release branch will be in its final state, and you can queue the release build.
81-
To clarify, the release build runs all the same tests plus a few more. If your goal is to validate the final public PR, this method works well with release branches.
71+
Yet if you want to maintain the PR build pattern. I do have a recommendation how you can make that work with release branches.
72+
73+
1. Get your release branch where you want it to be minus `changelog` and `version` updates.
74+
2. Submit a PR targeting your release branch with the `changelog` and `version` updates. the PR build will use the merge commit from both your branches in the `python - pullrequest` pipeline, instead of hitting conflicts with `main`.
75+
3. Merge that. Your release branch will be in final state, which you can queue the release build for.
76+
77+
To be clear, your release build will run all the same tests + a couple more, but if it's really about the last public PR then that's how you would do it with a release branch

QA/python-0710.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## question
44
Hello Language - Python
5-
5+
66
I have code gen generated
77
```
88
class AgentsClientOperationsMixin(
@@ -18,3 +18,25 @@ The AgentsClientOperationsMixin class should not be documented or publicly expos
1818
After discussion, the Python SDK team concluded that the correct solution is to make the mixin operation group a private class. This change ensures the class is hidden from public documentation while maintaining compatibility with the generated code.
1919

2020
The issue has been tracked in https://github.com/microsoft/typespec/issues/7803, and the fix has been implemented in https://github.com/microsoft/typespec/pull/7817.
21+
22+
# Entitlement Required for SDK Generation Pipeline Access
23+
24+
## question
25+
Hi team,
26+
27+
I'm currently working on generating the Python SDK using the pipeline: (Using the SDK generation pipelines)[https://eng.ms/docs/products/azure-developer-experience/develop/sdk-generation-pipelines]. Although I have write access to the related GitHub repositories, I’m unable to access the pipeline itself.
28+
Could you please let me know which entitlement is required for this access? Thank you!
29+
30+
## answer
31+
https://aka.ms/azsdk/access
32+
```
33+
You'll need a GitHub account to contribute to Azure REST API and SDK repositories. Before you get started, be sure that you also:
34+
35+
Join the Microsoft organization on GitHub.
36+
Join the Azure organization.
37+
Check the visibility of your Microsoft and Azure org memberships.
38+
39+
If you're working on branches in the main repo for your spec, or working in the Azure SDK repositories to submit pull requests or serving as the support contact for issues, you'll need write access so that you can apply or dismiss labels, create or modify issues, and assign issues to others. It also allows you to add/update test recordings in the test assets repo.
40+
41+
To get access to Azure SDK repos, request to join the (Azure SDK Partners)[https://aka.ms/azsdk/join/azuresdkpartners] and have the request approved by your manager. After your manager approves, it may take up to one day for you to automatically be added to the (azure-sdk-partners)[https://github.com/orgs/Azure/teams/azure-sdk-partners] GitHub team. This will get you write access to all Azure SDK related repos. These membership requests will need to be renewed every 180 days.
42+
```

QA/python-0717.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
# API View Displays Incorrect Python Package Name
2-
31
## question
42
Hi team,
5-
3+
64
I am generating the Python SDK api view for sdk review meeting. After I followed the instruction here to generate Python package: [What to do after generating the SDK code with codegen · Azure/azure-sdk-for-python Wiki](https://github.com/Azure/azure-sdk-for-python/wiki/What-to-do-after-generating-the-SDK-code-with-codegen#how-to-create-package). It generate a package name like this: **azure_ai_language_text-1.0.0b1-py3-none-any.whl**, with long suffix. And after uploading it to Api view, it still keep the same long name:
75
`azure_ai_language_text-1.0.0b1-py3-none-any.whl`
86
But I noticed that in the previous version api view, the Python namespace only show simplified verison like this :
@@ -11,26 +9,25 @@ Should I manually modify the package name before uploading it to api view, or is
119

1210
## answer
1311
Hi, this is a bug in the parser and an issue is filed for it here. [[Python APIView\] manual uploads have the whl as the title name · Issue #10459 · Azure/azure-sdk-tools](https://github.com/Azure/azure-sdk-tools/issues/10459)
14-
12+
1513
I'm currently working on fixing this. Is there a particular reason for the manual upload? Otherwise, you can auto-generate the APIView with the correct name by opening up a PR in the azure-sdk-for-python repo with the changes.
1614

1715
# Python Live Test for async api
1816

1917
## question
2018
Hello Language - Python,
21-
19+
2220
We at Callautomation are working on adding live tests for the async APIs. When I tried to run a live test, I encountered an SSL certificate issue, as shown below. Could you help me understand what I might be missing?
23-
21+
2422
```
2523
except aiohttp.client_exceptions.ClientError as err:
2624
> raise ServiceRequestError(err, error=err) from err
2725
E azure.core.exceptions.ServiceRequestError: Cannot connect to host localhost:5001 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:1028)')]
28-
```
29-
26+
3027
C:\Users\v-dharmarajv\AppData\Local\Programs\Python\Python313\Lib\site-packages\azure\core\pipeline\transport\_aiohttp.py:364: ServiceRequestError
28+
```
3129

3230
## answer
3331
You're encountering an SSL certificate error when running live tests for async APIs, specifically when connecting to https://localhost:5001. This is the test proxy endpoint, and the error is likely due to certificate verification failing. Although the same code works for another team member, the issue may be caused by environment variables — either missing or incorrectly set.
3432

3533
To run live tests, make sure AZURE_TEST_RUN_LIVE is set to "true". If you also want to record, avoid setting AZURE_SKIP_LIVE_RECORDING. As a workaround for the SSL issue, set the environment variable PROXY_URL to http://localhost:5000 instead of using HTTPS. This bypasses certificate validation and resolves the issue.
36-

QA/python-0724.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ I've checked my Python installation `ensurepip` is satisfied, tried manually del
8383
But the issue still persists. Has anyone encountered this before or could share some insights? Any help would be much appreciated. Thank you!
8484

8585
## answer
86-
Maybe you could try install "uv" (here is guidance [Installation | uv](https://docs.astral.sh/uv/getting-started/installation/)) and sync with latest main branch of python sdk repo then try again.
86+
Maybe you could try install "uv" (here is guidance [Installation | uv](https://docs.astral.sh/uv/getting-started/installation/)) as a workaround and sync with latest main branch of python sdk repo then try again. I have created an issue ([python] install failure with `pip` · Issue #8113 · microsoft/typespec)[https://github.com/microsoft/typespec/issues/8113] to track it.
8787

88-
# "The date for the changelog being released must be the latest in the file."
88+
# The date for the changelog being released must be the latest in the file.
8989

9090
## question
91-
We have this PR to Main branch that updates CHANGELOG.md: https://github.com/Azure/azure-sdk-for-python/pull/42064 . The change looks correct to me... adding `## 1.0.0b13 (Unreleased)`. Yet the PR build pipeline has an error in the Analyze job titled "Verify ChangeLogEntries": https://dev.azure.com/azure-sdk/public/_build/results?buildId=5108808&view=logs&j=b70e5e73-bbb6-5567-0939-8415943fadb9&t=ac8f4042-9b76-5db4-27b1-2a4abaa9bb3c :
91+
We have this PR to Main branch that updates CHANGELOG.md: https://github.com/Azure/azure-sdk-for-python/pull/42064 . The change looks correct to me... adding `## 1.0.0b13 (Unreleased)`. Yet the PR build pipeline has an error in the Analyze job titled "Verify ChangeLogEntries":
9292
```
9393
[debug]Verifying as a release build because the changelog entry has a valid date.
9494
##[error]Invalid date [ 2025-06-23 ]. The date for the changelog being released must be the latest in the file.
@@ -104,10 +104,7 @@ We have this PR to Main branch that updates CHANGELOG.md: https://github.com/Azu
104104
Finishing: Verify ChangeLogEntries
105105
```
106106

107-
##[error]Invalid date [ 2025-06-23 ]. The date for the changelog being released must be the latest in the file.
108-
109107
Any idea why? Seems like a tool bug to me.
110108

111109
## answer
112110
The error occurred because the changelog entry for version `1.0.0b13 (Unreleased)` was added without updating the `_version.py` file. the tool gets the version from there and tries to validate the change log entry for that version. In this case it sees that version isn't the latest version in the changelog and complains (granted the error message could be better). However, the version update is what is missing. Also, looks like a lot of version increment PRs have been getting ignored. It might be worth taking these PR and then pulling them into your feature branches. However if you don't plan to use them then just close them.
113-

0 commit comments

Comments
 (0)