Skip to content

[AutoPR @azure-arm-iothub]-generated-from-SDK Generation - JS-6398398#38833

Open
azure-sdk wants to merge 2 commits into
mainfrom
sdkauto/@azure-arm-iothub-6398398
Open

[AutoPR @azure-arm-iothub]-generated-from-SDK Generation - JS-6398398#38833
azure-sdk wants to merge 2 commits into
mainfrom
sdkauto/@azure-arm-iothub-6398398

Conversation

@azure-sdk
Copy link
Copy Markdown
Collaborator

Configurations: 'specification/iothub/resource-manager/Microsoft.Devices/IoTHub/tspconfig.yaml', API Version: 2026-03-01-preview, SDK Release Type: beta, and CommitSHA: '4375d0c4eb36e73152199e484c0d4537ddd4c9da' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6398398 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.

…ces/IoTHub/tspconfig.yaml', API Version: 2026-03-01-preview, SDK Release Type: beta, and CommitSHA: '4375d0c4eb36e73152199e484c0d4537ddd4c9da' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6398398 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release.
@github-actions github-actions Bot added the Mgmt This issue is related to a management-plane library. label Jun 5, 2026
@v-jiaodi v-jiaodi added refresh PR for SDK refresh mgmt-review-needed labels Jun 5, 2026
@v-jiaodi v-jiaodi marked this pull request as ready for review June 5, 2026 08:53
Copilot AI review requested due to automatic review settings June 5, 2026 08:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@github-actions github-actions Bot added mgmt-review-in-progress Management SDK review is in progress and removed mgmt-review-needed labels Jun 5, 2026
@v-jiaodi
Copy link
Copy Markdown
Member

v-jiaodi commented Jun 5, 2026

Note

This analysis was generated by AI. Please review the classifications and root causes for accuracy.

Breaking Change Analysis: @azure/arm-iothub 7.0.0-beta.2

Old SDK (6.3.0) New SDK (PR)
Generator Swagger / AutoRest TypeSpec / emitter
API Version 2023-06-30 2026-03-01-preview
Package Version 6.3.0 7.0.0-beta.2

Spec References:


Type 1: API Version Upgrade (2023-06-30 -> 2026-03-01-preview) -- 1 item

row Breaking Change Root Cause
1 Type alias "IotHubSkuTier" has been changed New API version added Generation2 value. Old swagger (2023-06-30) had 3 values: Free, Standard, Basic. New swagger (2026-03-01-preview) has 4 values including Generation2.

Type 2: TypeSpec / Emitter Migration -- 14 items

Root Cause Sub-Type Count Accepted
resumeFrom removed from LRO options; response wrapper type alias removed Emitter 4
Response wrapper type alias removed; Modular returns raw model directly Emitter 1
subscriptionId / apiVersion no longer exposed on client Emitter 2
Client property privateLinkResourcesOperations renamed to privateLinkResources Emitter 1
Orphan type removed (not referenced by any operation in swagger) Emitter 1
Options interface renamed: operation name prefix changed (Get -> List) Emitter 3
ARM common-type Resource hierarchy: location/tags moved to TrackedResource Conversion 2

