[AutoPR azure-iot-deviceregistrysoftwareupdate]-generated-from-SDK Generation - Python-6715906 - #48623
Conversation
…ry/tspconfig.yaml', SDK Release Type: beta, and CommitSHA: '83ee12a23d0ab5a14b990f8b5700e787eb8a0b7c' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6715277 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
|
Azure Pipelines: Successfully started running 1 pipeline(s). 9 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot could not run the full agentic suite for this review because it was automatically requested on a bot-authored pull request. Request a review from Copilot under Reviewers to retry with the full agentic suite. Improved support for bot-authored pull requests is coming soon.
Adds a new generated Python client library package for “Software Update for Device Registry” and wires it into the deviceregistry CI artifact set.
Changes:
- Registered
azure-iot-deviceregistrysoftwareupdateas a CI artifact. - Added generated sync + async client, operations, models/enums, and typed-dict request/response shapes.
- Added packaging/metadata files (pyproject, manifest/license/changelog, apiview + metadata, README).
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/deviceregistry/ci.yml | Adds the new package as a build artifact in CI. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/tsp-location.yaml | Tracks the swagger/typespec input location for generation. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/pyproject.toml | Defines build system and packaging metadata/dependencies. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/dev_requirements.txt | Adds local dev dependencies for building/testing the package. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/types.py | Introduces public TypedDict request/metadata shapes. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/py.typed | Marks the package as typed (PEP 561). |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/operations/_patch.py | Provides customization hook for generated sync operations. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/operations/init.py | Exposes sync operation groups and applies patches. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/models/_patch.py | Provides customization hook for generated models. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/models/_models.py | Adds generated model classes used by the client/operations. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/models/_enums.py | Adds public enums used by models/operations. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/models/init.py | Exposes model types/enums and applies patches. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/aio/operations/_patch.py | Provides customization hook for generated async operations. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/aio/operations/_operations.py | Adds generated async operation implementations. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/aio/operations/init.py | Exposes async operation groups and applies patches. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/aio/_patch.py | Provides customization hook for generated async client surface. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/aio/_configuration.py | Adds async client configuration (policies, auth, API version). |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/aio/_client.py | Adds async client entrypoint and request sending. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/aio/init.py | Exposes async client and applies async patches. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/_version.py | Defines the package version constant. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/_utils/utils.py | Adds helper utilities (etag quoting + match headers). |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/_utils/model_base.py | Adds shared generated model base + serialization/deserialization helpers. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/_utils/init.py | Marks utils module with generator header. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/_patch.py | Provides customization hook for generated sync client surface. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/_configuration.py | Adds sync client configuration (policies, auth, API version). |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/_client.py | Adds sync client entrypoint and request sending. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/init.py | Exposes sync client + version and applies patches. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/init.py | Declares azure.iot namespace package behavior. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/init.py | Declares azure namespace package behavior. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/apiview-properties.json | Adds APIView cross-language mappings for the new package. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/api.metadata.yml | Records generation tool versions/hashes used for the API surface. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/api.md | Adds the generated API surface documentation snapshot. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/_metadata.json | Records generation metadata (apiVersion, repo commit, emitter versions). |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/README.md | Adds package README and getting-started content. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/MANIFEST.in | Defines files included in sdist/wheel. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/LICENSE | Adds the MIT license text for the package distribution. |
| sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/CHANGELOG.md | Adds initial release notes for 1.0.0b1. |
Suppressed comments (3)
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/tsp-location.yaml:1
additionalDirectories:is present but has no value. If the tooling expects a sequence, this will deserialize asnulland can cause downstream failures. Consider either removing the key or making it an explicit empty list (e.g.,additionalDirectories: []).
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/pyproject.toml:1- PEP 621 expects
licenseto be specified as a table (e.g.,{ text = \"MIT\" }or{ file = \"LICENSE\" }), not a bare string. Using the structured form improves compatibility across build backends and metadata consumers.
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/pyproject.toml:1 - The package contains
azure/__init__.pyandazure/iot/__init__.py, butpackages.findexcludesazureandazure.iot. This can produce different behavior between editable installs (where those__init__.pyexist on disk) and wheels (where those packages won’t be installed), potentially breaking namespace/package resolution. Either (a) remove theazure/__init__.py+azure/iot/__init__.pyfiles and switch to namespace package discovery, or (b) stop excludingazureandazure.iotso those namespace packages are consistently shipped.
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| python -m pip install azure-iot-deviceregistrysoftwareupdate | ||
| ``` | ||
|
|
||
| #### Prequisites |
| ``` | ||
|
|
||
| ## Examples | ||
|
|
| @overload | ||
| async def begin_import_update( | ||
| self, | ||
| import_update_request: ImportUpdateRequest, | ||
| *, | ||
| content_type: str = "application/json", | ||
| **kwargs: Any | ||
| ) -> AsyncLROPoller[None]: ... | ||
|
|
||
| @overload | ||
| async def begin_import_update( | ||
| self, | ||
| import_update_request: ImportUpdateRequest, | ||
| *, | ||
| content_type: str = "application/json", | ||
| **kwargs: Any | ||
| ) -> AsyncLROPoller[None]: ... |
This comment has been minimized.
This comment has been minimized.
…ry/tspconfig.yaml', SDK Release Type: beta, and CommitSHA: 'be4f14d4492f9f60eb6cabf3a93cce8a7cef803c' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6715906 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 39 out of 39 changed files in this pull request and generated no new comments.
Suppressed comments (8)
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/tsp-location.yaml:1
additionalDirectories:is currently parsed asnull(and includes trailing whitespace). If the tooling expects a list, this can break generation/validation. Set it explicitly to an empty list (e.g.,additionalDirectories: []) or remove the key entirely if unused.
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/README.md:12- Correct typo:
Prequisites->Prerequisites.
#### Prequisites
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/README.md:2
- The README still contains placeholder HTML comments, and the placeholder inside the Python example will render the snippet invalid if copied verbatim. Replace placeholders with a minimal working example (or remove the example block until one is available) so the README is immediately usable.
<!-- write necessary description of service -->
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/README.md:52
- The README still contains placeholder HTML comments, and the placeholder inside the Python example will render the snippet invalid if copied verbatim. Replace placeholders with a minimal working example (or remove the example block until one is available) so the README is immediately usable.
<!-- write test code here -->
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/api.md:121
- There are duplicate overload entries for
begin_import_updatewith identical signatures. This creates noise in API docs and can confuse readers. Remove the duplicate overload so each overload documents a distinct input type.
@overload
async def begin_import_update(
self,
import_update_request: ImportUpdateRequest,
*,
content_type: str = "application/json",
**kwargs: Any
) -> AsyncLROPoller[None]: ...
@overload
async def begin_import_update(
self,
import_update_request: ImportUpdateRequest,
*,
content_type: str = "application/json",
**kwargs: Any
) -> AsyncLROPoller[None]: ...
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/_utils/model_base.py:1778
- Parsing XML with
xml.etree.ElementTree.fromstringon potentially untrusted input can expose the client to XML-related DoS vectors (and the# nosecsuppresses static analysis). Consider switching todefusedxmlfor parsing, or (at minimum) add a clear comment documenting the trust boundary and why suppression is safe here.
def _deserialize_xml(
deserializer: typing.Any,
value: str,
) -> typing.Any:
element = ET.fromstring(value) # nosec
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/_client.py:30
- This PR introduces a new client library with a large surface area but does not add any tests under this package (e.g.,
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/tests). Since this repo typically has automated testing for Python SDKs, add at least a basic smoke test that constructs the client and exercises one operation using a mocked transport (sync + async) to catch breaking changes early.
class DeviceRegistrySoftwareUpdateClient: # pylint: disable=docstring-keyword-should-match-keyword-only
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/_client.py:58
- This PR introduces a new client library with a large surface area but does not add any tests under this package (e.g.,
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/tests). Since this repo typically has automated testing for Python SDKs, add at least a basic smoke test that constructs the client and exercises one operation using a mocked transport (sync + async) to catch breaking changes early.
def __init__(self, endpoint: str, credential: "TokenCredential", **kwargs: Any) -> None:
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 39 out of 39 changed files in this pull request and generated no new comments.
Suppressed comments (7)
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/tsp-location.yaml:1
additionalDirectoriesis present but has no value. If downstream tooling expects this to be a sequence (common fortsp-location.yaml), this can break parsing/iteration. Prefer setting an explicit empty list (additionalDirectories: []) or removing the key entirely when unused.
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/azure/iot/deviceregistrysoftwareupdate/py.typed:1py.typedis conventionally an empty marker file. While comments usually won't break packaging, some tooling expects the file to be empty. Consider removing the comment and leaving a zero-length file.
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/README.md:12- Correct the spelling of 'Prequisites' to 'Prerequisites'.
#### Prequisites
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/README.md:2
- The README still contains template placeholders (HTML comments) and uses inconsistent product naming/casing (e.g.,
IotvsIoT, and the service name appears unformatted/run-together). Please replace placeholders with real content and ensure the sample code block contains valid Python (remove<!-- write test code here -->and provide a minimal working example or omit the example section until it's ready).
# Azure Iot Deviceregistrysoftwareupdate client library for Python
<!-- write necessary description of service -->
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/README.md:16
- The README still contains template placeholders (HTML comments) and uses inconsistent product naming/casing (e.g.,
IotvsIoT, and the service name appears unformatted/run-together). Please replace placeholders with real content and ensure the sample code block contains valid Python (remove<!-- write test code here -->and provide a minimal working example or omit the example section until it's ready).
- An existing Azure Iot Deviceregistrysoftwareupdate instance.
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/README.md:52
- The README still contains template placeholders (HTML comments) and uses inconsistent product naming/casing (e.g.,
IotvsIoT, and the service name appears unformatted/run-together). Please replace placeholders with real content and ensure the sample code block contains valid Python (remove<!-- write test code here -->and provide a minimal working example or omit the example section until it's ready).
<!-- write test code here -->
sdk/deviceregistry/azure-iot-deviceregistrysoftwareupdate/api.md:117
- The generated API surface doc shows two identical overloads for
begin_import_update(same displayed parameter type). This is confusing for reviewers/consumers, and likely stems from the two distinct Python types (models.ImportUpdateRequestvstypes.ImportUpdateRequest) being rendered with the same short name. Prefer disambiguating the types in the doc output (fully-qualify at least one) so the overloads are meaningfully distinct.
@overload
async def begin_import_update(
self,
import_update_request: ImportUpdateRequest,
*,
content_type: str = "application/json",
**kwargs: Any
) -> AsyncLROPoller[None]: ...
@overload
async def begin_import_update(
self,
import_update_request: ImportUpdateRequest,
*,
content_type: str = "application/json",
**kwargs: Any
) -> AsyncLROPoller[None]: ...
[Pilot] PR Pipeline Failure AnalysisA CI pipeline failed on this pull request. Here is an automated analysis of what went wrong and how to get the build green. What failedThree distinct validation failures were found for
Recommended next steps
Raw pipeline analysis (azsdk ci analyze)
|
Configurations: 'specification/deviceupdate/data-plane/sudeviceregistry/tspconfig.yaml', SDK Release Type: beta, and CommitSHA: 'be4f14d4492f9f60eb6cabf3a93cce8a7cef803c' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6715906 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. Release plan link: https://azsdk-releaseplan-dashboard-hveph5aqhhcfhtgu.westus-01.azurewebsites.net/?releaseplan=36134 Submitted by: wuaustin@microsoft.com