Skip to content

Fix LRO paging should generatebeginListXXXAndWait operation for compatibility-lro: true#3712

Open
v-jiaodi wants to merge 13 commits intoAzure:mainfrom
v-jiaodi:test0127
Open

Fix LRO paging should generatebeginListXXXAndWait operation for compatibility-lro: true#3712
v-jiaodi wants to merge 13 commits intoAzure:mainfrom
v-jiaodi:test0127

Conversation

@v-jiaodi
Copy link
Member

fixes #3707

@v-jiaodi v-jiaodi marked this pull request as ready for review February 3, 2026 05:39
@v-jiaodi v-jiaodi requested a review from Copilot February 4, 2026 01:54
Copy link
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.

Pull request overview

Adds a new AppService TypeSpec test scenario configured with compatibility-lro: true to validate LRO + paging codegen behavior (including beginListXXXAndWait generation).

Changes:

  • Added tspconfig.yaml enabling compatibility-lro and related emitter options for the AppService test.
  • Added/updated AppService TypeSpec spec files (main, routes, client, back-compat customizations, and an ASE resource) to drive the scenario.
  • Introduced additional ARM operations/resources to exercise list/LRO patterns.

Reviewed changes

Copilot reviewed 6 out of 162 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/typespec-test/test/AppService/tspconfig.yaml Configures the emitter for the AppService test, including compatibility-lro: true.
packages/typespec-test/test/AppService/spec/routes.tsp Adds many ARM operations (including @list operations) to exercise paging/LRO behavior.
packages/typespec-test/test/AppService/spec/main.tsp Defines the service namespace, versions, and legacy Operations interface for the test scenario.
packages/typespec-test/test/AppService/spec/client.tsp Adds client-generator customizations and a couple of customized operations for the scenario.
packages/typespec-test/test/AppService/spec/back-compatible.tsp Adds legacy/back-compat flattening + naming directives used by generated clients.
packages/typespec-test/test/AppService/spec/AppServiceEnvironmentResource.tsp Defines an ARM resource and async actions returning collections to exercise LRO/paging generation.

Comment on lines +20 to +21
@summary("Validate whether a resource can be moved.")
@summary("Validate whether a resource can be moved.")
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

These operations have duplicate @summary decorators with identical text. Keeping only one @summary per operation will avoid duplicated documentation output and reduce noise.

Copilot uses AI. Check for mistakes.
Comment on lines +39 to +40
@summary("Validate if a resource can be created.")
@summary("Validate if a resource can be created.")
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

These operations have duplicate @summary decorators with identical text. Keeping only one @summary per operation will avoid duplicated documentation output and reduce noise.

Copilot uses AI. Check for mistakes.
import "@azure-tools/typespec-azure-resource-manager";
import "@azure-tools/typespec-client-generator-core";

using Http;
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

Http is not a standard namespace alias; elsewhere in this test set you use TypeSpec.Http. This is likely to fail TypeSpec compilation unless some imported library explicitly defines a top-level Http namespace. Prefer using TypeSpec.Http; (and ensure the corresponding import is present/available via dependencies).

Suggested change
using Http;
using TypeSpec.Http;

Copilot uses AI. Check for mistakes.
name: string;
},
ResourceRoute = #{
route: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Web/hostingEnvironments",
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The provider namespace in the route uses microsoft.Web (lowercase m), while the canonical ARM provider name and the rest of the spec uses Microsoft.Web. Use consistent casing (Microsoft.Web) to prevent mismatches in generated routes/operation IDs and to align with ARM conventions.

Suggested change
route: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Web/hostingEnvironments",
route: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments",

Copilot uses AI. Check for mistakes.
@qiaozha qiaozha added HRLC p0 priority 0 labels Feb 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

HRLC p0 priority 0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[migration tsp] LRO paging should generate lro operation for compatibility-lro: true

3 participants