Details

  1. Operation IotHubResource.beginCreateOrUpdate has a new signature -- Emitter

    resumeFrom property removed from IotHubResourceCreateOrUpdateOptionalParams (modular SDK uses restorePoller instead). Response wrapper IotHubResourceCreateOrUpdateResponse removed; return type is now IotHubDescription directly (structurally identical). Also has Type 1 cascade: return type IotHubDescription contains IotHubSkuInfo.tier: IotHubSkuTier which changed (row 1).

  2. Operation IotHubResource.beginCreateOrUpdateAndWait has a new signature -- Emitter

    Same as row 2.

  3. Operation IotHubResource.beginDeleteAndWait has a new signature -- Emitter

    resumeFrom removed from IotHubResourceDeleteOptionalParams. Response wrapper removed. Same Type 1 cascade as row 2.

  4. Operation IotHubResource.beginUpdateAndWait has a new signature -- Emitter

    resumeFrom removed from IotHubResourceUpdateOptionalParams. Response wrapper removed. Same Type 1 cascade as row 2.

  5. Operation IotHubResource.get has a new signature -- Emitter ✅

    Response wrapper IotHubResourceGetResponse removed; return type is now IotHubDescription directly (structurally identical, the alias was type IotHubResourceGetResponse = IotHubDescription). Options unchanged. Also has Type 1 cascade: return type contains IotHubSkuTier which changed (row 1).

  6. Class IotHubClient no longer has parameter apiVersion -- Emitter ✅

    Modular SDK stores apiVersion in internal ClientContext and does not expose it on the client class.

  7. Class IotHubClient no longer has parameter privateLinkResourcesOperations -- Emitter

    Client property renamed from privateLinkResourcesOperations to privateLinkResources. The TypeSpec emitter derives the property name without the Operations suffix (the type PrivateLinkResourcesOperations is unchanged).

  8. Class IotHubClient no longer has parameter subscriptionId -- Emitter ✅

    Modular SDK stores subscriptionId in internal ClientContext and does not expose it on the client class.

  9. Removed Interface CertificateBodyDescription -- Emitter ✅

Orphan type. CertificateBodyDescription was defined in old swagger but not referenced by any operation. Modular emitter only exports types reachable from operation signatures (tree-shaking).

  1. Removed Interface IotHubResourceGetEndpointHealthOptionalParams -- Emitter

Options interface renamed. The old AutoRest SDK named the options based on swagger operationId (GetEndpointHealth), while the TypeSpec emitter uses the client method name (listEndpointHealth). Replaced by IotHubResourceListEndpointHealthOptionalParams.

  1. Removed Interface IotHubResourceGetQuotaMetricsOptionalParams -- Emitter

Same as row 11. Replaced by IotHubResourceListQuotaMetricsOptionalParams.

  1. Removed Interface IotHubResourceGetValidSkusOptionalParams -- Emitter

Same as row 11. Replaced by IotHubResourceListValidSkusOptionalParams.

  1. Interface Resource no longer has parameter location -- Conversion

TypeSpec uses ARM common-type Resource which only has id, name, type, systemData. The location property is on TrackedResource (which extends Resource). IotHubDescription extends TrackedResource and still has location. Old swagger defined its own Resource with location included.

  1. Interface Resource no longer has parameter tags -- Conversion

Same as row 14. tags is on TrackedResource instead of Resource in the ARM common-type hierarchy.


Open Questions

  1. Entries 2-5 (resumeFrom removal): The resumeFrom property on LRO options was removed because the modular SDK uses restorePoller() instead. This change is not explicitly listed in the approved breaking change patterns. Needs architect review.

  2. Entry 8 (client property rename): privateLinkResourcesOperations -> privateLinkResources. This is a client property naming convention change. Not explicitly covered by approved patterns (pattern 8 covers operation group interface naming, not client property naming).

  3. Entries 11-13 (options prefix rename): Options interfaces renamed from IotHubResourceGet*OptionalParams to IotHubResourceList*OptionalParams due to client method name difference. This is specific to JS where @@clientName overrides the operation name. Not covered by pattern 6 (which covers suffix changes OptionalParams -> Options).

  4. Entries 14-15 (Resource hierarchy): Resource losing location/tags is due to TypeSpec using ARM common-type hierarchy. While IotHubDescription still has these properties via TrackedResource, direct users of the Resource interface are affected. Not covered by existing approved patterns.


Total: 1 (Type 1: API Version Upgrade) + 14 (Type 2: TypeSpec/Emitter Migration) = 15 breaking changes

Type 2 breakdown: 2 items from TypeSpec conversion, 12 items from emitter differences.


Methodology

This analysis uses a four-layer comparison model:

  • Layer A (old swagger): stable/2023-06-30/iothub.json at commit 5c57098 (used by AutoRest for 6.3.0)
  • Layer C (TypeSpec-generated swagger): preview/2026-03-01-preview/iothub.json at commit 4375d0c
  • Layer D (SDK api.md): old from @azure/arm-iothub_6.3.0 tag, new from PR branch

Classification: Layer A != Layer C with cause in API version change -> Type 1. Layer A != Layer C with cause in TypeSpec modeling -> Type 2a. Same swagger but different SDK output -> Type 2b.

Note: No Layer B (pre-TypeSpec swagger for 2026-03-01-preview) exists since this API version was authored directly in TypeSpec. Classification relies on comparing old swagger definitions against new TypeSpec-generated swagger to determine whether changes are due to the API version upgrade or the TypeSpec conversion/emitter.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Next Steps to Merge

Only failed checks and required actions are listed below.

  • ❌ UnitTest (ubuntu_24x_node): stale test recordings — request URL mismatch: test expects api-version=2026-03-01-preview but recordings were made with api-version=2025-08-01-preview. Action: Re-record tests per the test guide, or skip tests with maintainer approval. Review ADO logs.
  • ⏳ UnitTest (windows_22x_node, windows_22x_browser, macoslatest_26x_node): still running.

@github-actions github-actions Bot added mgmt-review-added Management SDK review completed and removed mgmt-review-in-progress Management SDK review is in progress labels Jun 5, 2026
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

1 tool issue found in this PR for @azure/arm-iothub 7.0.0-beta.2 (TypeSpec migration from Autorest, API version 2026-03-01-preview). No public API design issues were detected (no _N suffixes, no AutoGenerated names, no broken exports, no unknown return types, subscriptionId constructor overload still present, KnownVersions contains only the new preview version which is newer than the previous one).

📊 Structured Report
{"agent":"mgmt-reviewer","pr":38833,"summary":"issues_found","findings":[{"file":"sdk/iothub/arm-iothub/CHANGELOG.md","line":4,"issueType":"tool","category":"changelog-comparison-version","description":"CHANGELOG 7.0.0-beta.2 entry compares with 6.3.0 instead of 7.0.0-beta.1 (the immediately preceding published version)"}]}

Benchmarked by Management Release Assistant

# Release History

## 7.0.0-beta.2 (2026-06-05)
Compared with version 6.3.0
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.

🔴 Tool IssueCHANGELOG.md:4

Compared with version 6.3.0

The new 7.0.0-beta.2 entry compares against the stable baseline 6.3.0 rather than the immediately preceding beta 7.0.0-beta.1. This causes the diff to re-list changes that were already documented in 7.0.0-beta.1, making the changelog misleading.

Fix: Update this line to read Compared with version 7.0.0-beta.1, and report the issue in the generation tool repository.

@v-jiaodi
Copy link
Copy Markdown
Member

v-jiaodi commented Jun 5, 2026

Note

This analysis was generated by an AI assistant trained on management SDK migration patterns. Always verify classifications against the actual swagger/TypeSpec specs before making release decisions.

Breaking Change Analysis: @azure/arm-iothub (PR 38833)

Field Value
Package @azure/arm-iothub
Old version 7.0.0-beta.1 (AutoRest, @autorest/typescript@6.0.45)
New version 7.0.0-beta.2 (TypeSpec emitter)
Old API version 2025-08-01-preview (tag package-preview-2025-08)
New API version 2026-03-01-preview (TypeSpec)
Spec commit 4375d0c4eb
CHANGELOG baseline Compared with version 6.3.0 (API 2023-06-30)

Reference: Main branch beta.1 (AutoRest, same baseline 6.3.0) had 7 breaking changes. PR beta.2 has 15 breaking changes. Common entries (rows 1-5, 15) originate from the API version upgrade; entries unique to beta.2 (rows 6-14) are from the TypeSpec/emitter migration.

Spec References


Type 1: API Version Upgrade (1 entry)

These breaking changes are caused by the REST API version changing from 2023-06-302026-03-01-preview and are not related to the TypeSpec/emitter migration.

Row CHANGELOG Entry Root Cause
15 Type alias IotHubSkuTier has been changed API version upgrade added Generation2 value to the IotHubSkuTier enum (was Free | Standard | Basic in 2023-06-30, now Free | Standard | Basic | Generation2). Already present in beta.1 CHANGELOG.

Type 2: TypeSpec/Emitter Migration (14 entries)

All 14 Type 2 entries match architect-approved breaking change patterns. ✅

Summary by Root Cause

Root Cause Count Approved Rows
Response wrapper removal (LRO return types changed from XxxResponse wrapper to raw model IotHubDescription) 5 1-5
resumeFrom removed from LRO options (modular uses RestorePollerOptions instead) 3 1-4 (contributing cause)
subscriptionId/apiVersion no longer exposed on client 2 6, 8
Orphan model tree-shaking 1 9
Options interface renamed (GetList to match SDK method name) 3 10-12
ARM common type Resource no longer includes location/tags (those are on TrackedResource) 2 13-14
Client property renamed (privateLinkResourcesOperationsprivateLinkResources) due to operation group naming convention 1 7

Detailed Entries

Click to expand all 14 Type 2 entries
Row CHANGELOG Entry Sub-type Root Cause Approved
1 Operation IotHubResource.beginCreateOrUpdate has a new signature 2b Return type changed from IotHubResourceCreateOrUpdateResponse (= IotHubDescription alias) to IotHubDescription directly. Also: resumeFrom property removed from options; base class changed from coreClient.OperationOptions to OperationOptions.
2 Operation IotHubResource.beginCreateOrUpdateAndWait has a new signature 2b Same as row 1 (cascading from same operation)
3 Operation IotHubResource.beginDeleteAndWait has a new signature 2b Return type changed from IotHubResourceDeleteResponse (= IotHubDescription alias) to IotHubDescription. Also: resumeFrom removed from options.
4 Operation IotHubResource.beginUpdateAndWait has a new signature 2b Return type changed from IotHubResourceUpdateResponse (= IotHubResourceUpdateHeaders & IotHubDescription) to IotHubDescription. Headers info lost. Also: resumeFrom removed from options.
5 Operation IotHubResource.get has a new signature 2b Return type changed from IotHubResourceGetResponse (= IotHubDescription alias) to IotHubDescription. Also: options base class changed to OperationOptions.
6 Class IotHubClient no longer has parameter apiVersion 2b Modular SDK stores apiVersion in internal ClientContext, not exposed on client class.
7 Class IotHubClient no longer has parameter privateLinkResourcesOperations 2b Property renamed to privateLinkResources. In AutoRest, the property was privateLinkResourcesOperations (matching the type name to avoid conflict with model PrivateLinkResources). TypeSpec emitter uses clean base name privateLinkResources since the type already has Operations suffix.
8 Class IotHubClient no longer has parameter subscriptionId 2b Modular SDK stores subscriptionId in internal ClientContext, not exposed on client class.
9 Removed Interface CertificateBodyDescription 2b Orphan model tree-shaking. CertificateBodyDescription existed in old swagger but was not referenced by any operation. AutoRest generated it anyway; TypeSpec emitter only emits reachable types.
10 Removed Interface IotHubResourceGetEndpointHealthOptionalParams 2b Options type renamed to IotHubResourceListEndpointHealthOptionalParams. The SDK method was already listEndpointHealth but the options followed the swagger operationId GetEndpointHealth. TypeSpec emitter aligns the options name with the method name.
11 Removed Interface IotHubResourceGetQuotaMetricsOptionalParams 2b Same as row 10: renamed to IotHubResourceListQuotaMetricsOptionalParams.
12 Removed Interface IotHubResourceGetValidSkusOptionalParams 2b Same as row 10: renamed to IotHubResourceListValidSkusOptionalParams.
13 Interface Resource no longer has parameter location 2b TypeSpec uses ARM common type Resource (base type without location/tags). location is on TrackedResource. AutoRest included all properties from swagger's self-defined Resource.
14 Interface Resource no longer has parameter tags 2b Same as row 13.

Totals

Category Count
Total breaking changes 15
Type 1 (API version upgrade) 1
Type 2 (TypeSpec/emitter migration) 14
Type 2 matching approved patterns ✅ 14
Type 2 needing review ⚠️ 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mgmt This issue is related to a management-plane library. mgmt-review-added Management SDK review completed refresh PR for SDK refresh

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants