Skip to content

[FEATURE REQ] azure-core-v2 for mgmt SDK #44264

Open
@XiaofeiCao

Description

@XiaofeiCao

Gaps

azure-core-management-v2

  1. Resource/ProxyResource/ManagementError
    They are parent classes for resource and management errors. Do we still need them in the new v2?
    Their properties are shadowed in child classes anyway for azure-json deserialization.
    Another use case be type restriction for premium interfaces. Do we need premium interfaces/libs anymore? How about azure-resourcemanager-authorization and azure-resourcemanager-resources?
    Guess we could leave these classes out before conclusions are made. Read-only properties are shadowed, and writable properties can be moved upwards to parent classes, which hopefully won't cause breaking changes.
  2. SystemData/AdditionalInfo/etc
    They are common properties for resources and management errors. We probably still need them to avoid unnecessary additional classes.
  3. LRO related. PollerFactory, SyncPoller, etc.
  4. AzureEnvironment(AzureCloud endpoint mapping), AzureProfile, etc.
  5. (02/20/2025) Introduce new ManagedIdentity classes

azure-core-v2

  1. No @Headers for setting Content-Type for GET methods. Does that mean we need to add header parameter in proxy method?
  2. AzureCloud fixed by Add AzureCloud to azure-core-v2 and LRO enum to ReturnType in clientcore #44301
  3. TokenCredential and BearerTokenAuthenticationPolicy. issue: [http-client-java] Add TokenCredential and bearer policy to codegen microsoft/typespec#5910
  4. LRO related: @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) fixed by Add sync polling support to azure-core v2 #44670
  5. Model Azure-AsyncOperation response body. See Azure-AsyncOperation Resource format.

codegen

  1. Generate only sync-stack methods(asked Sandeep to contact customer when there's beta release for core-v2).
  2. Use ClassType instead of Class imports in codegen: https://github.com/microsoft/typespec/blob/9f41c06bf265fd0e0a7cde241cf57d4944355252/packages/http-client-java/generator/http-client-generator-mgmt/src/main/java/com/microsoft/typespec/http/client/generator/mgmt/template/FluentManagerTemplate.java#L91
  3. Seems now there's no proxy/client methods with Context override. Need to generate them. (02/20/2025, use RequestContext instead)
  4. New class mapping: a. SimpleResponse -> Response
    b. CoreUtils (02/20/2025 No CoreUtils anymore, use direct implementation instead)
  5. TokenCredential
  6. No strongly typed header Response as ResponseBase<H, T>. Implement support for ResponseWithTypedHeaders #42640
  7. Model Azure-AsyncOperation response body, and return SyncPoller<ArmOperationStatus, Resource> for POST operations or operations with only Azure-AsyncOperation header.

Premium libraries migration

If we still provide premium libraries support, for backward compatibility, we need to investigate on the migration effort. This will probably take months.

1. Resource creation dependency graph

Previously we use TaskGroup for resource creation dependencies. E.g. create Network/Storage before creating VM.
Concurrent task execution uses Reactor model. If we support only sync-stack, we either do

  1. For simplicity, remove TaskGroup and execute in a sequential fashion. Though this will hurt performance.
  2. Rewrite task execution using new thread model. We have some edge cases, and need to investigate on the effort.

Metadata

Metadata

Assignees

Labels

ARMARM - CoreAzure.Core.V2Contains issues to consider when desiging Azure Core V2MgmtThis issue is related to a management-plane library.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions