Skip to content

[AutoPR azure-iot-deviceupdate]-generated-from-SDK Generation - Python-6642486 - #48360

Merged
wuqiten merged 11 commits into
mainfrom
sdkauto/azure-iot-deviceupdate-6636753
Aug 3, 2026
Merged

[AutoPR azure-iot-deviceupdate]-generated-from-SDK Generation - Python-6642486#48360
wuqiten merged 11 commits into
mainfrom
sdkauto/azure-iot-deviceupdate-6636753

Conversation

@azure-sdk-automation

@azure-sdk-automation azure-sdk-automation Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Configurations: 'specification/deviceupdate/data-plane/duiothub/tspconfig.yaml', API Version: 2026-06-01, SDK Release Type: stable, and CommitSHA: 'a1e083316c4db68aac174e4039aa47c618ba41c1' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6642486 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=2239 Submitted by: laonyango@microsoft.com

…nfig.yaml', API Version: 2026-06-01, SDK Release Type: stable, and CommitSHA: '67ffbb6bee462e36bcdd3b93cffca6942c3a35f7' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6636753 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
Copilot AI review requested due to automatic review settings July 29, 2026 23:44
@azure-sdk-automation
azure-sdk-automation Bot requested a review from Sedols as a code owner July 29, 2026 23:44
@azure-sdk-automation azure-sdk-automation Bot added the auto-release When merged to main, release pipelines for this PR's changed packages trigger automatically. label Jul 29, 2026
@azure-pipelines

Copy link
Copy Markdown
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Regenerates the azure-iot-deviceupdate Python SDK from an updated TypeSpec source, updating generated operations/types and internal serialization/deserialization helpers.

Changes:

  • Updates the TypeSpec source commit and generator/emitter metadata for the package.
  • Introduces a new azure.iot.deviceupdate.types module (TypedDict request-body types) and updates operation signatures/docs to prefer these types over generic JSON mappings.
  • Extends duration serialization/deserialization to support numeric “seconds/milliseconds” wire formats.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
sdk/deviceupdate/azure-iot-deviceupdate/tsp-location.yaml Bumps the TypeSpec source commit used for generation.
sdk/deviceupdate/azure-iot-deviceupdate/pyproject.toml Updates packaging metadata formatting and classifier status.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/types.py Adds TypedDict request-body types for stronger typing.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/operations/_patch.py Removes custom operation patches and public exports.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/operations/_operations.py Adds delete deployment builders/ops and switches some params to new _types definitions.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/operations/_patch.py Removes async custom operation patches and public exports.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/operations/_operations.py Async equivalents of _types param updates and delete deployment ops.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_patch.py Removes async client patch that preserved constructor parameter order.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_configuration.py Updates api_version docstring (now references None/default None).
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_client.py Shortens client docstring and changes endpoint URL serialization behavior.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_utils/serialization.py Adds numeric duration (seconds/milliseconds) serializers/deserializers.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_utils/model_base.py Adds numeric duration support to Model-based serializer/deserializer map.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_patch.py Removes sync client patch that preserved constructor parameter order.
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_configuration.py Updates api_version docstring (now references None/default None).
sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_client.py Shortens client docstring and changes endpoint URL serialization behavior.
sdk/deviceupdate/azure-iot-deviceupdate/apiview-properties.json Updates API view mapping identifiers/version info after regeneration.
sdk/deviceupdate/azure-iot-deviceupdate/api.metadata.yml Updates parser/python versions and api.md hash.
sdk/deviceupdate/azure-iot-deviceupdate/api.md Reflects regenerated public API surface (notably constructor signature order and type changes).
sdk/deviceupdate/azure-iot-deviceupdate/_metadata.json Updates commit/emitter/http client python version metadata.
sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md Replaces the 1.1.0 entry with placeholder text.

Comment thread sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_patch.py Outdated
Comment thread sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/types.py Outdated
Comment thread sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md Outdated
@github-actions

This comment has been minimized.

Copilot AI review requested due to automatic review settings July 30, 2026 19:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 72 out of 74 changed files in this pull request and generated 8 comments.

Comments suppressed due to low confidence (9)

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/models/init.py:1

  • Deleting this initializer removes all previously public models and enums from azure.iot.deviceupdate.models (for example Update, Deployment, and DownloadSecurity). Since the package remains a stable 1.1.0 release, this is a breaking API removal; regenerate or preserve the public model exports.
    sdk/deviceupdate/azure-iot-deviceupdate/tests/test_updates_service.py:25
  • These tests now call self.assertTrue, self.assertEqual, self.assertIsNotNone, and self.fail, but the repository-supported AzureRecordedTestCase base does not provide unittest assertion methods. After fixing the invalid AzureTestCase import, every such call still fails; retain pytest assertions (including pytest.fail) or explicitly use a compatible test base.
    sdk/deviceupdate/azure-iot-deviceupdate/tests/test_management_service.py:23
  • These tests were converted to unittest-style self.assert*/self.fail calls, but the supported AzureRecordedTestCase base does not implement those methods. Once the invalid base-class import is corrected, the tests still fail at runtime; keep the original pytest assertions or use a compatible test base.
    sdk/deviceupdate/azure-iot-deviceupdate/samples/sample_list_updates.py:19
  • The sample now reads DEVICEUPDATE_ACCOUNT_ENDPOINT, but its setup comment still tells users to define DEVICEUPDATE_ENDPOINT. Following the documented prerequisites therefore exits through the missing-variable path.
    sdk/deviceupdate/azure-iot-deviceupdate/samples/sample_get_update.py:20
  • The code expects DEVICEUPDATE_ACCOUNT_ENDPOINT, while the sample instructions above still specify DEVICEUPDATE_ENDPOINT. Align the documented variable with the one actually read so the sample can be configured correctly.
    sdk/deviceupdate/azure-iot-deviceupdate/sdk_packaging.toml:5
  • The PR declares a stable release and _version.py/CHANGELOG use stable version 1.1.0, but this flag marks the package as preview for packaging automation. Set the stability metadata consistently for this release.
    sdk/deviceupdate/azure-iot-deviceupdate/setup.py:47
  • The distribution is versioned as stable 1.1.0, but this classifier advertises it as Beta. This produces inconsistent PyPI metadata for the stable release requested by the PR.
    sdk/deviceupdate/azure-iot-deviceupdate/setup.py:73
  • This lowers the package's declared minimum from Python 3.10 to the long-unsupported Python 3.6, while retaining stable version 1.1.0. Installers on 3.6–3.9 can now select a release that this repository no longer validates; keep >=3.10 and remove the obsolete 3.6–3.9 classifiers above.
    sdk/deviceupdate/azure-iot-deviceupdate/samples/sample_get_device.py:17
  • The new sample documents DEVICEUPDATE_ENDPOINT but reads DEVICEUPDATE_ACCOUNT_ENDPOINT, so users following the comment receive the missing-environment-variable error. Use one variable name consistently.

Comment thread sdk/deviceupdate/azure-iot-deviceupdate/tests/test_updates_service.py Outdated
Comment thread sdk/deviceupdate/azure-iot-deviceupdate/swagger/README.md Outdated
Comment thread sdk/deviceupdate/azure-iot-deviceupdate/tests/test_management_service.py Outdated
Comment thread sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_configuration.py Outdated
Comment thread sdk/deviceupdate/azure-iot-deviceupdate/tests/testcase.py Outdated
Copilot AI review requested due to automatic review settings July 30, 2026 19:56
@wuqiten
wuqiten force-pushed the sdkauto/azure-iot-deviceupdate-6636753 branch from 00de36c to 2789d56 Compare July 30, 2026 19:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (7)

sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md:5

  • This generator instruction is not release history and replaces the existing 1.1.0 feature notes. Add a user-facing summary of the API/client changes before releasing the package.
skip changelog generation for data-plane package and please add changelog manually.

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/operations/_patch.py:158

  • This generated paging operation is synchronous and returns AsyncItemPaged; wrapping it with async def changes the call result into a coroutine. Existing async for item in client.device_management.list_device_class_subgroups_for_group(...) calls will fail unless callers unexpectedly await the method first. Keep this wrapper as a regular function, like the other async paging wrappers above.
    async def legacy_list_device_class_subgroups(self, group_id, *, filter=None, **kwargs):
        return list_device_class_subgroups(self, group_id, filter=filter, **kwargs)

sdk/deviceupdate/azure-iot-deviceupdate/pyproject.toml:20

  • The package version is stable (1.1.0) and tool.azure-sdk-build.is_stable is true, but this classifier marks the distribution as beta. This also conflicts with the PR's stable release type and will publish inconsistent package metadata.
    "Development Status :: 4 - Beta",

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_patch.py:28

  • The previous stable constructor accepted api_version=None and deliberately omitted it so the generated default was used. This wrapper now forwards None through kwargs; the configuration stores it, and request builders then raise while serializing the required api-version query value. Preserve the explicit keyword and only forward non-None values.
    def legacy_init(self, endpoint: str, instance_id: str, credential: Any, **kwargs: Any) -> None:
        generated_init(self, endpoint=endpoint, credential=credential, instance_id=instance_id, **kwargs)

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_patch.py:28

  • The previous stable async constructor accepted api_version=None and deliberately omitted it so the generated default was used. This wrapper now forwards None through kwargs; the configuration stores it, and request builders then raise while serializing the required api-version query value. Preserve the explicit keyword and only forward non-None values.
    def legacy_init(self, endpoint: str, instance_id: str, credential: Any, **kwargs: Any) -> None:
        generated_init(self, endpoint=endpoint, credential=credential, instance_id=instance_id, **kwargs)

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/operations/_patch.py:37

  • This no longer preserves the legacy raw If-None-Match value: the generated prep_if_none_match path quotes non-wildcard ETags (_utils/utils.py:34-37), whereas the removed implementation forwarded the header unchanged. Keep setting the raw header directly so existing calls retain their wire behavior.
def _conditional_kwargs(if_none_match: Optional[str], kwargs: dict[str, Any]) -> dict[str, Any]:
    if if_none_match is not None:
        kwargs["etag"] = if_none_match
        kwargs["match_condition"] = MatchConditions.IfModified
    return kwargs

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/operations/_patch.py:37

  • This no longer preserves the legacy raw If-None-Match value: the generated prep_if_none_match path quotes non-wildcard ETags (_utils/utils.py:34-37), whereas the removed implementation forwarded the header unchanged. Keep setting the raw header directly so existing async calls retain their wire behavior.

This issue also appears on line 157 of the same file.

def _conditional_kwargs(if_none_match: Optional[str], kwargs: dict[str, Any]) -> dict[str, Any]:
    if if_none_match is not None:
        kwargs["etag"] = if_none_match
        kwargs["match_condition"] = MatchConditions.IfModified
    return kwargs

@github-actions

This comment has been minimized.

Copilot AI review requested due to automatic review settings July 30, 2026 20:52
@wuqiten
wuqiten force-pushed the sdkauto/azure-iot-deviceupdate-6636753 branch from 2789d56 to ee326b8 Compare July 30, 2026 20:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (7)

sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md:5

  • This is a generation placeholder rather than release history. Publishing 1.1.0 with it leaves customers without any description of the API/customization changes, so it needs to be replaced with the actual release notes before release.
skip changelog generation for data-plane package and please add changelog manually.

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/operations/_patch.py:157

  • The generated async paging method is a regular function that immediately returns AsyncItemPaged; wrapping it in async def changes the API into a coroutine. Existing callers that use async for directly on list_device_class_subgroups_for_group(...) will fail because they now receive a coroutine instead of an async iterable.
    async def legacy_list_device_class_subgroups(self, group_id, *, filter=None, **kwargs):

sdk/deviceupdate/azure-iot-deviceupdate/pyproject.toml:20

  • The PR is marked as a stable release, and this package also has is_stable = true, but the classifier now advertises it as Beta. This will publish contradictory stability metadata; keep the production/stable classifier for version 1.1.0.
    "Development Status :: 4 - Beta",

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_patch.py:28

  • The prior public constructor treated api_version=None as “use the default.” This wrapper now forwards that value, so configuration stores None and operations subsequently try to serialize it into the required api-version query parameter, raising a serialization error. Preserve the previous handling of explicit None.
    def legacy_init(self, endpoint: str, instance_id: str, credential: Any, **kwargs: Any) -> None:
        generated_init(self, endpoint=endpoint, credential=credential, instance_id=instance_id, **kwargs)

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_patch.py:28

  • The prior public constructor treated api_version=None as “use the default.” This wrapper now forwards that value, so configuration stores None and operations subsequently try to serialize it into the required api-version query parameter, raising a serialization error. Preserve the previous handling of explicit None.
    def legacy_init(self, endpoint: str, instance_id: str, credential: Any, **kwargs: Any) -> None:
        generated_init(self, endpoint=endpoint, credential=credential, instance_id=instance_id, **kwargs)

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/operations/_patch.py:139

  • This wrapper removes the explicit filter keyword from the public signature even though list_device_classes has supported and documented it since 1.0.0. Calls still work only through **kwargs, but the stable API surface and generated documentation no longer expose the supported parameter; retain it explicitly and forward it.

This issue also appears on line 157 of the same file.

    def legacy_list_device_classes(self, **kwargs):
        return list_device_classes(self, **kwargs)

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/operations/_patch.py:138

  • This wrapper removes the explicit filter keyword from the public signature even though list_device_classes has supported and documented it since 1.0.0. Calls still work only through **kwargs, but the stable API surface and generated documentation no longer expose the supported parameter; retain it explicitly and forward it.
    def legacy_list_device_classes(self, **kwargs):
        return list_device_classes(self, **kwargs)

Copilot AI review requested due to automatic review settings July 30, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (7)

sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md:5

  • The release notes still contain the generator's action placeholder instead of describing the 1.1.0 changes. This text would be published to customers through the package long description; replace it with the actual features, breaking changes, and dependency/support updates before release.
skip changelog generation for data-plane package and please add changelog manually.

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_configuration.py:34

  • This documentation now says the async configuration defaults to None, but __init__ still uses kwargs.pop("api_version", "2026-06-01") at line 39. Document the actual default so generated reference docs do not give callers contradictory behavior.
    :keyword api_version: The API version to use for this operation. Known values are "2026-06-01"
     and None. Default value is None. If not set, the operation's default API version will be used.
     Note that overriding this default value may result in unsupported behavior.

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_configuration.py:34

  • This documentation now says the configuration defaults to None, but __init__ still uses kwargs.pop("api_version", "2026-06-01") at line 39. Document the actual default so generated reference docs do not give callers contradictory behavior.
    :keyword api_version: The API version to use for this operation. Known values are "2026-06-01"
     and None. Default value is None. If not set, the operation's default API version will be used.
     Note that overriding this default value may result in unsupported behavior.

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/operations/_patch.py:158

  • The generated async paging method is a regular def returning AsyncItemPaged, as shown in _operations.py:3052-3054. Wrapping it in async def changes this API to return a coroutine, so callers can no longer use the normal async for item in client.device_management.list_device_class_subgroups_for_group(...) pattern. Keep this wrapper synchronous like the other async paging wrappers above.
    async def legacy_list_device_class_subgroups(self, group_id, *, filter=None, **kwargs):
        return list_device_class_subgroups(self, group_id, filter=filter, **kwargs)

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_patch.py:32

  • This compatibility wrapper removes the explicit api_version keyword and no longer preserves the previous behavior of treating api_version=None as omitted. If an existing caller explicitly passes None, it reaches the configuration and later raises ValueError while serializing the required api-version query value. Preserve the public keyword and forward it only when non-None.
    def __init__(self, endpoint: str, instance_id: str, credential: TokenCredential, **kwargs: Any) -> None:
        generated_init(self, endpoint=endpoint, credential=credential, instance_id=instance_id, **kwargs)

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_patch.py:32

  • This async compatibility wrapper removes the explicit api_version keyword and no longer preserves the previous behavior of treating api_version=None as omitted. If an existing caller explicitly passes None, it reaches the configuration and later raises ValueError while serializing the required api-version query value. Preserve the public keyword and forward it only when non-None.
    def __init__(self, endpoint: str, instance_id: str, credential: AsyncTokenCredential, **kwargs: Any) -> None:
        generated_init(self, endpoint=endpoint, credential=credential, instance_id=instance_id, **kwargs)

sdk/deviceupdate/azure-iot-deviceupdate/pyproject.toml:20

  • This stable 1.1.0 package is marked is_stable = true at line 74, so the Beta classifier mislabels the release on package indexes. Keep the classifier consistent with the stable version and packaging metadata.
    "Development Status :: 4 - Beta",

@github-actions

This comment has been minimized.

…nfig.yaml', API Version: 2026-06-01, SDK Release Type: stable, and CommitSHA: 'a1e083316c4db68aac174e4039aa47c618ba41c1' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6642486 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
Copilot AI review requested due to automatic review settings July 30, 2026 23:14
@azure-sdk-automation azure-sdk-automation Bot changed the title [AutoPR azure-iot-deviceupdate]-generated-from-SDK Generation - Python-6636753 [AutoPR azure-iot-deviceupdate]-generated-from-SDK Generation - Python-6642486 Jul 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 21 out of 23 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (4)

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_utils/serialization.py:1117

  • If isodate.parse_duration returns an isodate.Duration (not datetime.timedelta), value becomes an isodate.Duration object and int(value) / float(value) will raise TypeError. Since non-timedelta ISO durations can include months/years, you should either (a) explicitly reject non-datetime.timedelta durations with a clear exception, or (b) convert isodate.Duration to a timedelta only when it’s safely representable (e.g., no months/years component) before computing numeric seconds/milliseconds.
    @staticmethod
    def _serialize_duration_numeric(attr, scale, as_int):

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_utils/serialization.py:1129

  • If isodate.parse_duration returns an isodate.Duration (not datetime.timedelta), value becomes an isodate.Duration object and int(value) / float(value) will raise TypeError. Since non-timedelta ISO durations can include months/years, you should either (a) explicitly reject non-datetime.timedelta durations with a clear exception, or (b) convert isodate.Duration to a timedelta only when it’s safely representable (e.g., no months/years component) before computing numeric seconds/milliseconds.
        if isinstance(attr, str):
            attr = isodate.parse_duration(attr)
        value = attr.total_seconds() * scale if isinstance(attr, datetime.timedelta) else attr
        return int(value) if as_int else float(value)

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_configuration.py:34

  • Docstring lists None as a 'known value' for api_version, which reads like it's a valid wire API version. Since None here means 'unset' (use default), consider rewording to avoid implying None is an API version value (e.g., document it as an optional parameter where None uses the client/operation default).
    :keyword api_version: The API version to use for this operation. Known values are "2026-06-01"
     and None. Default value is None. If not set, the operation's default API version will be used.
     Note that overriding this default value may result in unsupported behavior.

sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md:5

  • The 1.1.0 section currently contains a placeholder instruction rather than user-facing release notes. Replace this with an actual changelog entry describing the shipped changes—especially any breaking API surface changes shown in api.md—so consumers can assess impact and upgrade safely.
## 1.1.0 (2026-07-30)

skip changelog generation for data-plane package and please add changelog manually.

Comment thread sdk/deviceupdate/azure-iot-deviceupdate/api.md
Comment thread sdk/deviceupdate/azure-iot-deviceupdate/api.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 21 out of 24 changed files in this pull request and generated 1 comment.

Suppressed comments (6)

sdk/deviceupdate/azure-iot-deviceupdate/api.md:84

  • This regeneration removes the public Deployment model overload and returns untyped JSON; the same happens for all model-backed inputs and responses, and the entire public models package is deleted. That is a much broader breaking API removal than the changelog records and is not compatible with a stable 1.1.0 release. Preserve the existing model surface via TypeSpec/emitter customization, or treat and document this as an approved major-version break.
                deployment: JSON, 
                *, 
                content_type: str = "application/json", 
                **kwargs: Any
            ) -> JSON: ...

sdk/deviceupdate/azure-iot-deviceupdate/pyproject.toml:20

  • This stable package is marked is_stable = true, but the classifier now advertises it as Beta. That publishes contradictory stability metadata; keep the Production/Stable classifier for the stated stable release.
    "Development Status :: 4 - Beta",

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_configuration.py:34

  • The documented default is incorrect: the constructor immediately defaults api_version to "2026-06-01" on line 39, so it is never None when omitted. Document the actual default to avoid misleading callers.
    :keyword api_version: The API version to use for this operation. Known values are "2026-06-01"
     and None. Default value is None. If not set, the operation's default API version will be used.
     Note that overriding this default value may result in unsupported behavior.

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_configuration.py:34

  • The documented default is incorrect: the async configuration constructor defaults api_version to "2026-06-01" on line 39, not None. Document the actual default so the async API contract matches its implementation.
    :keyword api_version: The API version to use for this operation. Known values are "2026-06-01"
     and None. Default value is None. If not set, the operation's default API version will be used.
     Note that overriding this default value may result in unsupported behavior.

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_client.py:31

  • The public client documentation has regressed from a service description to a tautology, so generated reference docs no longer explain what the client is for. Restore the Device Update for IoT Hub description in the TypeSpec source and regenerate this client.
    """DeviceUpdateClient.

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_client.py:31

  • The async public client documentation has likewise regressed to only the class name, removing the service description from generated reference docs. Restore the description in TypeSpec and regenerate the async client.
    """DeviceUpdateClient.

Comment thread sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md
@github-actions

This comment has been minimized.

Copilot AI review requested due to automatic review settings July 31, 2026 19:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 21 out of 23 changed files in this pull request and generated no new comments.

Suppressed comments (3)

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_configuration.py:34

  • This now documents None as the default, but the constructor still executes kwargs.pop("api_version", "2026-06-01"). Document the actual 2026-06-01 default so users are not misled about client behavior.
    :keyword api_version: The API version to use for this operation. Known values are "2026-06-01"
     and None. Default value is None. If not set, the operation's default API version will be used.
     Note that overriding this default value may result in unsupported behavior.

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_configuration.py:34

  • This now documents None as the default, but the async constructor still executes kwargs.pop("api_version", "2026-06-01"). Document the actual 2026-06-01 default so users are not misled about client behavior.
    :keyword api_version: The API version to use for this operation. Known values are "2026-06-01"
     and None. Default value is None. If not set, the operation's default API version will be used.
     Note that overriding this default value may result in unsupported behavior.

sdk/deviceupdate/azure-iot-deviceupdate/pyproject.toml:20

  • The PR is configured as a stable 1.1.0 release, and [packaging].is_stable is also true, but this changed classifier publishes it as Beta. Restore the stable classifier so package metadata matches the release type.
    "Development Status :: 4 - Beta",

@github-actions

This comment has been minimized.

Copilot AI review requested due to automatic review settings July 31, 2026 20:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 21 out of 23 changed files in this pull request and generated no new comments.

Suppressed comments (2)

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_configuration.py:34

  • This now documents None as an accepted/default API version, but the constructor still defaults api_version to "2026-06-01" on line 39. Passing None is also forwarded to request builders as the required api-version query value rather than selecting an operation default. Keep the documentation aligned with the actual default and supported value.
    :keyword api_version: The API version to use for this operation. Known values are "2026-06-01"
     and None. Default value is None. If not set, the operation's default API version will be used.
     Note that overriding this default value may result in unsupported behavior.

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_configuration.py:34

  • This now documents None as an accepted/default API version, but the async constructor still defaults api_version to "2026-06-01" on line 39. Passing None is also forwarded to request builders as the required api-version query value rather than selecting an operation default. Keep the documentation aligned with the actual default and supported value.
    :keyword api_version: The API version to use for this operation. Known values are "2026-06-01"
     and None. Default value is None. If not set, the operation's default API version will be used.
     Note that overriding this default value may result in unsupported behavior.

@github-actions

Copy link
Copy Markdown
Contributor
[Pilot] PR Pipeline Failure Analysis

A CI pipeline failed on this pull request. Here is an automated analysis of what went wrong and how to get the build green.

What failed

The verifytypes validation check for azure-iot-deviceupdate failed (build #6646631). The type completeness score dropped from 89.3% (on main) to 0% in this PR — a significant regression that triggers an automated block. The specific errors are missing type annotations on public API symbols:

  • _client.py:80 and _client.py:81DeviceUpdateClient.device_update and DeviceUpdateClient.device_management are missing type annotations (inferred as DeviceUpdateOperations / DeviceManagementOperations)
  • operations/_operations.py (lines 1485, 2858) — __init__ parameters args and kwargs are missing type annotations in both sync and async variants

All 6 symbols exported by azure.iot.deviceupdate have unknown type, down from 14 unknown out of 196 previously.

Recommended next steps

  • Add explicit type annotations to the device_update and device_management properties in sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_client.py and aio/_client.py (e.g. device_update: DeviceUpdateOperations).
  • Add type annotations to *args and **kwargs in DeviceUpdateOperations.__init__ and DeviceManagementOperations.__init__ in both operations/_operations.py and aio/operations/_operations.py.
  • Re-run verifytypes locally: azpysdk verifytypes . from sdk/deviceupdate/azure-iot-deviceupdate/ to verify the score is back to ≥ 89.3%.
  • Consult the typing guide: https://aka.ms/python/typing-guide
  • See the CI troubleshooting guide: https://aka.ms/ci-fix
  • Push new commits to address the failures; this comment updates automatically on the next failing run.
Raw pipeline analysis (azsdk ci analyze)
Failed Tasks
--------------------------------------------------------------------------------
### Errors:

[azure-iot-deviceupdate :: verifytypes] ERROR: The type completeness score of azure-iot-deviceupdate has significantly decreased compared to the score in main.

Score in main: 89.3%
Score in PR:   0%

Errors reported:
  azure.iot.deviceupdate._client.DeviceUpdateClient.device_update
    _client.py:80:14 - error: Type is missing type annotation and could be inferred differently by type checkers
      Inferred type is "DeviceUpdateOperations"
  azure.iot.deviceupdate.operations._operations.DeviceUpdateOperations.__init__
    _operations.py:1485:9 - error: Type annotation for parameter "args" is missing
    _operations.py:1485:9 - error: Type annotation for parameter "kwargs" is missing
  azure.iot.deviceupdate._client.DeviceUpdateClient.device_management
    _client.py:81:14 - error: Type is missing type annotation and could be inferred differently by type checkers
      Inferred type is "DeviceManagementOperations"
  azure.iot.deviceupdate.operations._operations.DeviceManagementOperations.__init__
    _operations.py:2858:9 - error: Type annotation for parameter "args" is missing
    _operations.py:2858:9 - error: Type annotation for parameter "kwargs" is missing
  (same errors repeated for aio/_client.py and aio/operations/_operations.py)

SUMMARY:
  azure-iot-deviceupdate  verifytypes  FAIL(1)  40.93s
  Total checks: 1 | Failed: 1

Pipeline: https://dev.azure.com/azure-sdk/public/_build/results?buildId=6646631

Copilot detected the failing pipeline and generated the analysis above. To have it attempt a fix automatically, reply with @copilot please fix the failing pipeline on this PR.

Generated by Pipeline Analysis - Next Steps · 26.5 AIC · ⌖ 6.27 AIC · ⊞ 6.6K ·

@Sedols Sedols left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approved once addressed offline feedback and checks pass.

Copilot AI review requested due to automatic review settings August 2, 2026 19:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 20 changed files in this pull request and generated no new comments.

Suppressed comments (3)

sdk/deviceupdate/azure-iot-deviceupdate/api.md:14

  • The API snapshot no longer matches the exported client. The compatibility class in azure/iot/deviceupdate/_patch.py exposes (endpoint, instance_id, credential, *, api_version: Optional[str] = None), while this records (endpoint, credential, instance_id, *, api_version: str). The operation patches also restore if_none_match, which is absent throughout this snapshot. Regenerate api.md and api.metadata.yml after applying the customizations so API review validates the surface users actually import.
                endpoint: str, 
                credential: TokenCredential, 
                instance_id: str, 
                *, 
                api_version: str = ..., 

sdk/deviceupdate/azure-iot-deviceupdate/apiview-properties.json:8

  • These mappings now reference azure.iot.deviceupdate.models symbols that do not exist: this PR deletes the models package and the API snapshot exposes no models namespace. Regenerate this metadata without the stale enum mappings so APIView does not attempt to associate nonexistent Python definitions.
        "azure.iot.deviceupdate.models.StepType": "DeviceUpdateClient.StepType",
        "azure.iot.deviceupdate.models.OperationStatus": "DeviceUpdateClient.OperationStatus",
        "azure.iot.deviceupdate.models.DeviceDeploymentState": "DeviceUpdateClient.DeviceDeploymentState",
        "azure.iot.deviceupdate.models.ImportType": "DeviceUpdateClient.ImportType",
        "azure.iot.deviceupdate.models.GroupType": "DeviceUpdateClient.GroupType",

sdk/deviceupdate/azure-iot-deviceupdate/CHANGELOG.md:8

  • downloadSecurity supports both https and http, so describing it only as configuring TLS-secured downloads is misleading; the new capability can also opt out of TLS. Describe this as selecting the update payload download protocol.
- Added support for configuring TLS-secured update payload downloads through the `downloadSecurity` property when creating or updating a deployment.

Copilot AI review requested due to automatic review settings August 2, 2026 19:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 20 changed files in this pull request and generated no new comments.

Suppressed comments (4)

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_client.py:31

  • Replacing the public client description with only its class name removes all information about what service the client operates. Restore the service description so generated reference documentation remains meaningful.
    """DeviceUpdateClient.

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/_configuration.py:34

  • The new documentation says api_version=None is supported and defaults per operation, but the configuration actually defaults to "2026-06-01", and explicitly passing None reaches the request serializer and raises ValueError("No value for given attribute"). Keep the documented default and accepted values aligned with the implementation.
    :keyword api_version: The API version to use for this operation. Known values are "2026-06-01"
     and None. Default value is None. If not set, the operation's default API version will be used.
     Note that overriding this default value may result in unsupported behavior.

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_configuration.py:34

  • The async configuration has the same contract mismatch: it documents None as supported even though the implementation defaults to "2026-06-01" and serializing an explicitly supplied None fails. Document the actual accepted value and default.
    :keyword api_version: The API version to use for this operation. Known values are "2026-06-01"
     and None. Default value is None. If not set, the operation's default API version will be used.
     Note that overriding this default value may result in unsupported behavior.

sdk/deviceupdate/azure-iot-deviceupdate/azure/iot/deviceupdate/aio/_client.py:31

  • The async client's public docstring is likewise reduced to a tautological class name, so its generated reference no longer explains the service. Preserve the existing service description here as well.
    """DeviceUpdateClient.

Copilot AI review requested due to automatic review settings August 2, 2026 20:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 20 out of 22 changed files in this pull request and generated no new comments.

Suppressed comments (1)

sdk/deviceupdate/azure-iot-deviceupdate/samples/DeployUpdate/sample_deploy_update.py:44

  • The companion deployment walkthrough still shows updateId at the top level (samples/DeployUpdate/Readme.md:48-56), while this corrected sample now requires update.updateId. Users copying the README will therefore send the obsolete payload shape. Update the README snippet alongside this change so both examples use the same valid request body.
        "update": {
            "updateId": {"provider": update_provider, "name": update_name, "version": update_version},
        },

@wuqiten
wuqiten merged commit 430b778 into main Aug 3, 2026
21 checks passed
@wuqiten
wuqiten deleted the sdkauto/azure-iot-deviceupdate-6636753 branch August 3, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-release When merged to main, release pipelines for this PR's changed packages trigger automatically. Device Update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants